Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added extraEnv, envFrom to statefulset template #7833

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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