mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
[operator] Small bugfixes (#7459)
This commit is contained in:
@@ -70,15 +70,6 @@ func buildContainer(conf *PodConfig) corev1.Container {
|
||||
httpServerPort := defaultHTTPServerPort
|
||||
jobManagerPort := defaultRedisPort
|
||||
|
||||
// get pod file path to check if the pod container ready or not
|
||||
var podReadyFilepath string
|
||||
for _, env := range conf.Extension.ContainerEnv {
|
||||
if strings.EqualFold(env.Name, PodReadyFilepath) {
|
||||
podReadyFilepath = env.Value
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// assign image by typeName
|
||||
image := conf.RayCluster.Spec.Images.DefaultImage
|
||||
if conf.Extension.Image != "" {
|
||||
@@ -117,13 +108,6 @@ func buildContainer(conf *PodConfig) corev1.Container {
|
||||
Name: "job-manager",
|
||||
},
|
||||
},
|
||||
ReadinessProbe: &corev1.Probe{
|
||||
Handler: corev1.Handler{
|
||||
Exec: &corev1.ExecAction{Command: []string{"cat", podReadyFilepath}},
|
||||
},
|
||||
InitialDelaySeconds: 15,
|
||||
SuccessThreshold: 2,
|
||||
},
|
||||
}
|
||||
return container
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ func ServiceForPod(conf *ServiceConfig) *corev1.Service {
|
||||
Namespace: conf.RayCluster.Namespace,
|
||||
},
|
||||
Spec: corev1.ServiceSpec{
|
||||
Ports: []corev1.ServicePort{{Name: "redis", Port: int32(defaultRedisPort)}},
|
||||
ClusterIP: "None",
|
||||
// select this raycluster's component
|
||||
Selector: map[string]string{
|
||||
|
||||
@@ -45,8 +45,8 @@ type RayClusterReconciler struct {
|
||||
// Reconcile reads that state of the cluster for a RayCluster object and makes changes based on it
|
||||
// and what is in the RayCluster.Spec
|
||||
// Automatically generate RBAC rules to allow the Controller to read and write workloads
|
||||
// +kubebuilder:rbac:groups=ray.io,resources=RayClusters,verbs=get;list;watch;create;update;patch;delete
|
||||
// +kubebuilder:rbac:groups=ray.io,resources=RayClusters/status,verbs=get;update;patch
|
||||
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters,verbs=get;list;watch;create;update;patch;delete
|
||||
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/status,verbs=get;update;patch
|
||||
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
|
||||
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
|
||||
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete
|
||||
|
||||
Reference in New Issue
Block a user