Skip to content

Commit ae2bd7d

Browse files
committed
fix: Allow clusterroles bind for the operator on the nodes clusterrole too
1 parent 91631c1 commit ae2bd7d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

deploy/helm/hdfs-operator/templates/clusterrole-operator.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,13 @@ rules:
133133
verbs:
134134
- create
135135
- patch
136-
# Allow binding the product ClusterRole when creating per-cluster RoleBindings.
136+
# Allow binding the product ClusterRoles:
137+
# - hdfs-clusterrole: referenced by per-cluster RoleBindings created by the operator
138+
# - hdfs-clusterrole-nodes: referenced by the shared hdfs-clusterrolebinding-nodes
139+
# ClusterRoleBinding managed by the operator. The bind verb is required because the
140+
# operator itself does not hold all permissions that hdfs-clusterrole-nodes grants
141+
# (nodes, endpoints, pods, listeners), so Kubernetes would otherwise reject the
142+
# ClusterRoleBinding patch as a privilege escalation.
137143
- apiGroups:
138144
- rbac.authorization.k8s.io
139145
resources:
@@ -142,3 +148,4 @@ rules:
142148
- bind
143149
resourceNames:
144150
- {{ include "operator.name" . }}-clusterrole
151+
- {{ include "operator.name" . }}-clusterrole-nodes

0 commit comments

Comments
 (0)