Files
homelab/k8s/infra/rbac/poimen-memory-operator-role.yaml
T
Story Crater Bot e4de366d2a feat: add ServiceAccounts for poimen-memory/kmsvc/immich operator Roles
Bind each service's operator Role to a ServiceAccount alongside the
existing oidc:*-admins Group, and wire serviceAccountName into the
pods we control (immich-server, immich-machine-learning,
management-service). poimen-memory's Deployment lives in its own
repo/ArgoCD app, so its SA is created here but not yet wired to a pod.
2026-08-26 19:51:05 -07:00

43 lines
1.3 KiB
YAML

# Scoped operator access for poimen-memory-admins: the poimen-memory
# deployment + its own config/secrets only. memory-db-* (CNPG-managed) and
# poimen-git-info/poimen-secrets-* (owned by poimen's own repo/ArgoCD app,
# not this one) are excluded. Inert until kube-apiserver's OIDC wiring lands
# (--oidc-groups-claim=groups, --oidc-groups-prefix=oidc:).
apiVersion: v1
kind: ServiceAccount
metadata:
name: poimen-memory
namespace: poimen
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: poimen-memory-operator
namespace: poimen
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
resourceNames: ["poimen-memory"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
resourceNames: ["poimen-memory-api-key", "poimen-memory-secrets"]
verbs: ["get", "list", "watch", "update", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: poimen-memory-admins-binding
namespace: poimen
subjects:
- kind: Group
name: "oidc:poimen-memory-admins"
apiGroup: rbac.authorization.k8s.io
- kind: ServiceAccount
name: poimen-memory
namespace: poimen
roleRef:
kind: Role
name: poimen-memory-operator
apiGroup: rbac.authorization.k8s.io