Skip to content

Commit

Permalink
fix: 🐛 handle postgres databases conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed May 2, 2024
1 parent 4f1fd64 commit bbb4217
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/dso-console/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cpn-console
description: A Helm chart to deploy Cloud Pi Native Console
type: application
version: 1.0.0
version: 1.0.1
appVersion: 8.1.1
keywords: []
home: https://cloud-pi-native.fr
Expand Down
11 changes: 7 additions & 4 deletions charts/dso-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,26 @@ A Helm chart to deploy Cloud Pi Native Console
| keycloak.ingress.path | string | `"/"` | |
| keycloak.ingress.secrets | list | `[]` | |
| keycloak.ingress.tls | bool | `false` | |
| keycloak.nameOverride | string | `"cpn-keycloak"` | |
| keycloak.postgresql.auth.architecture | string | `"standalone"` | |
| keycloak.postgresql.auth.database | string | `"keycloak"` | |
| keycloak.postgresql.auth.password | string | `""` | |
| keycloak.postgresql.auth.postgresPassword | string | `""` | |
| keycloak.postgresql.auth.username | string | `""` | |
| keycloak.postgresql.enabled | bool | `true` | |
| keycloak.postgresql.nameOverride | string | `"cpn-keycloak-db"` | |
| keycloak.production | bool | `true` | |
| keycloak.proxy | string | `"edge"` | |
| keycloak.tls.autoGenerated | bool | `false` | |
| keycloak.tls.enabled | bool | `false` | |
| nameOverride | string | `""` | Provide a name in place of the default application name. |
| postgresql.architecture | string | `"standalone"` | |
| postgresql.auth.database | string | `""` | |
| postgresql.auth.password | string | `""` | |
| postgresql.auth.postgresPassword | string | `""` | |
| postgresql.auth.username | string | `""` | |
| postgresql.enabled | bool | `true` | |
| postgresql.global.postgresql.auth.database | string | `""` | |
| postgresql.global.postgresql.auth.password | string | `""` | |
| postgresql.global.postgresql.auth.postgresPassword | string | `""` | |
| postgresql.global.postgresql.auth.username | string | `""` | |
| postgresql.nameOverride | string | `"cpn-console-db"` | |
| postgresql.primary.persistence.size | string | `"2Gi"` | |
| postgresql.primary.resources.limits.cpu | string | `"500m"` | |
| postgresql.primary.resources.limits.memory | string | `"512Mi"` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/dso-console/templates/server/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
data:
SESSION_SECRET: {{ .Values.global.keycloak.sessionSecret | b64enc }}
KEYCLOAK_CLIENT_SECRET: {{ .Values.global.keycloak.clientSecrets.backend | b64enc }}
DB_URL: {{ .Values.global.postgresql.dbUrl | default (printf "postgresql://%s:%s@%s-hl:%s/%s?schema=public" .Values.postgresql.global.postgresql.auth.username .Values.postgresql.global.postgresql.auth.password .Values.postgresql.fullnameOverride (.Values.postgresql.primary.service.ports.postgresql | toString) .Values.postgresql.global.postgresql.auth.database) | b64enc }}
DB_URL: {{ .Values.global.postgresql.dbUrl | default (printf "postgresql://%s:%s@%s-%s-hl:%s/%s?schema=public" .Values.postgresql.auth.username .Values.postgresql.auth.password .Release.Name .Values.postgresql.nameOverride (.Values.postgresql.primary.service.ports.postgresql | toString) .Values.postgresql.auth.database) | b64enc }}
{{- if .Values.global.secrets -}}
{{- include "cpnConsole.secret" .Values.global | indent 2 }}
{{- end -}}
Expand Down
15 changes: 8 additions & 7 deletions charts/dso-console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,13 @@ server:
## Ref: https://artifacthub.io/packages/helm/bitnami/postgresql
postgresql:
enabled: true
nameOverride: "cpn-console-db"
architecture: "standalone"
global:
postgresql:
auth:
postgresPassword: ""
username: ""
password: ""
database: ""
auth:
postgresPassword: ""
username: ""
password: ""
database: ""
primary:
service:
type: "ClusterIP"
Expand All @@ -476,6 +475,7 @@ postgresql:
## Ref: https://artifacthub.io/packages/helm/bitnami/keycloak
keycloak:
enabled: false
nameOverride: "cpn-keycloak"
auth:
adminUser: ""
adminPassword: ""
Expand All @@ -493,6 +493,7 @@ keycloak:
enabled: false
autoGenerated: false
postgresql:
nameOverride: "cpn-keycloak-db"
enabled: true
auth:
postgresPassword: ""
Expand Down

0 comments on commit bbb4217

Please sign in to comment.