grant work-agent the permission to update namespace

Signed-off-by: Yang Le <yangle@redhat.com>
This commit is contained in:
Yang Le
2021-07-07 10:58:24 +08:00
parent 3a37a4917b
commit d46ba2ee89
2 changed files with 4 additions and 4 deletions

View File

@@ -8,10 +8,10 @@ rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
# Allow agent to create/delete namespaces, get/list are contained in admin role already
# Allow agent to create/update/patch/delete namespaces, get/list/watch are contained in admin role already
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["create", "delete"]
verbs: ["create", "update", "patch", "delete"]
# Allow agent to manage role/rolebinding/clusterrole/clusterrolebinding
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterrolebindings", "rolebindings"]

View File

@@ -728,10 +728,10 @@ rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
# Allow agent to create/delete namespaces, get/list are contained in admin role already
# Allow agent to create/update/patch/delete namespaces, get/list/watch are contained in admin role already
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["create", "delete"]
verbs: ["create", "update", "patch", "delete"]
# Allow agent to manage role/rolebinding/clusterrole/clusterrolebinding
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterrolebindings", "rolebindings"]