Skip to content

Commit

Permalink
feat(charts): Add support to specify creds for in cluster db through …
Browse files Browse the repository at this point in the history
…values file
  • Loading branch information
kmala committed Dec 20, 2016
1 parent 1ef7a37 commit 830cee8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/database/templates/database-secret-creds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ metadata:
annotations:
"helm.sh/hook": pre-install
data: {{ if eq .Values.global.database_location "on-cluster"}}
user: {{ randAlphaNum 32 | b64enc }}
password: {{ randAlphaNum 32 | b64enc }}{{ else if eq .Values.global.database_location "off-cluster"}}
user: {{ if .Values.username | default "" | ne "" }}{{ .Values.username | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}
password: {{ if .Values.password | default "" | ne "" }}{{ .Values.password | b64enc }}{{ else }}{{ randAlphaNum 32 | b64enc }}{{ end }}{{ else if eq .Values.global.database_location "off-cluster"}}
user: {{ .Values.postgres.username | b64enc }}
password: {{ .Values.postgres.password | b64enc }}
name: {{ .Values.postgres.name | b64enc }}
Expand Down
4 changes: 4 additions & 0 deletions charts/database/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ pull_policy: "Always"
docker_tag: canary
# limits_cpu: "100m"
# limits_memory: "50Mi"
# The username and password to be used by the on-cluster database.
# If left empty they will be generated using randAlphaNum
username: ""
password: ""

postgres:
name: "database name"
Expand Down

0 comments on commit 830cee8

Please sign in to comment.