Skip to content

Commit

Permalink
Grant create on public schema (#4102)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgboss authored Nov 18, 2024
1 parent ee8910c commit 4001dd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PROJ_TARGET="${PROJ_TARGET:-${PROJ_DEV}}"
# Prepare variables for backups
JOB_NAME="backup-postgres-${APP_NAME}-${SUFFIX}"
IMAGE_NAMESPACE=${PROJ_TOOLS}
CLUSTER_NAME="wps-crunchydb-${SUFFIX}"
CLUSTER_NAME="wps-crunchydb-16-${SUFFIX}"

OC_PROCESS="oc -n ${PROJ_TARGET} process -f ${TEMPLATE_PATH}/backup-s3-postgres-cronjob.yaml \
-p CRUNCHYDB_USER=wps-crunchydb-16-${SUFFIX}-pguser-wps-crunchydb-16-${SUFFIX} \
Expand Down
7 changes: 5 additions & 2 deletions openshift/templates/crunchy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ objects:
init.sql: |-
\c wps\\
CREATE EXTENSION postgis;
GRANT CREATE ON SCHEMA public TO "${APP_NAME}-${SUFFIX}";
kind: ConfigMap
metadata:
name: wps-init-sql
labels:
app: ${APP_NAME}-${SUFFIX}
name: wps-init-sql-${SUFFIX}
- apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
Expand All @@ -79,7 +82,7 @@ objects:
app: ${APP_NAME}-${SUFFIX}
databaseInitSQL:
key: init.sql
name: wps-init-sql
name: wps-init-sql-${SUFFIX}
users:
- name: ${APP_NAME}-${SUFFIX}
databases:
Expand Down

0 comments on commit 4001dd1

Please sign in to comment.