diff --git a/charts/vc-authn-oidc/README.md b/charts/vc-authn-oidc/README.md index 5febe64e..39ce91a1 100644 --- a/charts/vc-authn-oidc/README.md +++ b/charts/vc-authn-oidc/README.md @@ -210,7 +210,6 @@ Note: Secure values of the configuration are passed via equivalent environment v | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- | | `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"}' | `""` | | `acapy.walletStorageCredentials.account` | Database account name. | `""` | -| `acapy.walletStorageCredentials.password` | Database password. | `""` | | `acapy.walletStorageCredentials.admin_account` | Database account with CREATEDB role used to create additional databases per wallet. | `postgres` | | `acapy.walletStorageCredentials.admin_password` | Database password for admin account. | `""` | | `acapy.walletStorageCredentials.existingSecret` | Name of an existing secret containing 'database-user', 'database-password', 'admin-password' keys. | `""` | diff --git a/charts/vc-authn-oidc/templates/_helpers.tpl b/charts/vc-authn-oidc/templates/_helpers.tpl index bd2f7db0..2c08ed09 100644 --- a/charts/vc-authn-oidc/templates/_helpers.tpl +++ b/charts/vc-authn-oidc/templates/_helpers.tpl @@ -337,16 +337,14 @@ Create a default fully qualified app name for the postgres requirement. Generate acapy wallet storage config */}} {{- define "acapy.walletStorageConfig" -}} -{{- if .Values.acapy.walletStorageConfig -}} {{- if .Values.acapy.walletStorageConfig.json -}} -{{- .Values.acapy.walletStorageConfig.json -}} -{{- else -}} -'{"url":"{{ .Values.acapy.walletStorageConfig.url }}","max_connections":"{{ .Values.acapy.walletStorageConfig.max_connection | default 10 }}"", "wallet_scheme":"{{ .Values.acapy.walletStorageConfig.wallet_scheme }}"}' -{{- end -}} + {{- .Values.acapy.walletStorageConfig.json -}} +{{- else if .Values.acapy.walletStorageConfig.url -}} + '{"url":"{{ .Values.acapy.walletStorageConfig.url }}","max_connections":"{{ .Values.acapy.walletStorageConfig.max_connection | default 10 }}"", "wallet_scheme":"{{ .Values.acapy.walletStorageConfig.wallet_scheme }}"}' {{- else if .Values.postgresql.enabled -}} -'{"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 }}"}' + '{"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 }}"}' {{- else -}} -'' + '' {{ end }} {{- end -}} @@ -354,14 +352,12 @@ Generate acapy wallet storage config Generate acapy wallet storage credentials */}} {{- define "acapy.walletStorageCredentials" -}} -{{- if .Values.acapy.walletStorageCredentials -}} {{- if .Values.acapy.walletStorageCredentials.json -}} -{{- .Values.acapy.walletStorageCredentials.json -}} -{{- else -}} -'{"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 }}"}' -{{- end -}} + {{- .Values.acapy.walletStorageCredentials.json -}} {{- else if .Values.postgresql.enabled -}} -'{"account":"{{ .Values.postgresql.auth.username }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}' + '{"account":"{{ .Values.postgresql.auth.username }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}' +{{- else -}} + '{"account":"{{ .Values.acapy.walletStorageCredentials.account | default "acapy" }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}' {{- end -}} {{- end -}} diff --git a/charts/vc-authn-oidc/values.yaml b/charts/vc-authn-oidc/values.yaml index 566ae42e..2c343856 100644 --- a/charts/vc-authn-oidc/values.yaml +++ b/charts/vc-authn-oidc/values.yaml @@ -352,7 +352,6 @@ acapy: ## ## @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"}' ## @param acapy.walletStorageCredentials.account Database account name. - ## @param acapy.walletStorageCredentials.password Database password. ## @param acapy.walletStorageCredentials.admin_account Database account with CREATEDB role used to create additional databases per wallet. ## @param acapy.walletStorageCredentials.admin_password Database password for admin account. ## @param acapy.walletStorageCredentials.existingSecret Name of an existing secret containing 'database-user', 'database-password', 'admin-password' keys. @@ -362,7 +361,6 @@ acapy: walletStorageCredentials: json: "" account: "" - password: "" admin_account: postgres admin_password: "" existingSecret: ""