mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
fix: role patching (#325)
Closes: #318 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
parent
9db184f5d4
commit
f484b9e748
@ -160,7 +160,13 @@ func (r ReconcilerImplementation) ensureRole(
|
||||
"rules", newRole.Rules,
|
||||
)
|
||||
|
||||
return r.Client.Patch(ctx, newRole, client.MergeFrom(&role))
|
||||
oldRole := role.DeepCopy()
|
||||
|
||||
// Apply to the role the new rules
|
||||
role.Rules = newRole.Rules
|
||||
|
||||
// Push it back to the API server
|
||||
return r.Client.Patch(ctx, &role, client.MergeFrom(oldRole))
|
||||
}
|
||||
|
||||
func (r ReconcilerImplementation) ensureRoleBinding(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user