Skip to content

feat(tb-dev): repoint Keycloak DB to the Neon branch mzla-tb-dev#4

Merged
aatchison merged 1 commit into
mainfrom
tb-dev-repoint-neon-branch
Jun 23, 2026
Merged

feat(tb-dev): repoint Keycloak DB to the Neon branch mzla-tb-dev#4
aatchison merged 1 commit into
mainfrom
tb-dev-repoint-neon-branch

Conversation

@aatchison

Copy link
Copy Markdown
Contributor

Summary

Repoints the dev Keycloak from the throwaway dev RDS to the Neon copy-on-write branch mzla-tb-dev (isolated clone of stage tbpro — verified 26.5.7, tbpro realm with 169 users), so we can test against real, synced data with zero prod risk.

  • KC_DB_URL_HOST/PORT → Neon direct endpoint ep-fragrant-block-a2bv6iw5.eu-central-1.aws.neon.tech:5432 (valueFrom: null drops the base ConfigMap ref; ACK RDS/FieldExport become moot, dev RDS left idle).
  • KC_DB_URL_PROPERTIES=?sslmode=require (Neon needs TLS; also closes the SSL gap).
  • Creds via the keycloak-customer-db ExternalSecret — mzla/tb-dev/keycloak-customer-db now holds the branch keycloak_owner creds.
  • Direct (not -pooler) endpoint so Liquibase/jdbc-ping aren't on PgBouncer.

Reachable over the existing PrivateLink via the keycloak pod SG (verified end-to-end: a pod-SG'd pod queried the branch).

On merge (I'll orchestrate + verify)

ArgoCD syncs → StatefulSet env change → pods recreate (pick up the pod SG via the SGP + the Neon host) → connect to the branch with branch creds → serve the real tbpro realm. I'll force an ESO refresh first so the creds are current, then verify pods Ready + realm/users present.

Part of #132 (safe synced testing).

🤖 Generated with Claude Code

Switch the dev Keycloak from the throwaway dev RDS to the Neon copy-on-write
branch mzla-tb-dev (isolated clone of stage tbpro: 26.5.7, tbpro w/ 169 users) for
safe synced testing without touching prod data/ops.

- KC_DB_URL_HOST/PORT overridden to the Neon DIRECT endpoint
  (ep-fragrant-block-a2bv6iw5.eu-central-1.aws.neon.tech:5432) via valueFrom:null,
  so the ACK RDS/FieldExport ConfigMap chain is moot (dev RDS left idle).
- KC_DB_URL_PROPERTIES=?sslmode=require (Neon requires TLS) — also the SSL gap fix.
- Creds via the keycloak-customer-db ExternalSecret (mzla/tb-dev/keycloak-customer-db
  now holds the branch keycloak_owner creds). DB name keycloak unchanged.
- Direct (not -pooler) endpoint so Liquibase/jdbc-ping aren't on PgBouncer.

Reachable over the existing PrivateLink via the keycloak pod SG (verified).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aatchison aatchison merged commit 4799fd8 into main Jun 23, 2026
1 check passed
aatchison added a commit that referenced this pull request Jun 25, 2026
…on overlay (#5)

Customer Auth uses a SHARED Neon Postgres DB (source ECS and EKS target), not RDS,
so the ACK-RDS machinery was vestigial and the tb-prod overlay's public/RDS shape
did not match the running tailnet+branch validation instance.

Base:
- Remove bases/aws/* (DBInstance/DBSubnetGroup/FieldExport) and the
  rds-endpoint ConfigMap; the StatefulSet now takes KC_DB_URL_HOST from the overlay
  (sentinel value) instead of a FieldExport ConfigMap; port defaults to 5432.

Overlays:
- tb-dev: drop the now-dangling aws/* patches (DB host already overridden to the
  Neon branch in #4); render is otherwise unchanged.
- tb-prod: reshape to the running VALIDATION state -- tailnet-only hostname
  (keycloak-customer-tb-prod), Neon branch mzla-tb-prod (ep-red-grass, sslmode),
  2 replicas / 500m, dedicated SecurityGroupPolicy [eks-cluster-sg, pod SG], and a
  tailnet Ingress. The public-cutover files (cloudflare-*, tailscale-admin-ingress,
  pdb minAvailable-2, 3 replicas) are kept but unreferenced until the cutover (#142).

Docs: README + base StatefulSet header updated to the shared-Neon reality.

Implements #579; part of #139. NOTE: merge only AFTER platform-infrastructure
prune:false lands so the tb-dev sync does not auto-delete the idle dev RDS.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant