Skip to content

Commit

Permalink
add a possibility to hide postgres passwords for quantumleap (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Durburz authored Jul 20, 2022
1 parent c06dcda commit 5d0440a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/quantumleap/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for QuantumLeap
name: quantumleap
version: 0.1.18
version: 0.1.19
sources:
- https://github.com/smartsdk/ngsi-timeseries-api
maintainers:
Expand Down
21 changes: 21 additions & 0 deletions charts/quantumleap/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,23 @@ spec:
- name: PG_HOST
value: {{ .Values.database.timescale.host }}
- name: PG_PASS
{{- if .Values.init.passwordSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.init.passwordSecret }}
key: password
{{- else }}
value: {{ .Values.init.password }}
{{- end }}
- name: QL_DB_PASS
{{- if .Values.database.timescale.passwordSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.database.timescale.passwordSecret }}
key: password
{{- else }}
value: {{ .Values.database.timescale.password }}
{{- end }}
- name: QL_DB_INIT_DIR
value: "/init"
resources:
Expand Down Expand Up @@ -75,7 +89,14 @@ spec:
- name: POSTGRES_DB_USER
value: {{ .Values.database.timescale.user }}
- name: POSTGRES_DB_PASS
{{- if .Values.database.timescale.passwordSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.database.timescale.passwordSecret }}
key: password
{{- else }}
value: {{ .Values.database.timescale.password }}
{{- end }}
{{- if .Values.database.timescale.ssl }}
- name: POSTGRES_USE_SSL
value: t
Expand Down
4 changes: 4 additions & 0 deletions charts/quantumleap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ database:
name: quantumleap
user: quantumleap
password: quantumleap
# Secret must be set manually in the namespace and overrides the above set password if provided. Key has to be "password".
# passwordSecret: quantumleap-pg-timescale
ssl: true

runtime:
Expand All @@ -93,6 +95,8 @@ config:

init:
password: password
# Secret must be set manually in the namespace and overrides the above set password if provided. Key has to be "password".
# passwordSecret: quantumleap-pg-init
image:
repository: smartsdk/quantumleap-pg-init
tag: latest
Expand Down

0 comments on commit 5d0440a

Please sign in to comment.