Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Hydra #1022

Closed
wants to merge 22 commits into from
Closed

Hydra #1022

Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add postgres credentials as a secret that then gets fed through as en…
…vironmental variables.
meyerzinn committed Jun 2, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ab9dc7495201a262395a6d7b0bbe3b7f0f6daa18
19 changes: 18 additions & 1 deletion incubator/hydra/templates/hydra_deployment.yaml
Original file line number Diff line number Diff line change
@@ -51,8 +51,25 @@ spec:
secretKeyRef:
name: {{ template "fullname" . }}-secret
key: system.secret
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-postgres-secret
key: postgres.user
- name: POSTGRES_PASS
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-postgres-secret
key: postgres.pass
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}-postgres-secret
key: postgres.db
name: mysecret
key: username
- name: DATABASE_URL
value: postgres://{{ .Values.postgresql.postgresUser }}:{{ .Values.postgresql.postgresPassword }}@{{ template "postgresql.fullname" . }}:5432/{{ .Values.postgresql.postgresDatabase }}?sslmode=disable
value: postgres://${POSTGRES_USER}:${POSTGRES_PASS}@{{ template "postgresql.fullname" . }}:5432/${POSTGRES_DB}?sslmode=disable
- name: HTTPS_ALLOW_TERMINATION_FROM
value: {{ .Values.config.httpsAllowTerminationFrom }}
- name: LOG_LEVEL
14 changes: 14 additions & 0 deletions incubator/hydra/templates/postgres_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "fullname" . }}-postgres-secret
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
postgres.user: {{ .Values.config.postgresql.postgresUser }}
postgres.pass: {{ .Values.config.postgresql.postgresPassword}}
postgres.db: {{.Values.config.postgresql.postgresDatabase}}