Skip to content

Commit e29f2ef

Browse files
authored
[operator] Small bugfixes (#7459)
1 parent 1989eed commit e29f2ef

File tree

9 files changed

+13
-24
lines changed

9 files changed

+13
-24
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
images:
2+
- name: controller
3+
newTag: latest
4+
newName: controller
15
resources:
26
- manager.yaml

deploy/ray-operator/config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- /manager
2828
args:
2929
- --enable-leader-election
30-
image: controller:latest
30+
image: controller
3131
name: manager
3232
resources:
3333
limits:

deploy/ray-operator/config/rbac/role.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ rules:
5757
- apiGroups:
5858
- ray.io
5959
resources:
60-
- RayClusters
60+
- rayclusters
6161
verbs:
6262
- create
6363
- delete
@@ -69,7 +69,7 @@ rules:
6969
- apiGroups:
7070
- ray.io
7171
resources:
72-
- RayClusters/status
72+
- rayclusters/status
7373
verbs:
7474
- get
7575
- patch

deploy/ray-operator/config/samples/ray_v1_raycluster.complete.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
# An unique identifier for the head node and workers of this cluster.
1010
clusterName: raycluster-sample
1111
images:
12-
defaultImage: "docker-image"
12+
defaultImage: rayproject/autoscaler
1313
imagePullPolicy: "Always"
1414

1515
extensions:

deploy/ray-operator/config/samples/ray_v1_raycluster.heterogeneous.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
# An unique identifier for the head node and workers of this cluster.
1010
clusterName: raycluster-sample
1111
images:
12-
defaultImage: "docker-image"
12+
defaultImage: rayproject/autoscaler
1313
imagePullPolicy: "Always"
1414

1515
extensions:

deploy/ray-operator/config/samples/ray_v1_raycluster.mini.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
# An unique identifier for the head node and workers of this cluster.
1010
clusterName: raycluster-sample
1111
images:
12-
defaultImage: "docker-image"
12+
defaultImage: rayproject/autoscaler
1313
imagePullPolicy: "Always"
1414

1515
extensions:

deploy/ray-operator/controllers/common/pod.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ func buildContainer(conf *PodConfig) corev1.Container {
7070
httpServerPort := defaultHTTPServerPort
7171
jobManagerPort := defaultRedisPort
7272

73-
// get pod file path to check if the pod container ready or not
74-
var podReadyFilepath string
75-
for _, env := range conf.Extension.ContainerEnv {
76-
if strings.EqualFold(env.Name, PodReadyFilepath) {
77-
podReadyFilepath = env.Value
78-
break
79-
}
80-
}
81-
8273
// assign image by typeName
8374
image := conf.RayCluster.Spec.Images.DefaultImage
8475
if conf.Extension.Image != "" {
@@ -117,13 +108,6 @@ func buildContainer(conf *PodConfig) corev1.Container {
117108
Name: "job-manager",
118109
},
119110
},
120-
ReadinessProbe: &corev1.Probe{
121-
Handler: corev1.Handler{
122-
Exec: &corev1.ExecAction{Command: []string{"cat", podReadyFilepath}},
123-
},
124-
InitialDelaySeconds: 15,
125-
SuccessThreshold: 2,
126-
},
127111
}
128112
return container
129113
}

deploy/ray-operator/controllers/common/service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func ServiceForPod(conf *ServiceConfig) *corev1.Service {
3333
Namespace: conf.RayCluster.Namespace,
3434
},
3535
Spec: corev1.ServiceSpec{
36+
Ports: []corev1.ServicePort{{Name: "redis", Port: int32(defaultRedisPort)}},
3637
ClusterIP: "None",
3738
// select this raycluster's component
3839
Selector: map[string]string{

deploy/ray-operator/controllers/raycluster_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ type RayClusterReconciler struct {
4545
// Reconcile reads that state of the cluster for a RayCluster object and makes changes based on it
4646
// and what is in the RayCluster.Spec
4747
// Automatically generate RBAC rules to allow the Controller to read and write workloads
48-
// +kubebuilder:rbac:groups=ray.io,resources=RayClusters,verbs=get;list;watch;create;update;patch;delete
49-
// +kubebuilder:rbac:groups=ray.io,resources=RayClusters/status,verbs=get;update;patch
48+
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters,verbs=get;list;watch;create;update;patch;delete
49+
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/status,verbs=get;update;patch
5050
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
5151
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
5252
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete

0 commit comments

Comments
 (0)