From afdf058af682ffcc01bfb8f78ec3be1068a87d1d Mon Sep 17 00:00:00 2001 From: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:43:40 -0700 Subject: [PATCH] [Helm] Remove reference to postgresql-ha (#597) Remove reference to postgresql-ha Signed-off-by: Ivan Polchenko <2119240+i5okie@users.noreply.github.com> --- charts/vc-authn-oidc/README.md | 1 - charts/vc-authn-oidc/templates/_helpers.tpl | 12 ++++-------- charts/vc-authn-oidc/values.yaml | 5 +---- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/charts/vc-authn-oidc/README.md b/charts/vc-authn-oidc/README.md index 5b55792f..ae00bcc2 100644 --- a/charts/vc-authn-oidc/README.md +++ b/charts/vc-authn-oidc/README.md @@ -313,7 +313,6 @@ Note: Secure values of the configuration are passed via equivalent environment v | `postgresql.primary.resources.requests.cpu` | The requested cpu for the PostgreSQL Primary containers | `300m` | | `postgresql.primary.service.ports.postgresql` | PostgreSQL service port | `5432` | | `postgresql.primary.extendedConfiguration` | Extended PostgreSQL Primary configuration (appended to main or default configuration) | `max_connections = 500` | -| `postgresql-ha.enabled` | Deploy HA PostgreSQL chart. Not currently supported, provided for future use. | `false` | --- diff --git a/charts/vc-authn-oidc/templates/_helpers.tpl b/charts/vc-authn-oidc/templates/_helpers.tpl index 7b5d6707..150f13ff 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 and .Values.acapy.walletStorageConfig (not .Values.postgresql.enabled) (not index .Values "postgresql-ha" "enabled") -}} +{{- if and .Values.acapy.walletStorageConfig (not .Values.postgresql.enabled) -}} {{- 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 -}} -{{- else if and .Values.postgresql.enabled ( not ( index .Values "postgresql-ha" "enabled") ) -}} +{{- 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 }}"}' -{{- else if and ( index .Values "postgresql-ha" "enabled" ) ( not .Values.postgresql.enabled ) -}} -'{"url":"{{ include "global.postgresql-ha.fullname" . }}:{{ index .Values "postgresql-ha" "service" "ports" "postgresql" }}","max_connections":"5", "wallet_scheme":"{{ .Values.acapy.walletScheme }}"}' {{- else -}} '' {{ end }} @@ -356,16 +354,14 @@ Generate acapy wallet storage config Generate acapy wallet storage credentials */}} {{- define "acapy.walletStorageCredentials" -}} -{{- if and .Values.acapy.walletStorageCredentials (not .Values.postgresql.enabled) (not index .Values "postgresql-ha" "enabled") -}} +{{- if and .Values.acapy.walletStorageCredentials (not .Values.postgresql.enabled) -}} {{- 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 -}} -{{- else if and .Values.postgresql.enabled ( not ( index .Values "postgresql-ha" "enabled") ) -}} +{{- else if and .Values.postgresql.enabled -}} '{"account":"{{ .Values.postgresql.auth.username }}","password":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}' -{{- else if and ( index .Values "postgresql-ha" "enabled" ) ( not .Values.postgresql.enabled ) -}} -'{"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 56d36b3c..5d187012 100644 --- a/charts/vc-authn-oidc/values.yaml +++ b/charts/vc-authn-oidc/values.yaml @@ -391,6 +391,7 @@ acapy: ## @param acapy.persistence.size PVC Storage Request for tails volume ## size: 1Gi + ## @section Acapy common configurations ## Acapy resource requests and limits ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ @@ -692,7 +693,3 @@ postgresql: primary: extendedConfiguration: | max_connections = 500 - -## @param postgresql-ha.enabled Deploy HA PostgreSQL chart. Not currently supported, provided for future use. -postgresql-ha: - enabled: false