Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Dec 2, 2025

Backport

This will backport the following commits from main to release/v25.1.x:

Questions ?

Please refer to the Backport tool documentation

* feat(operator): implement role membership reconciliation

- Add ManagedPrincipals status field to track membership management
- Update controller to reconcile membership changes (add/remove/clear)
- Add ClearPrincipals method for transitioning to unmanaged mode
- Add comprehensive unit tests for membership updates
- Add acceptance tests for principals management scenarios

Implements strict membership management where operator reconciles
all members in spec. When spec.principals is empty/nil, operator
stops managing membership (managedPrincipals=false).

* chore: add changelog entry for role membership reconciliation

* fix(acceptance): update test for always-manage-role pattern

The operator always takes full ownership of roles it manages,
regardless of whether they pre-existed. Updated the authorization-only
test to expect role deletion when the CRD is removed.

Also updated controller to set managedRole=true when managing
pre-existing roles to ensure proper cleanup.

(cherry picked from commit 7b1c1df)

# Conflicts:
#	acceptance/features/role-crds.feature
#	acceptance/steps/register.go
#	acceptance/steps/roles.go
#	operator/api/applyconfiguration/redpanda/v1alpha2/rolestatus.go
#	operator/api/redpanda/v1alpha2/role_types.go
#	operator/api/redpanda/v1alpha2/testdata/crd-docs.adoc
#	operator/config/crd/bases/cluster.redpanda.com_redpandaroles.yaml
#	operator/internal/controller/redpanda/role_controller.go
#	operator/internal/controller/redpanda/role_controller_test.go
#	operator/pkg/client/roles/client.go
@RafalKorepta
Copy link
Contributor

Back port is not needed

@RafalKorepta RafalKorepta deleted the backport/release/v25.1.x/pr-1192 branch December 12, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants