Files
homelab/k8s/infra/rbac/kmsvc-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.2 KiB
YAML

# Scoped operator access for kmsvc-admins: management-service + its own
# config only. kmsvc-* CA/cluster/pool secrets and the strimzi-cluster-
# operator configmap are Strimzi-managed - hand-editing them gets reverted
# by the operator's reconcile loop or breaks the Kafka cluster. Inert until
# kube-apiserver's OIDC wiring lands.
apiVersion: v1
kind: ServiceAccount
metadata:
name: kmsvc
namespace: sqs
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kmsvc-operator
namespace: sqs
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
resourceNames: ["management-service"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["management-service-config"]
verbs: ["get", "list", "watch", "update", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kmsvc-admins-binding
namespace: sqs
subjects:
- kind: Group
name: "oidc:kmsvc-admins"
apiGroup: rbac.authorization.k8s.io
- kind: ServiceAccount
name: kmsvc
namespace: sqs
roleRef:
kind: Role
name: kmsvc-operator
apiGroup: rbac.authorization.k8s.io