plugin-barman-cloud/internal/cnpgi
Armando Ruocco d05559a07f fix(rbac): reconcile Role when ObjectStore spec changes
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 referencing
Clusters and update their Roles directly. Extract ensureRole into a
shared rbac.EnsureRole function used by both the Pre hook and the
ObjectStore controller.

The shared EnsureRole accepts optional beforeCreate callbacks so the
Pre hook can set owner references on Role creation, while the
ObjectStore controller path skips ownership (it only updates existing
Roles).

Handle deleted ObjectStores gracefully by skipping NotFound errors
during Role reconciliation, and filter status-only changes with
GenerationChangedPredicate.

Add RBAC permission for the plugin to list/watch Clusters so the
ObjectStore controller can find affected Clusters. Regenerate
config/rbac/role.yaml.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
2026-03-26 16:14:24 +01:00
..
common fix: disable management of end-of-wal file flag during backup restoration (#604) 2025-10-17 19:16:54 +02:00
instance fix(deps): update module sigs.k8s.io/controller-runtime to v0.23.1 (#748) 2026-01-29 19:39:06 +01:00
metadata chore(main): release 0.11.0 (#717) 2026-01-30 16:32:12 +01:00
operator fix(rbac): reconcile Role when ObjectStore spec changes 2026-03-26 16:14:24 +01:00
restore fix: don't log full environment variables at default log level (#589) 2025-11-21 10:15:34 +01:00