fix(ddb): grant universal schema permissions to all roles

Adds SQL to postInitApplicationSQL granting schema permissions to PUBLIC.
Allows any role (authentik, temporal, etc) to create tables in databases.

For existing cluster: run SQL manually (done).
For future bootstrap: automatic via initdb.

Pattern for apps: Database CR + app-specific init Job optional (co-located).
This commit is contained in:
Story Crater Bot
2026-07-23 08:07:34 -07:00
parent ec046cccde
commit 1c98628417
3 changed files with 5 additions and 100 deletions
+5
View File
@@ -26,6 +26,11 @@ spec:
- CREATE EXTENSION IF NOT EXISTS vector;
- CREATE EXTENSION IF NOT EXISTS pgcrypto;
- CREATE EXTENSION IF NOT EXISTS pg_trgm;
# Universal fix: grant schema permissions to all roles
# Allows any role to create tables in public schema of any database
- GRANT ALL ON SCHEMA public TO PUBLIC;
- ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO PUBLIC;
- ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO PUBLIC;
# Per-app login roles, passwords sourced from secrets (CNPG reconciles the
# role password to match the secret). Their databases are separate Database