-
Notifications
You must be signed in to change notification settings - Fork 444
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
[artifactory] Create database secrets if postgres password is set #1110
[artifactory] Create database secrets if postgres password is set #1110
Conversation
c251c20
to
2ee31f6
Compare
@@ -1,4 +1,4 @@ | |||
{{- if and (not .Values.database.secrets) (not .Values.postgresql.enabled) }} | |||
{{- if or (and (not .Values.database.secrets) (not .Values.postgresql.enabled)) .Values.database.password }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@woodcockjosh I'm not sure this change is required , .Values.database.password
implies external postgres
@@ -429,6 +429,9 @@ artifactory: | |||
url: "jdbc:postgresql://{{ .Release.Name }}-postgresql:{{ .Values.postgresql.service.port }}/{{ .Values.postgresql.postgresqlDatabase }}" | |||
driver: org.postgresql.Driver | |||
username: "{{ .Values.postgresql.postgresqlUsername }}" | |||
{{- if .Values.postgresql.postgresqlPassword }} | |||
password: "{{ .Values.postgresql.postgresqlPassword }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@woodcockjosh This creates a secret for .Values.postgresql.postgresqlPassword
from postgresql sub-chart and in statefulset it is referenced using JF_SHARED_DATABASE_PASSWORD
{{ if or .Values.database.secrets.password .Values.database.password .Values.postgresql.enabled }}
- name: JF_SHARED_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.database.secrets.password }}
name: {{ tpl .Values.database.secrets.password.name . }}
key: {{ tpl .Values.database.secrets.password.key . }}
{{- else if .Values.database.password }}
name: {{ template "artifactory.fullname" . }}-database-creds
key: db-password
{{- else if .Values.postgresql.enabled }}
name: {{ .Release.Name }}-postgresql
key: postgresql-password
{{- end }}
{{- end }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right well until a solution is implemented for #859 I'm going to use this approach to fix the problem with upgrades. It would be a shame if everyone else had to copy paste the artifactory chart to solve their problem but I understand if upgrading the chart without the upgrade failing is not the highest priority for the repo.
@chukka any update on this? |
We decided to keep the current implementation as it is, if needed, please raise a issue and we will investigate. Thanks! |
PR Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[artifactory]
)What this PR does / why we need it:
Allows user to set database password rather than use the generated one. This also works as a workaround for #859
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixesSpecial notes for your reviewer: