mirror of
https://github.com/wassname/ray.git
synced 2026-07-25 13:30:52 +08:00
[operator] Small bugfixes (#7459)
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
images:
|
||||
- name: controller
|
||||
newTag: latest
|
||||
newName: controller
|
||||
resources:
|
||||
- manager.yaml
|
||||
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
- /manager
|
||||
args:
|
||||
- --enable-leader-election
|
||||
image: controller:latest
|
||||
image: controller
|
||||
name: manager
|
||||
resources:
|
||||
limits:
|
||||
|
||||
@@ -57,7 +57,7 @@ rules:
|
||||
- apiGroups:
|
||||
- ray.io
|
||||
resources:
|
||||
- RayClusters
|
||||
- rayclusters
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
@@ -69,7 +69,7 @@ rules:
|
||||
- apiGroups:
|
||||
- ray.io
|
||||
resources:
|
||||
- RayClusters/status
|
||||
- rayclusters/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
|
||||
@@ -9,7 +9,7 @@ spec:
|
||||
# An unique identifier for the head node and workers of this cluster.
|
||||
clusterName: raycluster-sample
|
||||
images:
|
||||
defaultImage: "docker-image"
|
||||
defaultImage: rayproject/autoscaler
|
||||
imagePullPolicy: "Always"
|
||||
|
||||
extensions:
|
||||
|
||||
@@ -9,7 +9,7 @@ spec:
|
||||
# An unique identifier for the head node and workers of this cluster.
|
||||
clusterName: raycluster-sample
|
||||
images:
|
||||
defaultImage: "docker-image"
|
||||
defaultImage: rayproject/autoscaler
|
||||
imagePullPolicy: "Always"
|
||||
|
||||
extensions:
|
||||
|
||||
@@ -9,7 +9,7 @@ spec:
|
||||
# An unique identifier for the head node and workers of this cluster.
|
||||
clusterName: raycluster-sample
|
||||
images:
|
||||
defaultImage: "docker-image"
|
||||
defaultImage: rayproject/autoscaler
|
||||
imagePullPolicy: "Always"
|
||||
|
||||
extensions:
|
||||
|
||||
@@ -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