This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ozone-helm-charts.git


The following commit(s) were added to refs/heads/main by this push:
     new 4017dff  HDDS-14349. Adding startupProbe for HA deployments (#42)
4017dff is described below

commit 4017dff91a9cba309dc825f36513dd71e354469f
Author: Mark Tsai <[email protected]>
AuthorDate: Sat Sep 26 01:00:05 2026 +0800

    HDDS-14349. Adding startupProbe for HA deployments (#42)
---
 charts/ozone/templates/om/om-statefulset.yaml   | 13 ++++++++++++-
 charts/ozone/templates/scm/scm-statefulset.yaml | 15 ++++++++++++++-
 charts/ozone/values.yaml                        | 18 ++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/charts/ozone/templates/om/om-statefulset.yaml 
b/charts/ozone/templates/om/om-statefulset.yaml
index ac59c97..f9bc2f8 100644
--- a/charts/ozone/templates/om/om-statefulset.yaml
+++ b/charts/ozone/templates/om/om-statefulset.yaml
@@ -51,7 +51,7 @@ spec:
         app.kubernetes.io/component: om
     spec:
       {{- if gt (int .Values.om.replicas) 1 }}
-      terminationGracePeriodSeconds: 150
+      terminationGracePeriodSeconds: {{ 
.Values.om.terminationGracePeriodSeconds }}
       {{- end }}
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets: {{- toYaml . | nindent 8 }}
@@ -119,6 +119,17 @@ spec:
                       ozone admin om transfer -id {{ .Values.clusterId }} -r 
|| true
                       sleep 10
                     fi
+          startupProbe:
+            exec:
+              command:
+                - sh
+                - -c
+                - |
+                  ozone admin om roles -id {{ .Values.clusterId }} 2>/dev/null 
| grep -q $(hostname) && exit 0 || exit 1
+            initialDelaySeconds: {{ 
.Values.om.startupProbe.initialDelaySeconds }}
+            periodSeconds: {{ .Values.om.startupProbe.periodSeconds }}
+            failureThreshold: {{ .Values.om.startupProbe.failureThreshold }}
+            timeoutSeconds: {{ .Values.om.startupProbe.timeoutSeconds }}
           readinessProbe:
             exec:
               command:
diff --git a/charts/ozone/templates/scm/scm-statefulset.yaml 
b/charts/ozone/templates/scm/scm-statefulset.yaml
index ca155f6..4a1c4a2 100644
--- a/charts/ozone/templates/scm/scm-statefulset.yaml
+++ b/charts/ozone/templates/scm/scm-statefulset.yaml
@@ -50,7 +50,7 @@ spec:
         app.kubernetes.io/component: scm
     spec:
       {{- if gt (int .Values.scm.replicas) 1 }}
-      terminationGracePeriodSeconds: 150
+      terminationGracePeriodSeconds: {{ 
.Values.scm.terminationGracePeriodSeconds }}
       {{- end }}
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets: {{- toYaml . | nindent 8 }}
@@ -137,6 +137,19 @@ spec:
                       ozone admin scm transfer -id {{ .Values.clusterId }} -r 
|| true
                       sleep 10
                     fi
+          startupProbe:
+            exec:
+              command:
+                - sh
+                - -c
+                - |
+                  ozone admin scm roles 2>/dev/null | grep -q $(hostname -f) \
+                  && ozone admin safemode status 2>/dev/null | grep -q 'out of 
safe mode' \
+                  && exit 0 || exit 1
+            initialDelaySeconds: {{ 
.Values.scm.startupProbe.initialDelaySeconds }}
+            periodSeconds: {{ .Values.scm.startupProbe.periodSeconds }}
+            failureThreshold: {{ .Values.scm.startupProbe.failureThreshold }}
+            timeoutSeconds: {{ .Values.scm.startupProbe.timeoutSeconds }}
           readinessProbe:
             exec:
               command:
diff --git a/charts/ozone/values.yaml b/charts/ozone/values.yaml
index 7d53b96..a01f249 100644
--- a/charts/ozone/values.yaml
+++ b/charts/ozone/values.yaml
@@ -152,6 +152,15 @@ om:
     periodSeconds: 10
     timeoutSeconds: 20
     failureThreshold: 3
+  # Graceful termination period for Ozone Manager HA (om.replicas > 1),
+  # allowing leader transfer to complete before the pod is killed
+  terminationGracePeriodSeconds: 150
+  # Startup probe for Ozone Manager HA (used when om.replicas > 1)
+  startupProbe:
+    initialDelaySeconds: 30
+    periodSeconds: 10
+    timeoutSeconds: 20
+    failureThreshold: 30
   # Ozone Manager service configuration
   service:
     type: ClusterIP
@@ -214,6 +223,15 @@ scm:
     periodSeconds: 10
     timeoutSeconds: 20
     failureThreshold: 3
+  # Graceful termination period for Storage Container Manager HA (scm.replicas 
> 1),
+  # allowing leader transfer to complete before the pod is killed
+  terminationGracePeriodSeconds: 150
+  # Startup probe for Storage Container Manager HA (used when scm.replicas > 1)
+  startupProbe:
+    initialDelaySeconds: 20
+    periodSeconds: 10
+    timeoutSeconds: 20
+    failureThreshold: 30
   # Storage Container Manager service configuration
   service:
     type: ClusterIP


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to