Skip to content

Commit f1f9cd9

Browse files
authored
Merge pull request #633 from bcgov/fix/helm-chart-helpers
[FIX] Helm chart templates not picking up values as expected
2 parents 5249b32 + 76869d8 commit f1f9cd9

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

charts/vc-authn-oidc/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ Note: Secure values of the configuration are passed via equivalent environment v
210210
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
211211
| `acapy.walletStorageCredentials.json` | Raw json with database credentials. Overrides all other values including postgres subchart values. e.g.: '{"account":"postgres","password":"mysecretpassword","admin_account":"postgres","admin_password":"mysecretpassword"}' | `""` |
212212
| `acapy.walletStorageCredentials.account` | Database account name. | `""` |
213-
| `acapy.walletStorageCredentials.password` | Database password. | `""` |
214213
| `acapy.walletStorageCredentials.admin_account` | Database account with CREATEDB role used to create additional databases per wallet. | `postgres` |
215214
| `acapy.walletStorageCredentials.admin_password` | Database password for admin account. | `""` |
216215
| `acapy.walletStorageCredentials.existingSecret` | Name of an existing secret containing 'database-user', 'database-password', 'admin-password' keys. | `""` |

charts/vc-authn-oidc/templates/_helpers.tpl

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -337,31 +337,27 @@ Create a default fully qualified app name for the postgres requirement.
337337
Generate acapy wallet storage config
338338
*/}}
339339
{{- define "acapy.walletStorageConfig" -}}
340-
{{- if .Values.acapy.walletStorageConfig -}}
341340
{{- if .Values.acapy.walletStorageConfig.json -}}
342-
{{- .Values.acapy.walletStorageConfig.json -}}
343-
{{- else -}}
344-
'{"url":"{{ .Values.acapy.walletStorageConfig.url }}","max_connections":"{{ .Values.acapy.walletStorageConfig.max_connection | default 10 }}"", "wallet_scheme":"{{ .Values.acapy.walletStorageConfig.wallet_scheme }}"}'
345-
{{- end -}}
341+
{{- .Values.acapy.walletStorageConfig.json -}}
342+
{{- else if .Values.acapy.walletStorageConfig.url -}}
343+
'{"url":"{{ .Values.acapy.walletStorageConfig.url }}","max_connections":"{{ .Values.acapy.walletStorageConfig.max_connection | default 10 }}"", "wallet_scheme":"{{ .Values.acapy.walletStorageConfig.wallet_scheme }}"}'
346344
{{- else if .Values.postgresql.enabled -}}
347-
'{"url":"{{ include "global.postgresql.fullname" . }}:{{ .Values.postgresql.primary.service.ports.postgresql }}","max_connections":"{{ .Values.acapy.walletStorageConfig.max_connections }}", "wallet_scheme":"{{ .Values.acapy.walletStorageConfig.wallet_scheme }}"}'
345+
'{"url":"{{ include "global.postgresql.fullname" . }}:{{ .Values.postgresql.primary.service.ports.postgresql }}","max_connections":"{{ .Values.acapy.walletStorageConfig.max_connections }}", "wallet_scheme":"{{ .Values.acapy.walletStorageConfig.wallet_scheme }}"}'
348346
{{- else -}}
349-
''
347+
''
350348
{{ end }}
351349
{{- end -}}
352350

353351
{{/*
354352
Generate acapy wallet storage credentials
355353
*/}}
356354
{{- define "acapy.walletStorageCredentials" -}}
357-
{{- if .Values.acapy.walletStorageCredentials -}}
358355
{{- if .Values.acapy.walletStorageCredentials.json -}}
359-
{{- .Values.acapy.walletStorageCredentials.json -}}
360-
{{- else -}}
361-
'{"account":"{{ .Values.acapy.walletStorageCredentials.account | default "acapy" }}","password":"{{ .Values.acapy.walletStorageCredentials.password }}", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"{{ .Values.acapy.walletStorageCredentials.admin_password }}"}'
362-
{{- end -}}
356+
{{- .Values.acapy.walletStorageCredentials.json -}}
363357
{{- else if .Values.postgresql.enabled -}}
364-
'{"account":"{{ .Values.postgresql.auth.username }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}'
358+
'{"account":"{{ .Values.postgresql.auth.username }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}'
359+
{{- else -}}
360+
'{"account":"{{ .Values.acapy.walletStorageCredentials.account | default "acapy" }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}'
365361
{{- end -}}
366362
{{- end -}}
367363

charts/vc-authn-oidc/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ acapy:
352352
##
353353
## @param acapy.walletStorageCredentials.json Raw json with database credentials. Overrides all other values including postgres subchart values. e.g.: '{"account":"postgres","password":"mysecretpassword","admin_account":"postgres","admin_password":"mysecretpassword"}'
354354
## @param acapy.walletStorageCredentials.account Database account name.
355-
## @param acapy.walletStorageCredentials.password Database password.
356355
## @param acapy.walletStorageCredentials.admin_account Database account with CREATEDB role used to create additional databases per wallet.
357356
## @param acapy.walletStorageCredentials.admin_password Database password for admin account.
358357
## @param acapy.walletStorageCredentials.existingSecret Name of an existing secret containing 'database-user', 'database-password', 'admin-password' keys.
@@ -362,7 +361,6 @@ acapy:
362361
walletStorageCredentials:
363362
json: ""
364363
account: ""
365-
password: ""
366364
admin_account: postgres
367365
admin_password: ""
368366
existingSecret: ""

0 commit comments

Comments
 (0)