Skip to content

Commit

Permalink
Merge pull request #1428 from bcgov/i5okie/chart-updates
Browse files Browse the repository at this point in the history
Helm chart update - Do not pre-create a custom database
  • Loading branch information
i5okie authored Nov 5, 2024
2 parents a0dd29d + a0ad523 commit eb9e662
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion charts/traction/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: traction
description: The Traction service allows organizations to verify, hold, and issue verifiable credentials. The Traction Tenant UI allows tenants to manage their agent.
type: application
version: 0.3.4
version: 0.3.5
appVersion: 1.0.0
home: "https://github.com/bcgov/traction"
sources: ["https://github.com/bcgov/traction"]
Expand Down
2 changes: 0 additions & 2 deletions charts/traction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ kubectl delete secret,pvc --selector "app.kubernetes.io/instance"=my-release
| `postgresql.fullnameOverride` | When overriding fullnameOverride, you must override this to match. | `""` |
| `postgresql.architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` |
| `postgresql.auth.enablePostgresUser` | Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user. Not recommended for production deployment. | `true` |
| `postgresql.auth.database` | Name for a custom database to create | `traction` |
| `postgresql.auth.username` | Name for a custom user to create | `acapy` |
| `postgresql.primary.persistence.enabled` | Enable PostgreSQL Primary data persistence using PVC | `true` |
| `postgresql.primary.persistence.size` | PVC Storage Request for PostgreSQL volume | `1Gi` |
Expand All @@ -414,7 +413,6 @@ kubectl delete secret,pvc --selector "app.kubernetes.io/instance"=my-release
| `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` |

## Maintainers

Expand Down
12 changes: 4 additions & 8 deletions charts/traction/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -324,16 +324,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 @@ -343,16 +341,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":"$(POSTGRES_PASSWORD)", "admin_account":"{{ .Values.acapy.walletStorageCredentials.admin_account }}", "admin_password":"$(POSTGRES_POSTGRES_PASSWORD)"}'
{{- end -}}
{{- else if and .Values.postgresql.enabled ( not ( index .Values "postgresql-ha" "enabled") ) -}}
{{- 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)"}'
{{- 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
7 changes: 0 additions & 7 deletions charts/traction/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -874,9 +874,6 @@ postgresql:
## @param postgresql.auth.enablePostgresUser Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user. Not recommended for production deployment.
##
enablePostgresUser: true
## @param postgresql.auth.database Name for a custom database to create
##
database: askar-wallet
## @param postgresql.auth.username Name for a custom user to create
##
username: acapy
Expand Down Expand Up @@ -928,7 +925,3 @@ postgresql:
##
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 eb9e662

Please sign in to comment.