Files
homelab/k8s/infra/rbac/kmsvc-operator-role.yaml
T

43 lines
1.2 KiB
YAML
Raw Normal View History

# 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