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

pulsar-manager adding support for existing secret #478

Merged
merged 1 commit into from
Mar 26, 2024
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
2 changes: 1 addition & 1 deletion charts/pulsar/templates/pulsar-manager-admin-secret.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

{{- if .Values.components.pulsar_manager }}
{{- if and .Values.components.pulsar_manager ( not .Values.pulsar_manager.admin.existingSecret ) }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
8 changes: 8 additions & 0 deletions charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,20 @@ spec:
- name: USERNAME
valueFrom:
secretKeyRef:
{{- if .Values.pulsar_manager.admin.existingSecret }}
name: {{ .Values.pulsar_manager.admin.existingSecret | quote }}
{{- else }}
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
{{- end }}
key: UI_USERNAME
- name: PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.pulsar_manager.admin.existingSecret }}
name: {{ .Values.pulsar_manager.admin.existingSecret | quote }}
{{- else }}
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
{{- end }}
key: UI_PASSWORD
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/pulsar/templates/pulsar-manager-statefulset.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,20 @@ spec:
- name: USERNAME
valueFrom:
secretKeyRef:
{{- if .Values.pulsar_manager.admin.existingSecret }}
name: {{ .Values.pulsar_manager.admin.existingSecret | quote }}
{{- else }}
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
{{- end }}
key: DB_USERNAME
- name: PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.pulsar_manager.admin.existingSecret }}
name: {{ .Values.pulsar_manager.admin.existingSecret | quote }}
{{- else }}
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
{{- end }}
key: DB_PASSWORD
- name: PULSAR_MANAGER_OPTS
value: "$(PULSAR_MANAGER_OPTS) -Dlog4j2.formatMsgNoLookups=true"
Expand Down
7 changes: 7 additions & 0 deletions charts/pulsar/values.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,13 @@ pulsar_manager:
## And decode any key by using:
## kubectl get secret -l component=pulsar-manager -o=jsonpath="{.items[0].data.UI_PASSWORD}" | base64 --decode
admin:
## Setting a value at existingSecret disables automatic creation of the secret for pulsar_manager admin credentials and instead uses an existing secret to initialize pulsar-manager
## The existing secret should have the following keys:
## DB_PASSWORD: <database password>
## DB_USERNAME: <database username>
## UI_PASSWORD: <UI password>
## UI_USERNAME: <UI username>
existingSecret: ""
ui_username: "pulsar"
ui_password: "" # leave empty for random password
db_username: "pulsar"
Expand Down
Loading