0ddb57f687
Vault is the source of truth for the sonarr/radarr/prowlarr API keys (override bootstrap): keys are minted in Vault and enforced into each app's /config/config.xml on startup, replacing the images' self-generated keys. - add a VaultAuth 'default' in the arrstack namespace (k8s auth, mount k8s/au/syd1, role default, SA default) mirroring the jellyfin pattern - add a per-app VaultStaticSecret syncing kv/kubernetes/namespace/arrstack/default/<app> (key apitoken) into the <app>-apikey Secret; the default k8s role's templated policy already grants read there, so no terraform-vault change is needed - add an apikey-init initContainer to each deployment that fails closed on a missing/non-hex key and writes/updates only the <ApiKey> element in /config/config.xml (busybox via artifactapi, runs as root) - wire the new manifests into the base and per-app kustomizations nzbget is out of scope (no config.xml <ApiKey>; uses ControlPassword).
26 lines
877 B
YAML
26 lines
877 B
YAML
---
|
|
# prowlarr API key. Seeded at kv/kubernetes/namespace/arrstack/default/prowlarr
|
|
# (key: apitoken); the default k8s role's templated policy already grants read
|
|
# on kv/data/kubernetes/namespace/{{sa_namespace}}/{{sa_name}}/* for the
|
|
# arrstack/default ServiceAccount, so no terraform-vault change is needed. VSO
|
|
# syncs it into the prowlarr-apikey Secret that the apikey-init initContainer reads
|
|
# to enforce <ApiKey> in /config/config.xml (Vault is source of truth).
|
|
apiVersion: secrets.hashicorp.com/v1beta1
|
|
kind: VaultStaticSecret
|
|
metadata:
|
|
name: prowlarr-apikey
|
|
namespace: arrstack
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "0"
|
|
spec:
|
|
destination:
|
|
create: true
|
|
name: prowlarr-apikey
|
|
overwrite: true
|
|
hmacSecretData: true
|
|
mount: kv
|
|
path: kubernetes/namespace/arrstack/default/prowlarr
|
|
refreshAfter: 5m
|
|
type: kv-v2
|
|
vaultAuthRef: default
|