You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2021/01/08 05:25:00 UTC
[pulsar-helm-chart] branch master updated: Allow use of existing
secret for pulsar manager credentials (#69)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 8d5339f Allow use of existing secret for pulsar manager credentials (#69)
8d5339f is described below
commit 8d5339f9ff48775f9e433c3cb5c9e801f3a19683
Author: Jiří Pinkava <j-...@seznam.cz>
AuthorDate: Fri Jan 8 06:24:52 2021 +0100
Allow use of existing secret for pulsar manager credentials (#69)
Signed-off-by: Jiří Pinkava <ji...@rossum.ai>
Co-authored-by: Jiri Pinkava <ji...@rossum.ai>
---
charts/pulsar/Chart.yaml | 2 +-
charts/pulsar/templates/pulsar-manager-admin-secret.yaml | 2 +-
charts/pulsar/templates/pulsar-manager-deployment.yaml | 8 ++++++++
charts/pulsar/values.yaml | 2 ++
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/charts/pulsar/Chart.yaml b/charts/pulsar/Chart.yaml
index f9cd29b..5e0393b 100644
--- a/charts/pulsar/Chart.yaml
+++ b/charts/pulsar/Chart.yaml
@@ -21,7 +21,7 @@ apiVersion: v1
appVersion: "2.7.0"
description: Apache Pulsar Helm chart for Kubernetes
name: pulsar
-version: 2.7.0
+version: 2.7.0-1
home: https://pulsar.apache.org
sources:
- https://github.com/apache/pulsar
diff --git a/charts/pulsar/templates/pulsar-manager-admin-secret.yaml b/charts/pulsar/templates/pulsar-manager-admin-secret.yaml
index ed94e16..be31a47 100644
--- a/charts/pulsar/templates/pulsar-manager-admin-secret.yaml
+++ b/charts/pulsar/templates/pulsar-manager-admin-secret.yaml
@@ -17,7 +17,7 @@
# under the License.
#
-{{- if or .Values.components.pulsar_manager .Values.extra.pulsar_manager }}
+{{- if and (or .Values.components.pulsar_manager .Values.extra.pulsar_manager) (not .Values.pulsar_manager.existingSecretName) }}
apiVersion: v1
kind: Secret
metadata:
diff --git a/charts/pulsar/templates/pulsar-manager-deployment.yaml b/charts/pulsar/templates/pulsar-manager-deployment.yaml
index 57037df..0aa2841 100644
--- a/charts/pulsar/templates/pulsar-manager-deployment.yaml
+++ b/charts/pulsar/templates/pulsar-manager-deployment.yaml
@@ -72,12 +72,20 @@ spec:
valueFrom:
secretKeyRef:
key: PULSAR_MANAGER_ADMIN_USER
+ {{- if .Values.pulsar_manager.existingSecretName }}
+ name: "{{ .Values.pulsar_manager.existingSecretName }}"
+ {{- else }}
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
+ {{- end }}
- name: PASSWORD
valueFrom:
secretKeyRef:
key: PULSAR_MANAGER_ADMIN_PASSWORD
+ {{- if .Values.pulsar_manager.existingSecretName }}
+ name: "{{ .Values.pulsar_manager.existingSecretName }}"
+ {{- else }}
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
+ {{- end }}
volumes:
- name: pulsar-manager-data
emptyDir: {}
diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml
index 7c5eb35..b18ec16 100644
--- a/charts/pulsar/values.yaml
+++ b/charts/pulsar/values.yaml
@@ -963,6 +963,8 @@ pulsar_manager:
hostname: ""
path: "/"
+ ## If set use existing secret with specified name to set pulsar admin credentials.
+ existingSecretName:
admin:
user: pulsar
password: pulsar