Skip to content

Commit

Permalink
added extraEnv, envFrom to statefulset template (#7833)
Browse files Browse the repository at this point in the history
  • Loading branch information
shucle-devops authored Dec 1, 2021
1 parent 5333b6d commit 34782f5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kubernetes/helm/presto/templates/coordinator/statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions kubernetes/helm/presto/templates/worker/statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions kubernetes/helm/presto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 34782f5

Please sign in to comment.