diff --git a/kubernetes/helm/presto/templates/coordinator/statefulset.yml b/kubernetes/helm/presto/templates/coordinator/statefulset.yml index e44fec9e4274..af95627cf536 100644 --- a/kubernetes/helm/presto/templates/coordinator/statefulset.yml +++ b/kubernetes/helm/presto/templates/coordinator/statefulset.yml @@ -62,6 +62,12 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: [ "run" ] + env: +{{- if .Values.coordinator.extraEnv }} +{{ toYaml .Values.coordinator.extraEnv | indent 10 }} +{{- end}} + envFrom: +{{ toYaml .Values.coordinator.envFrom | indent 10 }} ports: - containerPort: {{ .Values.coordinator.port }} protocol: TCP diff --git a/kubernetes/helm/presto/templates/worker/statefulset.yml b/kubernetes/helm/presto/templates/worker/statefulset.yml index 40eca4b5f241..752b2aba3619 100644 --- a/kubernetes/helm/presto/templates/worker/statefulset.yml +++ b/kubernetes/helm/presto/templates/worker/statefulset.yml @@ -62,6 +62,12 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: [ "run" ] + env: +{{- if .Values.worker.extraEnv }} +{{ toYaml .Values.worker.extraEnv | indent 10 }} +{{- end}} + envFrom: +{{ toYaml .Values.worker.envFrom | indent 10 }} ports: - containerPort: {{ .Values.worker.port }} protocol: TCP diff --git a/kubernetes/helm/presto/values.yaml b/kubernetes/helm/presto/values.yaml index 21c449b6dc64..55f5c9c6eabf 100644 --- a/kubernetes/helm/presto/values.yaml +++ b/kubernetes/helm/presto/values.yaml @@ -101,6 +101,20 @@ coordinator: updateStrategy: type: RollingUpdate + # Use envFrom to define all of the ConfigMap or Secret data as container environment variables. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables + # ref: https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#configure-all-key-value-pairs-in-a-secret-as-container-environment-variables + envFrom: [] + # - configMapRef: + # name: special-config + # - secretRef: + # name: test-secret + + # Use extraEnv to add individual key value pairs as container environment variables. + # ref: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ + extraEnv: [] + # - name: TZ + # value: Asia/Seoul worker: name: worker @@ -160,3 +174,18 @@ worker: updateStrategy: type: RollingUpdate + + # Use envFrom to define all of the ConfigMap or Secret data as container environment variables. + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables + # ref: https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#configure-all-key-value-pairs-in-a-secret-as-container-environment-variables + envFrom: [] + # - configMapRef: + # name: special-config + # - secretRef: + # name: test-secret + + # Use extraEnv to add individual key value pairs as container environment variables. + # ref: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ + extraEnv: [] + # - name: TZ + # value: Asia/Seoul \ No newline at end of file