Skip to content

Commit

Permalink
[Helm] Remove reference to postgresql-ha (#597)
Browse files Browse the repository at this point in the history
Remove reference to postgresql-ha

Signed-off-by: Ivan Polchenko <[email protected]>
  • Loading branch information
i5okie authored Jul 30, 2024
1 parent e824acb commit afdf058
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion charts/vc-authn-oidc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |

---

Expand Down
12 changes: 4 additions & 8 deletions charts/vc-authn-oidc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 -}}

Expand Down
5 changes: 1 addition & 4 deletions charts/vc-authn-oidc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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

0 comments on commit afdf058

Please sign in to comment.