plugin-barman-cloud/internal/cnpgi/operator
Armando Ruocco 8971a397f4
fix(rbac): reconcile Role when ObjectStore spec changes (#823)
When an ObjectStore's credentials change (e.g., secret rename), the
RBAC Role granting the Cluster's ServiceAccount access to those
secrets was not updated because nothing triggered a Cluster
reconciliation.

Implement the ObjectStore controller's Reconcile to detect affected
Roles and update their rules directly, without needing access to
Cluster objects. The controller lists Roles by a label set by the
Pre hook, inspects their rules to find which ObjectStores they
reference, fetches those ObjectStores, and patches the rules to
match the current specs.

Replace the custom setOwnerReference helper with
controllerutil.SetControllerReference. Add dynamic CNPG scheme
registration (internal/scheme) to the operator, instance, and
restore managers.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
2026-04-13 15:48:35 +02:00
..
config feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
rbac fix(rbac): reconcile Role when ObjectStore spec changes (#823) 2026-04-13 15:48:35 +02:00
specs fix(rbac): reconcile Role when ObjectStore spec changes (#823) 2026-04-13 15:48:35 +02:00
doc.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
identity.go fix(metrics): announce sidecar injection capability (#776) 2026-03-31 15:36:09 +02:00
lifecycle_certificates.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
lifecycle_envs.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
lifecycle_resources.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
lifecycle_test.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
lifecycle.go chore(deps): update golangci/golangci-lint docker tag to v2.8.0 (#721) 2026-01-14 12:20:09 +01:00
manager.go fix(rbac): reconcile Role when ObjectStore spec changes (#823) 2026-04-13 15:48:35 +02:00
reconciler.go fix(rbac): reconcile Role when ObjectStore spec changes (#823) 2026-04-13 15:48:35 +02:00
start.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00
suite_test.go feat(ip): assign copyright to the Linux Foundation (#571) 2025-10-07 18:06:06 +02:00