We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9db184f commit f484b9eCopy full SHA for f484b9e
internal/cnpgi/operator/reconciler.go
@@ -160,7 +160,13 @@ func (r ReconcilerImplementation) ensureRole(
160
"rules", newRole.Rules,
161
)
162
163
- return r.Client.Patch(ctx, newRole, client.MergeFrom(&role))
+ oldRole := role.DeepCopy()
164
+
165
+ // Apply to the role the new rules
166
+ role.Rules = newRole.Rules
167
168
+ // Push it back to the API server
169
+ return r.Client.Patch(ctx, &role, client.MergeFrom(oldRole))
170
}
171
172
func (r ReconcilerImplementation) ensureRoleBinding(
0 commit comments