feat: platform recipes mail, keycloak, forgejo, forgejo-runner and keda #2

Merged
crapougnax merged 1 commit from feat/platform-identity-forge into develop 2026-11-09 12:46:04 +00:00
Member

Second extraction PR (Tycho RFC-001 §9 phase 2).

Recipes

Recipe Change vs the instance copy
mail ${MAIL_HOSTNAME}, ${MAIL_DOMAIN}; credentials only in the target Secret smtp-relay-credentials
keycloak ${KEYCLOAK_HOST}, ${STORAGE_CLASS_BLOCK_RETAIN}; the instance login theme leaves the base → component theme (ConfigMap keycloak-theme from the target, installed as ${KEYCLOAK_THEME_NAME}); new component realm-import
forgejo ${FORGEJO_HOST}, ${FORGEJO_MAIL_FROM}, storage placeholder; base serves one hostname; components registry-host and apex-packages (OCI /v2, npm /@scope on a bare domain); option actions-runner
forgejo-runner generic runner name; component auto-register
keda upstream release manifest + descriptor

app.kubernetes.io/part-of instance labels removed everywhere.

actions-runner / auto-register

Job forgejo-runner-register (namespace forgejo-runner, Argo CD PostSync hook, idempotent):

  1. leaves a complete forgejo-runner-secret untouched;
  2. otherwise, through kubectl exec in the Forgejo pod: forgejo actions generate-runner-token, then admin service account ci-autoscaler and an access token read:admin for the KEDA scaler;
  3. writes the Secret. No value printed; delete the Secret to rotate.

RBAC is minimal: pods/exec in git, and get/update/patch on that single Secret name (plus create) in forgejo-runner. Non-root, read-only root filesystem, all capabilities dropped. Image alpine/kubectl:1.35.4.

Effect on targets when they switch

  • Keycloak and Forgejo pod templates change (labels, theme volume removed): one restart each (strategy Recreate, about a minute of downtime). Covered by the target runbooks.
  • PVC storageClassName comes from the target (immutable field: the target must keep its current value).

Checks

  • bun run validate: OK (each component alone); keycloak realm-import+theme and forgejo registry-host+apex-packages rendered together
  • gitleaks: no leaks (one inline allow for a credential-free in-cluster JDBC URL)

Next

PR 3: backup, discourse, argocd. PR 4: Astro app template, forgejo seed, app-environments, cert-manager DNS-01.

🤖 Generated with Claude Code

Second extraction PR (Tycho RFC-001 §9 phase 2). ## Recipes | Recipe | Change vs the instance copy | |---|---| | `mail` | `${MAIL_HOSTNAME}`, `${MAIL_DOMAIN}`; credentials only in the target Secret `smtp-relay-credentials` | | `keycloak` | `${KEYCLOAK_HOST}`, `${STORAGE_CLASS_BLOCK_RETAIN}`; the instance login theme leaves the base → component `theme` (ConfigMap `keycloak-theme` from the target, installed as `${KEYCLOAK_THEME_NAME}`); new component `realm-import` | | `forgejo` | `${FORGEJO_HOST}`, `${FORGEJO_MAIL_FROM}`, storage placeholder; base serves one hostname; components `registry-host` and `apex-packages` (OCI `/v2`, npm `/@scope` on a bare domain); option `actions-runner` | | `forgejo-runner` | generic runner name; component `auto-register` | | `keda` | upstream release manifest + descriptor | `app.kubernetes.io/part-of` instance labels removed everywhere. ## `actions-runner` / `auto-register` Job `forgejo-runner-register` (namespace `forgejo-runner`, Argo CD PostSync hook, idempotent): 1. leaves a complete `forgejo-runner-secret` untouched; 2. otherwise, through `kubectl exec` in the Forgejo pod: `forgejo actions generate-runner-token`, then admin service account `ci-autoscaler` and an access token `read:admin` for the KEDA scaler; 3. writes the Secret. No value printed; delete the Secret to rotate. RBAC is minimal: `pods/exec` in `git`, and `get/update/patch` on that single Secret name (plus `create`) in `forgejo-runner`. Non-root, read-only root filesystem, all capabilities dropped. Image `alpine/kubectl:1.35.4`. ## Effect on targets when they switch - Keycloak and Forgejo pod templates change (labels, theme volume removed): **one restart each** (strategy Recreate, about a minute of downtime). Covered by the target runbooks. - PVC `storageClassName` comes from the target (immutable field: the target must keep its current value). ## Checks - `bun run validate`: OK (each component alone); keycloak `realm-import`+`theme` and forgejo `registry-host`+`apex-packages` rendered together - gitleaks: no leaks (one inline allow for a credential-free in-cluster JDBC URL) ## Next PR 3: backup, discourse, argocd. PR 4: Astro app template, forgejo `seed`, `app-environments`, cert-manager DNS-01. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat: platform recipes mail, keycloak, forgejo, forgejo-runner and keda
Some checks failed
CI / CI (pull_request) Failing after 16s
628cd31a75
- mail: MAIL_HOSTNAME and MAIL_DOMAIN placeholders; credentials only in
  the target's Secret smtp-relay-credentials.
- keycloak: KEYCLOAK_HOST and STORAGE_CLASS_BLOCK_RETAIN placeholders; the
  instance login theme leaves the base for the optional component theme
  (ConfigMap keycloak-theme provided by the target); new component
  realm-import (realms imported at startup from Secret keycloak-realm).
- forgejo: FORGEJO_HOST, FORGEJO_MAIL_FROM and storage placeholders; the
  base serves one hostname; components registry-host and apex-packages
  (OCI /v2 and npm /@scope on a bare domain); option actions-runner.
- forgejo-runner: generic runner name; component auto-register, a Job that
  generates the runner registration token and a read:admin token for KEDA
  through the Forgejo CLI and writes forgejo-runner-secret, idempotent and
  without printing any value.
- keda: upstream release manifest, descriptor added.
- Instance labels app.kubernetes.io/part-of removed from every manifest.
- Validator: placeholders start with a letter; shell scripts use $VAR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crapougnax merged commit 33f3e14e26 into develop 2026-11-09 12:46:04 +00:00
crapougnax deleted branch feat/platform-identity-forge 2026-11-09 12:46:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tycho/catalog!2
No description provided.