[operator] Small bugfixes (#7459)

This commit is contained in:
Edward Oakes
2020-03-05 10:57:56 -08:00
committed by GitHub
parent 1989eed3bf
commit e29f2ef788
9 changed files with 13 additions and 24 deletions
@@ -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{