Skip to content

Commit ba59fd0

Browse files
authored
fix(grpc): Add startupProbe to check for grpc health readiness (#2791)
Currently, liveness and readiness probes may fail due to grpc is not ready. Adding a startupProbe will ensure grpc is ready before liveness and readiness probes are triggered. Signed-off-by: Vu Dinh <[email protected]>
1 parent 480e621 commit ba59fd0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/controller/registry/reconciler/reconciler.go

+9
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,15 @@ func Pod(source *operatorsv1alpha1.CatalogSource, name string, image string, saN
151151
InitialDelaySeconds: livenessDelay,
152152
TimeoutSeconds: 5,
153153
},
154+
StartupProbe: &corev1.Probe{
155+
ProbeHandler: corev1.ProbeHandler{
156+
Exec: &corev1.ExecAction{
157+
Command: []string{"grpc_health_probe", "-addr=:50051"},
158+
},
159+
},
160+
FailureThreshold: 15,
161+
PeriodSeconds: 10,
162+
},
154163
Resources: corev1.ResourceRequirements{
155164
Requests: corev1.ResourceList{
156165
corev1.ResourceCPU: resource.MustParse("10m"),

0 commit comments

Comments
 (0)