Skip to content

Commit

Permalink
[stable/stolon] support secrets for initdb pod (helm#23367)
Browse files Browse the repository at this point in the history
* Add persistence support

Signed-off-by: Patrick Kolze <[email protected]>

* fix linting issue

Signed-off-by: Patrick Kolze <[email protected]>

* Update Chart version

Signed-off-by: Patrick Kolze <[email protected]>

* Avoid breaking existing behaviour

Signed-off-by: Patrick Kolze <[email protected]>

* [stable/prometheus-pushgateway] Bump version (helm#16040)

Signed-off-by: Patrick Kolze <[email protected]>

* [stable/prometheus-pushgateway] Fix persistence support

Signed-off-by: Patrick Kolze <[email protected]>

* Change back default persistence path

Signed-off-by: Patrick Kolze <[email protected]>

* Support secrets for initdb hook

Signed-off-by: Patrick Kolze <[email protected]>

* Bump Chart version of stolon

Signed-off-by: Patrick Kolze <[email protected]>

* removed additional secrets

as discussed in helm#23367

Signed-off-by: Patrick Kolze <[email protected]>
  • Loading branch information
paprickar authored Aug 9, 2020
1 parent 47f5c2c commit 9584592
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stable/stolon/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: stolon
version: 1.6.1
version: 1.6.2
appVersion: 0.16.0
description: Stolon - PostgreSQL cloud native High Availability.
home: https://github.com/sorintlab/stolon
Expand Down
18 changes: 16 additions & 2 deletions stable/stolon/templates/hooks/init-db-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,23 @@ spec:
image: 'postgres'
env:
- name: USERNAME
value: {{ .Values.superuserUsername }}
{{- if not (empty .Values.superuserSecret.name) }}
valueFrom:
secretKeyRef:
name: {{ .Values.superuserSecret.name }}
key: {{ .Values.superuserSecret.usernameKey }}
{{- else }}
value: {{ .Values.superuserUsername | quote }}
{{- end }}
- name: PGPASSWORD
value: {{ .Values.superuserPassword }}
{{- if not (empty .Values.superuserSecret.name) }}
valueFrom:
secretKeyRef:
name: {{ .Values.superuserSecret.name }}
key: {{ .Values.superuserSecret.passwordKey }}
{{- else }}
value: {{ .Values.superuserPassword | quote }}
{{- end }}
- name: HOST
value: {{ template "stolon.fullname" . }}-proxy
command: ["/bin/bash", "-e", "/tmp/sql-script/create_script.sh"]
Expand Down

0 comments on commit 9584592

Please sign in to comment.