diff --git a/charts/celeborn/templates/master/statefulset.yaml b/charts/celeborn/templates/master/statefulset.yaml index 96835392d..0ec4e4614 100644 --- a/charts/celeborn/templates/master/statefulset.yaml +++ b/charts/celeborn/templates/master/statefulset.yaml @@ -88,6 +88,10 @@ spec: env: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.master.envFrom }} + envFrom: + {{- toYaml . | nindent 8 }} + {{- end }} volumeMounts: - name: {{ include "celeborn.fullname" . }}-volume mountPath: /opt/celeborn/conf diff --git a/charts/celeborn/templates/worker/statefulset.yaml b/charts/celeborn/templates/worker/statefulset.yaml index 9b7db194b..9bab89751 100644 --- a/charts/celeborn/templates/worker/statefulset.yaml +++ b/charts/celeborn/templates/worker/statefulset.yaml @@ -91,6 +91,10 @@ spec: env: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.worker.envFrom }} + envFrom: + {{- toYaml . | nindent 8 }} + {{- end }} volumeMounts: - mountPath: /opt/celeborn/conf name: {{ include "celeborn.fullname" . }}-volume diff --git a/charts/celeborn/tests/master/statefulset_test.yaml b/charts/celeborn/tests/master/statefulset_test.yaml index 41833ef5e..7d09af67e 100644 --- a/charts/celeborn/tests/master/statefulset_test.yaml +++ b/charts/celeborn/tests/master/statefulset_test.yaml @@ -101,6 +101,30 @@ tests: key: test-key optional: false + - it: Should add environment variable sources if `master.envFrom` is set + set: + master: + envFrom: + - configMapRef: + name: test-configmap + optional: false + - secretRef: + name: test-secret + optional: false + asserts: + - contains: + path: spec.template.spec.containers[0].envFrom + content: + configMapRef: + name: test-configmap + optional: false + - contains: + path: spec.template.spec.containers[0].envFrom + content: + secretRef: + name: test-secret + optional: false + - it: Should use the specified resources if `master.resources` is set set: master: diff --git a/charts/celeborn/tests/worker/statefulset_test.yaml b/charts/celeborn/tests/worker/statefulset_test.yaml index 1030f374b..ba2f63a50 100644 --- a/charts/celeborn/tests/worker/statefulset_test.yaml +++ b/charts/celeborn/tests/worker/statefulset_test.yaml @@ -101,6 +101,30 @@ tests: key: test-key optional: false + - it: Should add environment variable sources if `worker.envFrom` is set + set: + worker: + envFrom: + - configMapRef: + name: test-configmap + optional: false + - secretRef: + name: test-secret + optional: false + asserts: + - contains: + path: spec.template.spec.containers[0].envFrom + content: + configMapRef: + name: test-configmap + optional: false + - contains: + path: spec.template.spec.containers[0].envFrom + content: + secretRef: + name: test-secret + optional: false + - it: Should use the specified resources if `worker.resources` is set set: worker: diff --git a/charts/celeborn/values.yaml b/charts/celeborn/values.yaml index 61f69c0d6..9733be018 100644 --- a/charts/celeborn/values.yaml +++ b/charts/celeborn/values.yaml @@ -155,6 +155,15 @@ master: - name: TZ value: Asia/Shanghai + # -- Environment variable sources for Celeborn master containers. + envFrom: + # - configMapRef: + # name: celeborn-configmap + # optional: false + # - secretRef: + # name: celeborn-secret + # optional: false + # -- Resources for Celeborn master containers. resources: # requests: @@ -223,6 +232,15 @@ worker: - name: TZ value: Asia/Shanghai + # -- Environment variable sources for Celeborn worker containers. + envFrom: + # - configMapRef: + # name: celeborn-configmap + # optional: false + # - secretRef: + # name: celeborn-secret + # optional: false + # -- Resources for Celeborn worker containers. resources: # requests: