Eight objects cover grafana, argocd, comfyui, minio, paperless, immich, forgejo and api-gw. Each names its ZITADEL app, the Secret it writes, the consumer to roll and whether the consumer reloads hot or needs a restart. All are suspended: the controller image does not exist yet, and an unsuspended object would claim an intent that no process acts on. The README records the retirement target for the 34 .enc.yaml files: six root-of-trust secrets that cannot rotate themselves survive, everything else becomes a KeyRotation and leaves git.
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: key-rotation-controller
|
|
namespace: iam
|
|
---
|
|
# Cluster-wide because a credential and its consumer live in different namespaces:
|
|
# the Secret in one, the workload in another.
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: key-rotation-controller
|
|
rules:
|
|
- apiGroups: ["iam.homelab.riotpiao.com"]
|
|
resources: ["keyrotations"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: ["iam.homelab.riotpiao.com"]
|
|
resources: ["keyrotations/status"]
|
|
verbs: ["get", "update", "patch"]
|
|
# The controller writes the credential it just created.
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
verbs: ["get", "create", "update", "patch"]
|
|
# Rolling a consumer that cannot hot reload.
|
|
- apiGroups: ["apps"]
|
|
resources: ["deployments", "statefulsets"]
|
|
verbs: ["get", "list", "watch", "patch"]
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["create", "patch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: key-rotation-controller
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: key-rotation-controller
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: key-rotation-controller
|
|
namespace: iam
|