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

zaynt4606 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new d8060a6df5 [CELEBORN-2464] Wire Kubernetes health probes into the Helm 
chart
d8060a6df5 is described below

commit d8060a6df54ee18b5b1a67f068c61a02cb632b05
Author: strelok89 <[email protected]>
AuthorDate: Sat Nov 14 20:41:10 2026 +0800

    [CELEBORN-2464] Wire Kubernetes health probes into the Helm chart
    
    ### What changes were proposed in this pull request?
    
    Follow-up to 
[CELEBORN-2447](https://issues.apache.org/jira/browse/CELEBORN-2447) / #3832, 
which added `GET /healthz` to master and worker. The chart defined no 
`startupProbe`, `livenessProbe` or `readinessProbe` for either role, so nothing 
consumed the endpoint.
    
    This adds values-driven probes for both roles: `master.startupProbe`, 
`master.livenessProbe`, `master.readinessProbe` and the matching `worker.*`. 
Each value is a complete Kubernetes probe object, passed through as it is.
    
    **All probes are off by default.** `/healthz` was added after Celeborn 
0.7.0, the release the chart deploys through `appVersion`, so probes pointed at 
it would never pass against the default image. The README gives a working 
configuration for images that serve the endpoint:
    
    | | master | worker |
    |---|---|---|
    | `startupProbe` | `/healthz`, 30 x 10s | off |
    | `livenessProbe` | `/healthz`, 6 x 10s | off |
    | `readinessProbe` | off | `/healthz`, 3 x 10s |
    
    The recommended shape is asymmetric because the two checks mean different 
things:
    
    - **Worker readiness** is the reason the endpoint exists: it reports 
healthy only once the worker has finished initializing and registered with the 
master, which is the gate a rolling update needs.
    - **Worker liveness** should stay off. Worker `/healthz` returns `503` 
while the worker is unregistered, so a liveness probe on it would restart every 
worker in the cluster during a master outage or failover. The README points at 
a `tcpSocket` check on the RPC port for deployments that want one.
    - **Master startup and liveness** are safe to restart on, since the master 
check is shallow. The master container blocks on `nslookup` of every master 
peer before starting, so the startup probe covers that window and keeps 
liveness from firing when a replica is slow to be scheduled.
    
    Also adds `master.podManagementPolicy` and `worker.podManagementPolicy`, 
both unset by default. With zone-aware replication, the worker policy and 
probes apply to every zone's statefulset.
    
    ### Why are the changes needed?
    
    Without a readiness probe a StatefulSet marks a worker pod Ready as soon as 
its container process starts and immediately proceeds to the next ordinal, 
before the restarted worker has re-registered with the master. On a large 
cluster a routine rolling update can remove a meaningful fraction of workers 
from service before any of them rejoin.
    
    Design points worth calling out for review:
    
    **Master startup and readiness probes deadlock a cold start under 
`OrderedReady`.** A master does not start serving until the DNS records of all 
master replicas resolve, and with the default pod management policy the 
controller does not create `master-1` until `master-0` is Ready. A startup 
probe gates readiness just as a readiness probe does, so a probed `master-0` 
waits for a pod that will never be created. The chart therefore refuses to 
render `master.startupProbe` or `master.readi [...]
    
    **`publishNotReadyAddresses` on the master service is required, not 
cosmetic.** A headless service publishes a pod's per-pod DNS record only once 
that pod is ready, and both the startup wait and `celeborn.master.endpoints` 
address masters by those per-pod names, so a ready-gated master would withhold 
the very record its peers are waiting for. The master service always sets it.
    
    **The worker service sets `publishNotReadyAddresses` only when it is 
needed:** when `worker.startupProbe` or `worker.readinessProbe` is set, so DNS 
and endpoints behave as they did before readiness was gated, or when 
`worker.drain` is enabled, as before. Default installs keep the worker service 
unchanged.
    
    One operational consequence is documented rather than worked around, 
matching what was agreed on CELEBORN-2447: a worker parked with 
`DecommissionThenIdle` reports `Idle`, which `/healthz` treats as not serving 
because the master does not schedule to it either, so a rolling update stalls 
at that ordinal until the worker is recommissioned or `worker.readinessProbe` 
is unset for that rollout.
    
    ### Does this PR resolve a correctness bug?
    
    - [ ] Yes
    
    ### Does this PR introduce _any_ user-facing change?
    
    - [x] Yes
    
    New opt-in values: `master.startupProbe`, `master.livenessProbe`, 
`master.readinessProbe`, `master.podManagementPolicy` and the matching 
`worker.*`. The master headless service now publishes not-ready addresses, and 
the worker headless service does so when a worker startup or readiness probe is 
set. With the defaults, no probes are rendered and pod management stays 
`OrderedReady`. Documented in `charts/celeborn/README.md`.
    
    ### How was this patch tested?
    
    New `helm unittest` cases for both roles covering the defaults (no probes), 
overrides, probe removal via `null`, the pod management policy (including on 
every zone statefulset), the refusal of master startup/readiness probes without 
`Parallel`, a fresh default three-master render, and `publishNotReadyAddresses` 
on both services.
    
    `helm unittest charts/celeborn --file "tests/**/*_test.yaml" --strict` 
passes (152 tests, 13 suites) and `helm lint charts/celeborn` is clean. 
Rendered output with zone-aware replication, drain, a worker readiness probe 
and `Parallel` combined was inspected with `helm template`.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Closes #3854 from strelok89/CELEBORN-2464.
    
    Authored-by: strelok89 <[email protected]>
    Signed-off-by: zhengtao <[email protected]>
    
    AI-Contributed/Feature: 0/209
    AI-Contributed/UT: 0/208
---
 charts/celeborn/README.md                          |  98 ++++++++++++++++++
 charts/celeborn/templates/master/service.yaml      |   2 +
 charts/celeborn/templates/master/statefulset.yaml  |  19 ++++
 charts/celeborn/templates/worker/service.yaml      |   4 +-
 charts/celeborn/templates/worker/statefulset.yaml  |  15 +++
 charts/celeborn/tests/master/service_test.yaml     |   9 ++
 charts/celeborn/tests/master/statefulset_test.yaml | 113 +++++++++++++++++++++
 charts/celeborn/tests/worker/service_test.yaml     |  12 +++
 charts/celeborn/tests/worker/statefulset_test.yaml |  74 ++++++++++++++
 charts/celeborn/values.yaml                        |  71 +++++++++++++
 10 files changed, 415 insertions(+), 2 deletions(-)

diff --git a/charts/celeborn/README.md b/charts/celeborn/README.md
index c2886828ce..89ea2141b0 100644
--- a/charts/celeborn/README.md
+++ b/charts/celeborn/README.md
@@ -391,6 +391,104 @@ KEDA has settled, or pass `--set 
worker.replicas=<current>` when upgrading.
 For a continuous-delivery tool, tell it to ignore the field - in Argo CD, 
`ignoreDifferences`
 on `/spec/replicas` for the worker statefulsets, with 
`RespectIgnoreDifferences=true`.
 
+## Health probes
+
+Both the master and the worker serve `GET /healthz` on their HTTP port, 
returning `200` when the
+process can serve and `503` when it cannot. The chart wires probes to that 
endpoint through
+`master.startupProbe`, `master.livenessProbe`, `master.readinessProbe` and the 
matching `worker.*`
+values. Each value is a complete Kubernetes probe object, passed through as it 
is.
+
+All probes are off by default. `/healthz` was added after Celeborn 0.7.0, the 
release the chart
+deploys by default, so probes pointed at it would never pass against that 
image: workers would
+stay NotReady and masters would be restarted. Enable them only with an image 
that serves
+`/healthz`.
+
+With such an image, a working setup looks like this:
+
+```yaml
+master:
+  podManagementPolicy: Parallel   # immutable - see "Readiness and pod 
management policy"
+  startupProbe:
+    httpGet:
+      path: /healthz
+      port: metrics
+    periodSeconds: 10
+    timeoutSeconds: 5
+    failureThreshold: 30
+  livenessProbe:
+    httpGet:
+      path: /healthz
+      port: metrics
+    periodSeconds: 10
+    timeoutSeconds: 5
+    failureThreshold: 6
+
+worker:
+  readinessProbe:
+    httpGet:
+      path: /healthz
+      port: metrics
+    initialDelaySeconds: 10
+    periodSeconds: 10
+    timeoutSeconds: 5
+    failureThreshold: 3
+```
+
+The reasoning behind that shape:
+
+- The master check is shallow - it reports healthy once the master HTTP 
service is up - so it is
+  safe to restart on. Pair the liveness probe with a startup probe, which 
holds it off while a
+  master waits for the DNS records of its peers; that can take a while if one 
replica is slow to
+  be scheduled. The startup probe allows `failureThreshold` x `periodSeconds` 
- 300s above.
+- The worker readiness check is the reason the probes exist: it reports 
healthy only after the
+  worker has finished initializing and registered with the master, which stops 
a rolling update
+  from moving on to the next worker while the previous one still rejects 
traffic.
+- Leave the worker liveness probe off. Worker `/healthz` fails while the 
worker is not registered
+  with the master, so a liveness probe on it would restart every worker in the 
cluster during a
+  master outage or failover. If one is wanted, use a `tcpSocket` check on the 
RPC port.
+
+### Parked workers and rolling updates
+
+A worker parked with `DecommissionThenIdle` reports state `Idle`, which 
`/healthz` treats as not
+serving, because the master does not schedule to an `Idle` worker either. Its 
pod therefore stays
+NotReady and a rolling update will not advance past that ordinal. Recommission 
parked workers
+before upgrading.
+
+Setting `worker.readinessProbe: null` does not unblock a rollout that a parked 
worker is already
+holding. It changes only the pod template: the parked pod keeps the probe it 
was created with,
+and with the default `OrderedReady` policy the controller waits for that pod 
to become Ready
+before it updates anything. Either recommission the worker, so its readiness 
returns, or delete
+its pod, so the statefulset recreates it from the current template.
+
+### Readiness and pod management policy
+
+The master and worker statefulsets leave `podManagementPolicy` unset, which 
means
+`OrderedReady`: no replica is created until the previous one is ready. A 
master does not start
+serving until the DNS records of all master replicas resolve, so a ready-gated 
master-0 would wait for a master-1 that the
+statefulset controller will not create until master-0 is ready. A startup 
probe gates readiness
+as much as a readiness probe does - a container is not ready until its startup 
probe passes - so
+the chart refuses to render `master.startupProbe` or `master.readinessProbe` 
with more than one
+master unless `master.podManagementPolicy` is `Parallel`.
+
+Worker readiness has no such cycle - workers wait on master DNS, not on each 
other - but under
+`OrderedReady` it does serialize a cold start, since each worker is created 
only after the
+previous one has registered. Set `worker.podManagementPolicy: Parallel` to 
start them all at
+once; rolling updates stay gated by readiness either way. With zone-aware 
replication the policy
+applies to every zone's statefulset.
+
+`podManagementPolicy` is immutable. Changing it on an existing release makes 
`helm upgrade` fail,
+and the statefulset - each zone's, with zone-aware replication - has to be 
deleted with
+`--cascade=orphan` and re-applied first.
+
+The master headless service always sets `publishNotReadyAddresses: true`. This 
is
+required rather than cosmetic: a headless service only publishes the per-pod 
DNS record of a pod
+once it is ready, and both the startup wait and `celeborn.master.endpoints` 
address masters by
+those per-pod names, so a ready-gated master would withhold the very record 
its peers wait for.
+The worker service sets it whenever `worker.startupProbe` or 
`worker.readinessProbe` is set, to
+keep DNS and endpoints behaving as they did before readiness was gated, so 
that a worker
+recovering from deregistration stays addressable. It also sets it when 
`worker.drain` is enabled -
+see [Draining a worker before it is 
removed](#draining-a-worker-before-it-is-removed).
+
 ## Documentation
 
 For additional details on deploying the Celeborn Kubernetes Helm chart, please 
refer to the [Celeborn on 
Kubernetes](https://celeborn.apache.org/docs/latest/deploy_on_k8s/) 
documentation.
diff --git a/charts/celeborn/templates/master/service.yaml 
b/charts/celeborn/templates/master/service.yaml
index 5c43af9cf5..5b83678aff 100644
--- a/charts/celeborn/templates/master/service.yaml
+++ b/charts/celeborn/templates/master/service.yaml
@@ -66,3 +66,5 @@ spec:
     name: celeborn-master
   type: {{ .Values.service.type }}
   clusterIP: None
+  # Masters discover each other through this service before they are ready. 
See README.md.
+  publishNotReadyAddresses: true
diff --git a/charts/celeborn/templates/master/statefulset.yaml 
b/charts/celeborn/templates/master/statefulset.yaml
index 086fa1fd00..49cbd0960a 100644
--- a/charts/celeborn/templates/master/statefulset.yaml
+++ b/charts/celeborn/templates/master/statefulset.yaml
@@ -24,6 +24,13 @@ metadata:
     {{- include "celeborn.master.labels" . | nindent 4 }}
 spec:
   replicas: {{ .Values.master.replicas }}
+  {{- with .Values.master.podManagementPolicy }}
+  podManagementPolicy: {{ . }}
+  {{- end }}
+  {{- /* A master waits for every peer's DNS record, so a probe gating 
readiness deadlocks OrderedReady. See README.md. */}}
+  {{- if and (or .Values.master.startupProbe .Values.master.readinessProbe) 
(gt (.Values.master.replicas | int) 1) (ne .Values.master.podManagementPolicy 
"Parallel") }}
+  {{- fail "master.startupProbe and master.readinessProbe require 
master.podManagementPolicy: Parallel: a master waits for all its peers before 
serving, and OrderedReady does not create the next master until the previous 
one is ready" }}
+  {{- end }}
   selector:
     matchLabels:
       {{- include "celeborn.master.selectorLabels" . | nindent 6 }}
@@ -133,6 +140,18 @@ spec:
         {{- with .Values.master.volumeMounts }}
         {{- toYaml . | nindent 8 }}
         {{- end }}
+        {{- with .Values.master.startupProbe }}
+        startupProbe:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+        {{- with .Values.master.livenessProbe }}
+        livenessProbe:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+        {{- with .Values.master.readinessProbe }}
+        readinessProbe:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
         {{- with .Values.master.resources }}
         resources:
           {{- toYaml . | nindent 10 }}
diff --git a/charts/celeborn/templates/worker/service.yaml 
b/charts/celeborn/templates/worker/service.yaml
index c4fb93f618..c03fc3d190 100644
--- a/charts/celeborn/templates/worker/service.yaml
+++ b/charts/celeborn/templates/worker/service.yaml
@@ -29,8 +29,8 @@ spec:
     {{- include "celeborn.worker.selectorLabels" . | nindent 4 }}
   type: {{ .Values.service.type }}
   clusterIP: None
-  {{- if .Values.worker.drain.enabled }}
-  # Keep a draining worker resolvable until it exits. See README.md.
+  {{- if or .Values.worker.drain.enabled .Values.worker.startupProbe 
.Values.worker.readinessProbe }}
+  # Keep a draining or not yet ready worker resolvable. See README.md.
   publishNotReadyAddresses: true
   {{- end }}
   {{- include "celeborn.worker.service.port" . | nindent 2 }}
diff --git a/charts/celeborn/templates/worker/statefulset.yaml 
b/charts/celeborn/templates/worker/statefulset.yaml
index 06664063dc..65109b0dba 100644
--- a/charts/celeborn/templates/worker/statefulset.yaml
+++ b/charts/celeborn/templates/worker/statefulset.yaml
@@ -73,6 +73,9 @@ metadata:
     {{- include "celeborn.worker.labels" . | nindent 4 }}
 spec:
   replicas: {{ include "celeborn.worker.replicas" . }}
+  {{- with .Values.worker.podManagementPolicy }}
+  podManagementPolicy: {{ . }}
+  {{- end }}
   selector:
     matchLabels:
       {{- include "celeborn.worker.selectorLabels" . | nindent 6 }}
@@ -219,6 +222,18 @@ spec:
         {{- with .Values.worker.volumeMounts }}
         {{- toYaml . | nindent 8 }}
         {{- end }}
+        {{- with .Values.worker.startupProbe }}
+        startupProbe:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+        {{- with .Values.worker.livenessProbe }}
+        livenessProbe:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+        {{- with .Values.worker.readinessProbe }}
+        readinessProbe:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
         {{- if $drain }}
         {{- /* The drain logic lives in files/worker-drain.sh, shipped in the 
config map. */}}
         lifecycle:
diff --git a/charts/celeborn/tests/master/service_test.yaml 
b/charts/celeborn/tests/master/service_test.yaml
index 7e792963f8..fe73ccb673 100644
--- a/charts/celeborn/tests/master/service_test.yaml
+++ b/charts/celeborn/tests/master/service_test.yaml
@@ -82,3 +82,12 @@ tests:
         equal:
           path: spec.ports[0].nodePort
           value: 30102
+
+  - it: Should publish not ready addresses on the headless service
+    asserts:
+      - documentSelector:
+          path: metadata.name
+          value: celeborn-master-svc
+        equal:
+          path: spec.publishNotReadyAddresses
+          value: true
diff --git a/charts/celeborn/tests/master/statefulset_test.yaml 
b/charts/celeborn/tests/master/statefulset_test.yaml
index f19c883df2..5c0c2f1770 100644
--- a/charts/celeborn/tests/master/statefulset_test.yaml
+++ b/charts/celeborn/tests/master/statefulset_test.yaml
@@ -509,6 +509,119 @@ tests:
                 limits:
                   storage: 200Gi
 
+  - it: Should render a fresh install with three masters and no probes by 
default
+    template: master/statefulset.yaml
+    asserts:
+      - equal:
+          path: spec.replicas
+          value: 3
+      - notExists:
+          path: spec.podManagementPolicy
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].startupProbe
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].readinessProbe
+
+  - it: Should use the specified probes if `master.startupProbe`, 
`master.livenessProbe` and `master.readinessProbe` are set
+    template: master/statefulset.yaml
+    set:
+      master:
+        podManagementPolicy: Parallel
+        startupProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+          failureThreshold: 30
+        livenessProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+          initialDelaySeconds: 120
+          failureThreshold: 10
+        readinessProbe:
+          tcpSocket:
+            port: 9097
+    asserts:
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].startupProbe.failureThreshold
+          value: 30
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe.initialDelaySeconds
+          value: 120
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe.failureThreshold
+          value: 10
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].readinessProbe.tcpSocket.port
+          value: 9097
+
+  - it: Should allow a master liveness probe without `Parallel`, since it does 
not gate readiness
+    template: master/statefulset.yaml
+    set:
+      master:
+        livenessProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+    asserts:
+      - exists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe
+
+  - it: Should fail a master startup probe under the default `OrderedReady` 
policy
+    template: master/statefulset.yaml
+    set:
+      master:
+        startupProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+    asserts:
+      - failedTemplate:
+          errorMessage: "master.startupProbe and master.readinessProbe require 
master.podManagementPolicy: Parallel: a master waits for all its peers before 
serving, and OrderedReady does not create the next master until the previous 
one is ready"
+
+  - it: Should fail a master readiness probe under the default `OrderedReady` 
policy
+    template: master/statefulset.yaml
+    set:
+      master:
+        readinessProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+    asserts:
+      - failedTemplate:
+          errorMessage: "master.startupProbe and master.readinessProbe require 
master.podManagementPolicy: Parallel: a master waits for all its peers before 
serving, and OrderedReady does not create the next master until the previous 
one is ready"
+
+  - it: Should allow a master startup probe under `OrderedReady` with a single 
master
+    template: master/statefulset.yaml
+    set:
+      master:
+        replicas: 1
+        startupProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+    asserts:
+      - exists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].startupProbe
+
+  - it: Should not set pod management policy by default
+    template: master/statefulset.yaml
+    asserts:
+      - notExists:
+          path: spec.podManagementPolicy
+
+  - it: Should use the specified pod management policy if 
`master.podManagementPolicy` is set
+    template: master/statefulset.yaml
+    set:
+      master:
+        podManagementPolicy: Parallel
+    asserts:
+      - equal:
+          path: spec.podManagementPolicy
+          value: Parallel
+
   - it: Should add extra init containers when `master.extraInitContainers` is 
set
     template: master/statefulset.yaml
     set:
diff --git a/charts/celeborn/tests/worker/service_test.yaml 
b/charts/celeborn/tests/worker/service_test.yaml
index 291f5cce86..ce10f0f51f 100644
--- a/charts/celeborn/tests/worker/service_test.yaml
+++ b/charts/celeborn/tests/worker/service_test.yaml
@@ -62,3 +62,15 @@ tests:
       - equal:
           path: spec.publishNotReadyAddresses
           value: true
+
+  - it: Should publish not-ready addresses when a worker readiness probe is set
+    set:
+      worker:
+        readinessProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+    asserts:
+      - equal:
+          path: spec.publishNotReadyAddresses
+          value: true
diff --git a/charts/celeborn/tests/worker/statefulset_test.yaml 
b/charts/celeborn/tests/worker/statefulset_test.yaml
index ce8661be91..9f40b5c8f7 100644
--- a/charts/celeborn/tests/worker/statefulset_test.yaml
+++ b/charts/celeborn/tests/worker/statefulset_test.yaml
@@ -967,3 +967,77 @@ tests:
       - notMatchRegex:
           path: spec.template.spec.containers[0].command[4]
           pattern: id -u
+
+  - it: Should not add probes by default
+    template: worker/statefulset.yaml
+    asserts:
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].readinessProbe
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].startupProbe
+
+  - it: Should use the specified probes if `worker.livenessProbe` and 
`worker.readinessProbe` are set
+    template: worker/statefulset.yaml
+    set:
+      worker:
+        livenessProbe:
+          tcpSocket:
+            port: 9096
+          periodSeconds: 30
+        readinessProbe:
+          httpGet:
+            path: /healthz
+            port: metrics
+          initialDelaySeconds: 60
+    asserts:
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe.tcpSocket.port
+          value: 9096
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].livenessProbe.periodSeconds
+          value: 30
+      - equal:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].readinessProbe.initialDelaySeconds
+          value: 60
+
+  - it: Should not add a readiness probe if `worker.readinessProbe` is empty
+    template: worker/statefulset.yaml
+    set:
+      worker:
+        readinessProbe: null
+    asserts:
+      - notExists:
+          path: 
spec.template.spec.containers[?(@.name=="celeborn")].readinessProbe
+
+  - it: Should not set pod management policy by default
+    template: worker/statefulset.yaml
+    asserts:
+      - notExists:
+          path: spec.podManagementPolicy
+
+  - it: Should use the specified pod management policy if 
`worker.podManagementPolicy` is set
+    template: worker/statefulset.yaml
+    set:
+      worker:
+        podManagementPolicy: Parallel
+    asserts:
+      - equal:
+          path: spec.podManagementPolicy
+          value: Parallel
+
+  - it: Should set the pod management policy on every zone statefulset
+    template: worker/statefulset.yaml
+    set:
+      worker:
+        podManagementPolicy: Parallel
+        zoneAwareReplication:
+          enabled: true
+          zones:
+            - name: us-east-1a
+            - name: us-east-1b
+    asserts:
+      - equal:
+          path: spec.podManagementPolicy
+          value: Parallel
diff --git a/charts/celeborn/values.yaml b/charts/celeborn/values.yaml
index 2100957e70..678b50194b 100644
--- a/charts/celeborn/values.yaml
+++ b/charts/celeborn/values.yaml
@@ -96,6 +96,12 @@ master:
   # -- Number of Celeborn master replicas to deploy, should not less than 3.
   replicas: 3
 
+  # -- Pod management policy for the Celeborn master statefulset, empty means 
`OrderedReady`.
+  # `Parallel` is required when `master.startupProbe` or 
`master.readinessProbe` is set. The
+  # field is immutable, so changing it on an existing release requires 
recreating the
+  # statefulset. See README.md.
+  podManagementPolicy: ""
+
   # -- Annotations for Celeborn master pods.
   annotations:
     # key1: value1
@@ -126,6 +132,37 @@ master:
   - name: celeborn-ratis
     mountPath: /mnt/celeborn_ratis
 
+  # -- Startup probe for Celeborn master containers. Disabled by default: 
`/healthz` needs a
+  # Celeborn release that serves it, and the probe gates readiness, so it 
requires
+  # `master.podManagementPolicy: Parallel`. See README.md.
+  startupProbe:
+    # httpGet:
+    #   path: /healthz
+    #   port: metrics
+    # periodSeconds: 10
+    # timeoutSeconds: 5
+    # failureThreshold: 30
+
+  # -- Liveness probe for Celeborn master containers. Disabled by default: 
`/healthz` needs a
+  # Celeborn release that serves it. Pair it with `master.startupProbe`, or 
the liveness probe
+  # restarts a master still waiting for its peers. See README.md.
+  livenessProbe:
+    # httpGet:
+    #   path: /healthz
+    #   port: metrics
+    # periodSeconds: 10
+    # timeoutSeconds: 5
+    # failureThreshold: 6
+
+  # -- Readiness probe for Celeborn master containers. Disabled by default: a 
master waits for the
+  # DNS records of all master replicas before it starts serving, and with the 
default
+  # `OrderedReady` pod management no further replica is created until the 
previous one is ready.
+  # Requires `master.podManagementPolicy: Parallel`. See README.md.
+  readinessProbe:
+    # httpGet:
+    #   path: /healthz
+    #   port: metrics
+
   # -- Resources for Celeborn master containers.
   resources:
     # requests:
@@ -254,6 +291,12 @@ worker:
     #   # -- Affinity for this zone. Replaces `worker.affinity` when set.
     #   affinity: {}
 
+  # -- Pod management policy for the Celeborn worker statefulsets, empty means 
`OrderedReady`.
+  # With `OrderedReady`, `worker.readinessProbe` also serializes a cold start; 
`Parallel` starts
+  # all workers at once. The field is immutable, so changing it on an existing 
release requires
+  # recreating the statefulset. See README.md.
+  podManagementPolicy: ""
+
   # -- Value for terminationGracePeriodSeconds for worker pods. Raise it above
   # `celeborn.worker.decommission.forceExitTimeout` when `worker.drain` is 
enabled, otherwise
   # kubelet kills a draining worker before it finishes. See README.md.
@@ -372,6 +415,34 @@ worker:
   - name: disk4
     mountPath: /mnt/disk4
 
+  # -- Startup probe for Celeborn worker containers. Disabled by default, 
since no liveness probe
+  # is configured by default either.
+  startupProbe:
+    # httpGet:
+    #   path: /healthz
+    #   port: metrics
+
+  # -- Liveness probe for Celeborn worker containers. Disabled by default: 
worker `/healthz`
+  # fails while the worker is not registered with the master, so a liveness 
probe on it would
+  # restart every worker during a master outage. See README.md.
+  livenessProbe:
+    # httpGet:
+    #   path: /healthz
+    #   port: metrics
+
+  # -- Readiness probe for Celeborn worker containers. `/healthz` reports 
healthy only once the
+  # worker is initialized and registered with the master, which keeps a 
rolling update from
+  # advancing to the next worker too early. Disabled by default: it needs a 
Celeborn release
+  # that serves `/healthz`. See README.md.
+  readinessProbe:
+    # httpGet:
+    #   path: /healthz
+    #   port: metrics
+    # initialDelaySeconds: 10
+    # periodSeconds: 10
+    # timeoutSeconds: 5
+    # failureThreshold: 3
+
   # -- Resources for Celeborn worker containers.
   resources:
     # requests:

Reply via email to