From 053c629d49cfef459888f5fee18f54beb9d2348b Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 1 Oct 2024 15:57:07 +0100 Subject: [PATCH] fix: Introduce startup probe to CAREN pod to reduce races Introduce a more frequent startup probe polling every second, which once it succeeds will trigger readiness and liveness probes to run at their default intervals. This reduces chances of races in clusterctl checking for readiness while keeping the overhead on the kubelet for checking readiness once the pod is up to a minimum (default probe period). --- .../templates/deployment.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/cluster-api-runtime-extensions-nutanix/templates/deployment.yaml b/charts/cluster-api-runtime-extensions-nutanix/templates/deployment.yaml index 46a6bf722..855bad568 100644 --- a/charts/cluster-api-runtime-extensions-nutanix/templates/deployment.yaml +++ b/charts/cluster-api-runtime-extensions-nutanix/templates/deployment.yaml @@ -73,7 +73,7 @@ spec: fieldRef: fieldPath: metadata.namespace resources: - {{ with .Values.resources }} + {{- with .Values.resources }} {{- toYaml . | nindent 10 }} {{- end }} volumeMounts: @@ -93,9 +93,16 @@ spec: port: probes scheme: HTTP path: /readyz + startupProbe: + httpGet: + port: probes + scheme: HTTP + path: /healthz + periodSeconds: 1 + failureThreshold: 30 priorityClassName: {{ .Values.priorityClassName }} securityContext: - {{ with .Values.securityContext }} + {{- with .Values.securityContext }} {{- toYaml . | nindent 8}} {{- end }} volumes: