Skip to content

Commit

Permalink
Change POSTGRES_DB to POSTGRES_DATABASE
Browse files Browse the repository at this point in the history
Bitnami has changed the POSTGRES_DB variable to POSTGRES_DATABASE.
This had no influence on the functionality, but is just wrong now
for the Bitnami image used.

Ref: https://github.com/bitnami/containers/tree/main/bitnami/postgresql#customizable-environment-variables
Gabriel Mainberger committed Feb 26, 2024
1 parent 29aabc2 commit f71e826
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion class/defaults.yml
Original file line number Diff line number Diff line change
@@ -303,7 +303,7 @@ parameters:
existingSecret: ${keycloak:database:secretname}
primary:
podAnnotations:
k8up.io/backupcommand: sh -c 'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER" PGPASSWORD="$POSTGRES_PASSWORD" pg_dump --clean'
k8up.io/backupcommand: sh -c 'PGDATABASE="$POSTGRES_DATABASE" PGUSER="$POSTGRES_USER" PGPASSWORD="$POSTGRES_PASSWORD" pg_dump --clean'
k8up.io/file-extension: .sql
labels: ${keycloak:labels}
containerSecurityContext:
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-tos/change-passwords.adoc
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ vault kv patch "${parent}/${instance}" db-password="${db_pass}"
namespace=syn-${instance}
kubectl -n ${namespace} exec -it keycloak-postgresql-0 -c keycloak-postgresql -- sh -c \
'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER" PGPASSWORD="'${old_pass}'" '\
'PGDATABASE="$POSTGRES_DATABASE" PGUSER="$POSTGRES_USER" PGPASSWORD="'${old_pass}'" '\
'psql -c "ALTER USER keycloak WITH PASSWORD '${db_pass}';"'
----
+
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-tos/db-tls.adoc
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ parameters:
----
namespace=syn-keycloak
kubectl exec -it -n ${namespace} keycloak-postgresql-0 -c keycloak-postgresql -- sh -c \
'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER" PGPASSWORD="$POSTGRES_PASSWORD" '\
'PGDATABASE="$POSTGRES_DATABASE" PGUSER="$POSTGRES_USER" PGPASSWORD="$POSTGRES_PASSWORD" '\
'psql -c "SELECT datname, usename, ssl, client_addr FROM pg_stat_ssl JOIN pg_stat_activity ON pg_stat_ssl.pid = pg_stat_activity.pid;"'
----
+
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-tos/restore.adoc
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ export POD=keycloak-postgresql-0

restic dump "${SNAPSHOT_ID}" /$NAMESPACE-keycloak-postgresql.sql \
| kubectl -n $NAMESPACE exec -i $POD \
-- sh -c 'PGPASSWORD="${POSTGRES_PASSWORD}" psql --set ON_ERROR_STOP=on -U "${POSTGRES_USER}" ${POSTGRES_DB}'
-- sh -c 'PGPASSWORD="${POSTGRES_PASSWORD}" psql --set ON_ERROR_STOP=on -U "${POSTGRES_USER}" ${POSTGRES_DATABASE}'
----

. Re-enable ArgoCD auto sync and scale up Keycloak
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
k8up.io/backupcommand: sh -c 'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER"
k8up.io/backupcommand: sh -c 'PGDATABASE="$POSTGRES_DATABASE" PGUSER="$POSTGRES_USER"
PGPASSWORD="$POSTGRES_PASSWORD" pg_dump --clean'
k8up.io/file-extension: .sql
labels:
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
k8up.io/backupcommand: sh -c 'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER"
k8up.io/backupcommand: sh -c 'PGDATABASE="$POSTGRES_DATABASE" PGUSER="$POSTGRES_USER"
PGPASSWORD="$POSTGRES_PASSWORD" pg_dump --clean'
k8up.io/file-extension: .sql
labels:

0 comments on commit f71e826

Please sign in to comment.