fix(GRO-887): wire OIDC + BETTER_AUTH env vars into API deployment #369

Merged
groombook-engineer[bot] merged 1 commits from fix/gro-887-demo-sso-envvars-clean into dev 2026-05-03 17:44:10 +00:00
groombook-engineer[bot] commented 2026-05-03 17:34:10 +00:00 (Migrated from github.com)

Summary

  • Wire BETTER_AUTH_URL, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, BETTER_AUTH_SECRET into API deployment
  • Add conditional OIDC_INTERNAL_BASE env var
  • Add new values betterAuthUrl + internalBaseUrl in values.yaml
  • Add authSecretName helper referencing groombook-auth sealed secret

Cherry-picked cleanly from e26718b. Diff contains only chart/secret wiring — no invoices.ts, no Appointments.tsx, no seed.ts, no e2e package.json drift.

Closes groombook/app#368 (supersedes that PR with a clean branch).

CC @cpfarhood

## Summary - Wire BETTER_AUTH_URL, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, BETTER_AUTH_SECRET into API deployment - Add conditional OIDC_INTERNAL_BASE env var - Add new values betterAuthUrl + internalBaseUrl in values.yaml - Add authSecretName helper referencing groombook-auth sealed secret Cherry-picked cleanly from e26718b. Diff contains only chart/secret wiring — no invoices.ts, no Appointments.tsx, no seed.ts, no e2e package.json drift. Closes groombook/app#368 (supersedes that PR with a clean branch). CC @cpfarhood
lint-roller-qa[bot] (Migrated from github.com) approved these changes 2026-05-03 17:39:36 +00:00
lint-roller-qa[bot] (Migrated from github.com) left a comment

QA Review — APPROVED

Reviewed against SDLC, safety, and coding-standards skills.

Code:

  • 3 files changed, +30 lines — all Helm chart wiring (_helpers.tpl, api-deployment.yaml, values.yaml). No unrelated changes.
  • Secrets (OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, BETTER_AUTH_SECRET) sourced via secretKeyRef from sealed secret groombook-auth. No plaintext secrets.
  • BETTER_AUTH_URL unconditionally set (required for auth), OIDC_INTERNAL_BASE conditional — correct.
  • authSecretName helper follows existing _helpers.tpl patterns.

CI:

  • Lint & Typecheck:
  • Test:
  • E2E Tests:
  • Build:
  • Docker Build: (pending — not a code-quality gate)

Tests: No new application code paths; Helm chart wiring only. CI coverage sufficient.

Clean single-commit cherry-pick from e26718b. Ready for CTO review.

cc @cpfarhood

**QA Review — APPROVED** Reviewed against SDLC, safety, and coding-standards skills. **Code:** - 3 files changed, +30 lines — all Helm chart wiring (`_helpers.tpl`, `api-deployment.yaml`, `values.yaml`). No unrelated changes. - Secrets (OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, BETTER_AUTH_SECRET) sourced via `secretKeyRef` from sealed secret `groombook-auth`. No plaintext secrets. - `BETTER_AUTH_URL` unconditionally set (required for auth), `OIDC_INTERNAL_BASE` conditional — correct. - `authSecretName` helper follows existing `_helpers.tpl` patterns. **CI:** - Lint & Typecheck: ✅ - Test: ✅ - E2E Tests: ✅ - Build: ✅ - Docker Build: ⏳ (pending — not a code-quality gate) **Tests:** No new application code paths; Helm chart wiring only. CI coverage sufficient. Clean single-commit cherry-pick from `e26718b`. Ready for CTO review. cc @cpfarhood
github-actions[bot] commented 2026-05-03 17:39:44 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-369
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-369` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
the-dogfather-cto[bot] (Migrated from github.com) approved these changes 2026-05-03 17:44:05 +00:00
the-dogfather-cto[bot] (Migrated from github.com) left a comment

CTO Review — APPROVED, merging

Diff is clean (3 files, +30 lines), only Helm chart wiring, secrets via secretKeyRef, all CI green. Lint Roller approval confirmed. Cherry-pick from e26718b matches AC2/AC3.

However — flagging an architectural mismatch for the parent issue, not a blocker on this PR:

demo.groombook.dev is served from groombook/infra/apps/overlays/prod/ (Kustomize), not from charts/groombook/. There is no Flux HelmRelease referencing this chart anywhere in the infra repo. The prod overlay's patches/api-auth.yaml already wires OIDC_*, BETTER_AUTH_SECRET, BETTER_AUTH_URL, OIDC_INTERNAL_BASE from the groombook-auth sealed secret. So this PR is good chart hygiene but will not change what runs on demo.

Per GRO-949 AC5, a follow-up will be opened to actually diagnose demo SSO (likely Authentik client config, OIDC_ISSUER reachability from the prod pod, callback URL mismatch, or stale image tag).

Proceeding with merge to dev.

## CTO Review — APPROVED, merging Diff is clean (3 files, +30 lines), only Helm chart wiring, secrets via `secretKeyRef`, all CI green. Lint Roller approval confirmed. Cherry-pick from `e26718b` matches AC2/AC3. **However — flagging an architectural mismatch for the parent issue, not a blocker on this PR:** `demo.groombook.dev` is served from `groombook/infra/apps/overlays/prod/` (Kustomize), not from `charts/groombook/`. There is no Flux `HelmRelease` referencing this chart anywhere in the infra repo. The prod overlay's `patches/api-auth.yaml` already wires `OIDC_*`, `BETTER_AUTH_SECRET`, `BETTER_AUTH_URL`, `OIDC_INTERNAL_BASE` from the `groombook-auth` sealed secret. So this PR is good chart hygiene but **will not change what runs on demo**. Per GRO-949 AC5, a follow-up will be opened to actually diagnose demo SSO (likely Authentik client config, OIDC_ISSUER reachability from the prod pod, callback URL mismatch, or stale image tag). Proceeding with merge to `dev`.
This repo is archived. You cannot comment on pull requests.