You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xx...@apache.org on 2022/06/17 06:28:25 UTC

[pulsar-helm-chart] 01/01: Support defining extra env for broker and proxy statefulsset.

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

xxc pushed a commit to branch zxc/broker-extraenv
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git

commit 909a8c3b6def5ea0a150e59294fd8cf823db9740
Author: Marvin Cai <zx...@streamnative.io>
AuthorDate: Fri Jun 17 14:27:44 2022 +0800

    Support defining extra env for broker and proxy statefulsset.
---
 charts/pulsar/templates/broker-statefulset.yaml |  4 ++++
 charts/pulsar/templates/proxy-statefulset.yaml  |  4 ++++
 charts/pulsar/values.yaml                       | 14 +++++++++++++-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/charts/pulsar/templates/broker-statefulset.yaml b/charts/pulsar/templates/broker-statefulset.yaml
index 1b56d95..333ac54 100644
--- a/charts/pulsar/templates/broker-statefulset.yaml
+++ b/charts/pulsar/templates/broker-statefulset.yaml
@@ -227,6 +227,10 @@ spec:
         - name: "{{ .Values.tlsPrefix }}pulsarssl"
           containerPort: {{ .Values.broker.ports.pulsarssl }}
         {{- end }}
+{{- if .Values.broker.extreEnvs }}
+        env:
+{{ toYaml .Values.broker.extreEnvs | indent 8 }}
+{{- end }}
         envFrom:
         - configMapRef:
             name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
diff --git a/charts/pulsar/templates/proxy-statefulset.yaml b/charts/pulsar/templates/proxy-statefulset.yaml
index 1dc739b..a70811c 100644
--- a/charts/pulsar/templates/proxy-statefulset.yaml
+++ b/charts/pulsar/templates/proxy-statefulset.yaml
@@ -202,6 +202,10 @@ spec:
         securityContext:
           readOnlyRootFilesystem: false
       {{- end }}
+{{- if .Values.proxy.extreEnvs }}
+        env:
+{{ toYaml .Values.proxy.extreEnvs | indent 8 }}
+{{- end }}
         envFrom:
         - configMapRef:
             name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml
index 4c6b5c4..ce6cce0 100644
--- a/charts/pulsar/values.yaml
+++ b/charts/pulsar/values.yaml
@@ -740,6 +740,12 @@ broker:
   #     readOnly: true
   extraVolumes: []
   extraVolumeMounts: []
+  extreEnvs: []
+#    - name: POD_NAME
+#      valueFrom:
+#        fieldRef:
+#          apiVersion: v1
+#          fieldPath: metadata.name
   ## Broker configmap
   ## templates/broker-configmap.yaml
   ##
@@ -856,6 +862,12 @@ proxy:
   #     readOnly: true
   extraVolumes: []
   extraVolumeMounts: []
+  extreEnvs: []
+#    - name: POD_IP
+#      valueFrom:
+#        fieldRef:
+#          apiVersion: v1
+#          fieldPath: status.podIP
   ## Proxy configmap
   ## templates/proxy-configmap.yaml
   ##
@@ -1162,4 +1174,4 @@ pulsar_manager:
 job:
   ttl:
     enabled: false
-    secondsAfterFinished: 3600
\ No newline at end of file
+    secondsAfterFinished: 3600