ba7a1a9509
## Why The re-keyed internal `unkin.net` intermediate broke CA consumers (CNPG->RGW backups, subPath/startup-cached CA mounts) and needed manual pod restarts, because Reloader was deployed with `ignoreSecrets: true` and could not restart on the `vault-ca-cert` Secret. Enabling secret watching naively is unsafe: many workloads carry the generic `reloader.stakater.com/auto`, and the estate rotates numerous Secrets via Vault/VSO — those would restart on every rotation. This enables secret watching but scopes existing `auto` to ConfigMaps, making secret-reload opt-in per Secret. ## Changes - Set `reloader.ignoreSecrets: false` (au-syd1 reloader-system values) so Secrets are watched. - Convert every generic `reloader.stakater.com/auto: "true"` to the ConfigMap-only `configmap.reloader.stakater.com/auto: "true"` — 22 annotations across 19 files. Existing ConfigMap-reload behaviour is preserved; Vault/VSO Secret rotations no longer restart these workloads. - Add explicit `secret.reloader.stakater.com/reload: "vault-ca-cert"` to the CA consumers that mount the CA and carry a Reloader annotation: `artifactapi/api`, `cephrgw-operator`, `puppetserver-master`, `puppetserver-compiler`, `litellm`, `logarchiver`. - Add `secret.reloader.stakater.com/reload: "kanidm-tls"` so kanidm rolls when cert-manager renews its leaf. - Add `docs/ca-rotation.md` runbook (indexed in `docs/README.md`). ## Safety review (secret-only / CA workloads) `vault-ca-cert` is a plain reflected Secret that bootstraps Vault trust (not VSO-rotated; changes only on intermediate re-key). `kanidm-tls` is a cert-manager leaf. Everything else mounted (`environment`, `*-credentials`, `eyaml-keys`, `puppetboard-secrets`, `s3-credentials`, `nats-auth`, `clickhouse-credentials`, `woodpecker-*`) is VSO/CNPG Vault-rotated and deliberately excluded. - `cephrgw-operator` — mounts only Secrets (`cephrgw-credentials` VSO + `vault-ca-cert`), no ConfigMap. Its old comment said "restart when the credentials Secret rotates"; `cephrgw-credentials` is VSO so that is now excluded, and reload is scoped to `vault-ca-cert` only. Comment updated. - `nats` (logging) — old comment "Roll the StatefulSet when nats-auth changes"; `nats-auth` is VSO, so this is now ConfigMap-only (deliberately no roll on rotation). Comment updated. Same for the vector agent/aggregator/vm-ingest (VSO `nats-auth`/`clickhouse-credentials`). - `artifactapi/ui` — mounts neither a ConfigMap nor a Secret; its `auto` was already a no-op. Left as ConfigMap-only. - `puppetdb` / `puppetboard` — mount a ConfigMap plus VSO Secrets (postgres creds / puppetboard-secrets); ConfigMap-only is correct, no secret reload added. CA consumers that mount `vault-ca-cert` but have **no** Reloader annotation (CRD-managed or startup-cached) are documented in `docs/ca-rotation.md` for manual restart rather than annotated here: `grafana`, `observability/vmagent`, `paperclip`, `argocd-repo-server`, plus CNPG clusters (`kubectl cnpg restart`). ## Notes / coordination - Annotations left in their existing location (some sit on the pod template, e.g. `litellm`, `puppetdb`; Reloader reads controller-level metadata — placement unchanged from before, no regression). - Touches `apps/overlays/au-syd1/logging/values-vector-*.yaml`, which overlap open PR #320 (Tier-2 Vector pipelines) — only the one-line reloader annotation is changed here. ## Validation - `make kubeconform` — touched overlays (reloader-system, logging, woodpecker, authentik) valid; only the known-unrelated cattle-system rancher chart kubeVersion failure remains. - `uvx pre-commit run --all-files` — all hooks pass. Closes #326 --------- Co-authored-by: Ben Vincent <neotheo@gmail.com> Reviewed-on: #339 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>
106 lines
2.7 KiB
YAML
106 lines
2.7 KiB
YAML
global:
|
|
env:
|
|
# PostgreSQL primary (via pooler)
|
|
- name: AUTHENTIK_POSTGRESQL__HOST
|
|
value: postgres-pooler-rw
|
|
- name: AUTHENTIK_POSTGRESQL__PORT
|
|
value: "5432"
|
|
- name: AUTHENTIK_POSTGRESQL__NAME
|
|
value: authentik
|
|
- name: AUTHENTIK_POSTGRESQL__USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-credentials
|
|
key: username
|
|
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-credentials
|
|
key: password
|
|
# PostgreSQL read replica (via pooler)
|
|
- name: AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__HOST
|
|
value: postgres-pooler-ro
|
|
- name: AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__PORT
|
|
value: "5432"
|
|
- name: AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__NAME
|
|
value: authentik
|
|
- name: AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-credentials
|
|
key: username
|
|
- name: AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-credentials
|
|
key: password
|
|
# PostgreSQL pooler settings
|
|
- name: AUTHENTIK_POSTGRESQL__DISABLE_SERVER_SIDE_CURSORS
|
|
value: "true"
|
|
- name: AUTHENTIK_POSTGRESQL__CONN_MAX_AGE
|
|
value: "0"
|
|
- name: AUTHENTIK_POSTGRESQL__CONN_HEALTH_CHECKS
|
|
value: "true"
|
|
# Redis
|
|
- name: AUTHENTIK_REDIS__HOST
|
|
value: redis
|
|
- name: AUTHENTIK_REDIS__PORT
|
|
value: "6379"
|
|
# S3 storage
|
|
- name: AUTHENTIK_STORAGE__BACKEND
|
|
value: s3
|
|
- name: AUTHENTIK_STORAGE__S3__ENDPOINT
|
|
value: https://radosgw.service.consul/
|
|
- name: AUTHENTIK_STORAGE__S3__BUCKET_NAME
|
|
value: authentik
|
|
- name: AUTHENTIK_STORAGE__S3__ADDRESSING_STYLE
|
|
value: path
|
|
- name: AUTHENTIK_STORAGE__S3__ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: s3-credentials
|
|
key: AUTHENTIK_STORAGE__S3__ACCESS_KEY
|
|
- name: AUTHENTIK_STORAGE__S3__SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: s3-credentials
|
|
key: AUTHENTIK_STORAGE__S3__SECRET_KEY
|
|
# Secret key
|
|
- name: AUTHENTIK_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: authentik-credentials
|
|
key: AUTHENTIK_SECRET_KEY
|
|
|
|
server:
|
|
replicas: 3
|
|
annotations:
|
|
configmap.reloader.stakater.com/auto: "true"
|
|
ingress:
|
|
enabled: false
|
|
resources:
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2Gi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 512Mi
|
|
|
|
worker:
|
|
replicas: 2
|
|
annotations:
|
|
configmap.reloader.stakater.com/auto: "true"
|
|
resources:
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2Gi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|
|
|
|
postgresql:
|
|
enabled: false
|
|
|
|
redis:
|
|
enabled: false
|