Skip to content

Commit

Permalink
Merge pull request #46 from uc-cdis/feat/small_fixes
Browse files Browse the repository at this point in the history
Fixing the dicom-server Helm chart
  • Loading branch information
jawadqur authored Oct 18, 2022
2 parents 1683c8d + 74df39a commit 88ddcfc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions helm/dicom-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,16 @@ Create the name of the service account to use
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Postgres Password lookup
*/}}
{{- define "dicom.postgres.password" -}}
{{- $localpass := (lookup "v1" "Secret" "postgres" "postgres-postgresql" ) -}}
{{- if $localpass }}
{{- default (index $localpass.data "postgres-password" | b64dec) }}
{{- else }}
{{- default .Values.secrets.password }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions helm/dicom-server/templates/config-volume-g3auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stringData:
{
"db_host": {{ .Values.secrets.host | quote }},
"db_username": {{ .Values.secrets.userName | quote }},
"db_password": {{ .Values.secrets.password | quote }},
"db_password": {{ include "dicom.postgres.password" . | quote }},
"db_database": {{ .Values.secrets.dataBase | quote }}
}
orthanc_config_overwrites.json: |
Expand All @@ -21,7 +21,7 @@ stringData:
"Host": {{ .Values.secrets.host | quote }},
"Database": {{ .Values.secrets.dataBase | quote }},
"Username": {{ .Values.secrets.userName | quote }},
"Password": {{ .Values.secrets.password | quote }},
"Password": {{ include "dicom.postgres.password" . | quote }},
"IndexConnectionsCount": {{ .Values.secrets.indexConnectionsCount }},
"Lock": {{ .Values.secrets.lock }}
},
Expand Down

0 comments on commit 88ddcfc

Please sign in to comment.