rbac: allow full fetcher role provisioning in dynamic namespaces

This commit is contained in:
Naeel
2026-04-26 08:59:02 +03:00
parent 8ccc9fb342
commit f617913ad9
3 changed files with 114 additions and 6 deletions
+13
View File
@@ -43,6 +43,13 @@ subjects:
---
# ClusterRole: allows fission-executor to create/update fission-fetcher SA,
# Role and RoleBinding in any user namespace managed by NSWatcher.
#
# It also needs two less-obvious permissions:
# 1. localsubjectaccessreviews.create — setupSAAndRoleBindings checks whether
# the target SA already has each permission before creating missing rules.
# 2. events.create — Kubernetes forbids creating a Role that grants permissions
# the caller does not currently hold. Since fission-fetcher gets events.create,
# fission-executor must hold it too in order to create that Role.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -55,6 +62,12 @@ rules:
- apiGroups: [""]
resources: ["serviceaccounts"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create"]
- apiGroups: ["authorization.k8s.io"]
resources: ["localsubjectaccessreviews"]
verbs: ["create"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["get", "list", "watch", "create", "update", "patch"]