You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2021/12/01 03:29:46 UTC

[pinot] branch master updated: added extraEnv, envFrom to statefulset template (#7833)

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 34782f5  added extraEnv, envFrom to statefulset template (#7833)
34782f5 is described below

commit 34782f5e81a1afaa426b8a7b623b85fa775082fe
Author: 강영주 <79...@users.noreply.github.com>
AuthorDate: Wed Dec 1 12:29:30 2021 +0900

    added extraEnv, envFrom to statefulset template (#7833)
---
 .../presto/templates/coordinator/statefulset.yml   |  6 +++++
 .../helm/presto/templates/worker/statefulset.yml   |  6 +++++
 kubernetes/helm/presto/values.yaml                 | 29 ++++++++++++++++++++++
 3 files changed, 41 insertions(+)

diff --git a/kubernetes/helm/presto/templates/coordinator/statefulset.yml b/kubernetes/helm/presto/templates/coordinator/statefulset.yml
index e44fec9..af95627 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 40eca4b..752b2ab 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 21c449b..55f5c9c 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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org