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.
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
# Scoped operator access for immich-admins: restart/config-edit rights on
|
|
# just this service's own resources, nothing CNPG-managed (immich-db-*) or
|
|
# provisioning-managed (immich-oidc). Same pattern as
|
|
# k8s/apps/paperless/rbac.yaml. Inert until kube-apiserver's OIDC wiring
|
|
# lands (--oidc-groups-claim=groups, --oidc-groups-prefix=oidc:).
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: immich
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: immich-operator
|
|
rules:
|
|
- apiGroups: ["apps"]
|
|
resources: ["deployments"]
|
|
resourceNames: ["immich-server", "immich-machine-learning"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: [""]
|
|
resources: ["configmaps"]
|
|
resourceNames: ["immich-config"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: [""]
|
|
resources: ["secrets"]
|
|
resourceNames: ["immich-oidc"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: immich-admins-binding
|
|
subjects:
|
|
- kind: Group
|
|
name: "oidc:immich-admins"
|
|
apiGroup: rbac.authorization.k8s.io
|
|
- kind: ServiceAccount
|
|
name: immich
|
|
namespace: immich
|
|
roleRef:
|
|
kind: Role
|
|
name: immich-operator
|
|
apiGroup: rbac.authorization.k8s.io
|