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

rexxiong 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 c2015a24e [CELEBORN-1953][HELM] Split podAnnotations into 
master.annotations and worker.annotations
c2015a24e is described below

commit c2015a24ec6469f170db3b78b955b0527d2f7483
Author: Yi Chen <[email protected]>
AuthorDate: Sat Apr 12 09:31:23 2025 +0800

    [CELEBORN-1953][HELM] Split podAnnotations into master.annotations and 
worker.annotations
    
    ### What changes were proposed in this pull request?
    
    Split `podAnnotations` into `master.annotations` and `worker.annotations`.
    
    ### Why are the changes needed?
    
    Allow separate customization for master  and worker annotations.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes.
    
    ### How was this patch tested?
    
    Helm unit tests by running `helm unittest charts/celeborn --file 
"tests/**/*_test.yaml" --strict --debug`.
    
    Closes #3196 from ChenYi015/helm/annotations.
    
    Authored-by: Yi Chen <[email protected]>
    Signed-off-by: Shuang <[email protected]>
---
 charts/celeborn/templates/master/statefulset.yaml  |  2 +-
 charts/celeborn/templates/worker/statefulset.yaml  |  2 +-
 charts/celeborn/tests/master/statefulset_test.yaml |  9 +++++----
 charts/celeborn/tests/worker/statefulset_test.yaml |  9 +++++----
 charts/celeborn/values.yaml                        | 15 +++++++++++----
 5 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/charts/celeborn/templates/master/statefulset.yaml 
b/charts/celeborn/templates/master/statefulset.yaml
index 038affe7d..4d4c82c77 100644
--- a/charts/celeborn/templates/master/statefulset.yaml
+++ b/charts/celeborn/templates/master/statefulset.yaml
@@ -31,7 +31,7 @@ spec:
       labels:
         {{- include "celeborn.master.selectorLabels" . | nindent 8 }}
         app.kubernetes.io/tag: {{ .Values.image.tag | quote }}
-      {{- with .Values.podAnnotations }}
+      {{- with .Values.master.annotations }}
       annotations:
         {{- toYaml . | nindent 8 }}
       {{- end }}
diff --git a/charts/celeborn/templates/worker/statefulset.yaml 
b/charts/celeborn/templates/worker/statefulset.yaml
index e7d4bd067..9bc5ce4d0 100644
--- a/charts/celeborn/templates/worker/statefulset.yaml
+++ b/charts/celeborn/templates/worker/statefulset.yaml
@@ -31,7 +31,7 @@ spec:
       labels:
         {{- include "celeborn.worker.selectorLabels" . | nindent 8 }}
         app.kubernetes.io/tag: {{ .Values.image.tag | quote }}
-      {{- with .Values.podAnnotations }}
+      {{- with .Values.worker.annotations }}
       annotations:
         {{- toYaml . | nindent 8 }}
       {{- end }}
diff --git a/charts/celeborn/tests/master/statefulset_test.yaml 
b/charts/celeborn/tests/master/statefulset_test.yaml
index e8846cae5..74d4d8cc7 100644
--- a/charts/celeborn/tests/master/statefulset_test.yaml
+++ b/charts/celeborn/tests/master/statefulset_test.yaml
@@ -24,11 +24,12 @@ release:
   name: celeborn
 
 tests:
-  - it: Should add extra pod annotations if `podAnnotations` is specified
+  - it: Should add extra pod annotations if `master.annotations` is specified
     set:
-      podAnnotations:
-        key1: value1
-        key2: value2
+      master:
+        annotations:
+          key1: value1
+          key2: value2
     asserts:
       - equal:
           path: spec.template.metadata.annotations.key1
diff --git a/charts/celeborn/tests/worker/statefulset_test.yaml 
b/charts/celeborn/tests/worker/statefulset_test.yaml
index d9268b0f6..9080011bf 100644
--- a/charts/celeborn/tests/worker/statefulset_test.yaml
+++ b/charts/celeborn/tests/worker/statefulset_test.yaml
@@ -24,11 +24,12 @@ release:
   name: celeborn
 
 tests:
-  - it: Should add extra pod annotations if `podAnnotations` is specified
+  - it: Should add extra pod annotations if `worker.annotations` is specified
     set:
-      podAnnotations:
-        key1: value1
-        key2: value2
+      worker:
+        annotations:
+          key1: value1
+          key2: value2
     asserts:
       - equal:
           path: spec.template.metadata.annotations.key1
diff --git a/charts/celeborn/values.yaml b/charts/celeborn/values.yaml
index a0d8d8bd6..54077177e 100644
--- a/charts/celeborn/values.yaml
+++ b/charts/celeborn/values.yaml
@@ -186,10 +186,17 @@ priorityClass:
     # -- Specifies the integer value of this priority class, default is 
Celeborn master value minus 1000
     value: 999999000
 
-# -- Pod annotations
-podAnnotations: {}
-# key1: value1
-# key2: value2
+master:
+  # -- Annotations for Celeborn master pods.
+  annotations:
+    # key1: value1
+    # key2: value2
+
+worker:
+  # -- Annotations for Celeborn worker pods.
+  annotations:
+    # key1: value1
+    # key2: value2
 
 # -- Pod node selector
 nodeSelector: {}

Reply via email to