[CELEBORN-1985][HELM] Add new values master.envFrom and worker.envFrom
### What changes were proposed in this pull request? - Add new value `master.envFrom` - Add new value `worker.envFrom` ### Why are the changes needed? Users are allowed to populate container environment variables from ConfigMap/Secret sources. ### Does this PR introduce _any_ user-facing change? Yes, new values are added. ### How was this patch tested? Run Helm unit tests by `helm unittest charts/celeborn --file "tests/**/*_test.yaml" --strict --debug`. Closes #3233 from ChenYi015/helm/env-from. Authored-by: Yi Chen <github@chenyicn.net> Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
parent
3db9974960
commit
f22e8ee7d8
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user