From 9eb177cd9074f87baf89c9aea0352b92d4338f83 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalski Date: Wed, 12 Aug 2026 17:05:44 +0200 Subject: [PATCH] operator: add startupProbe to nmstate-operator deployment The nmstate-operator container only gets ~40s to bind its health probe endpoint (initialDelaySeconds=10, periodSeconds=10, failureThreshold=3) before the liveness probe kills it. On clusters where startup is slow (e.g. restrictive network policies combined with a cluster-wide proxy delaying API/DNS access during initialization), the operator takes 50-75s to start listening on :8081 and enters a permanent CrashLoopBackOff. Since the deployment is managed by OLM (CSV), users cannot persistently relax the probes themselves. Apply the same pattern already used for the webhook and metrics operands: a startupProbe with failureThreshold=18 gives the container up to 3 minutes to initialize, after which the regular readiness/liveness probes (no initialDelaySeconds needed) take over. Assisted-By: Claude Fable 5 Signed-off-by: Mateusz Kowalski --- ...ubernetes-nmstate-operator.clusterserviceversion.yaml | 9 +++++++-- charts/kubernetes-nmstate/templates/operator.yaml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/bundle/manifests/kubernetes-nmstate-operator.clusterserviceversion.yaml b/bundle/manifests/kubernetes-nmstate-operator.clusterserviceversion.yaml index cf3d74b10..223275c06 100644 --- a/bundle/manifests/kubernetes-nmstate-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kubernetes-nmstate-operator.clusterserviceversion.yaml @@ -380,12 +380,18 @@ spec: value: nmstate image: quay.io/nmstate/kubernetes-nmstate-operator:latest imagePullPolicy: IfNotPresent + startupProbe: + httpGet: + path: /readyz + port: healthprobe + initialDelaySeconds: 10 + periodSeconds: 10 + failureThreshold: 18 livenessProbe: failureThreshold: 3 httpGet: path: /healthz port: healthprobe - initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 @@ -398,7 +404,6 @@ spec: httpGet: path: /readyz port: healthprobe - initialDelaySeconds: 10 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 diff --git a/charts/kubernetes-nmstate/templates/operator.yaml b/charts/kubernetes-nmstate/templates/operator.yaml index 09f2f1ae0..827ef8a8b 100644 --- a/charts/kubernetes-nmstate/templates/operator.yaml +++ b/charts/kubernetes-nmstate/templates/operator.yaml @@ -54,12 +54,18 @@ spec: capabilities: drop: - ALL - readinessProbe: + startupProbe: httpGet: path: /readyz port: healthprobe initialDelaySeconds: 10 periodSeconds: 10 + failureThreshold: 18 + readinessProbe: + httpGet: + path: /readyz + port: healthprobe + periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 @@ -67,7 +73,6 @@ spec: httpGet: path: /healthz port: healthprobe - initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1