Skip to content

Conversation

@zzzeek
Copy link
Contributor

@zzzeek zzzeek commented Jul 1, 2025

in mariadbdatabase_funcs, the EnsureMariaDBAccount function
called by external controllers adds a finalizer for that calling
controller to the Secret referenced by the MariaDBAccount. This
seems a little off, since the Secret is most immediately needed
by the MariaDBAccount CR itself, and the controller refers to that
MariaDBAccount CR also. It seems more appropriate that
MariaDBAccount itself should maintain its own finalizer on that
Secret, so this logic is added there.

The change here causes the API function EnsureMariaDBAccount
to add a finalizer to the secret that is local to the mariadbaccount,
rather than the helper passed for the calling controller.
Existing "remove finalizer" calls which look for the calling
controller's finalizer tag in the secret are maintained however
to assist with backwards compatibility.

This comes up now because we are seeking to add a new class of
system-level MariaDBAccount that
is used only by the Galera controller itself, but also that these
accounts (really all accounts, but mainly the system ones) will
support in-place password changes by updating the name of the Secret
to be used, implying the old one is no longer needed once the change
takes place; it therefore is most appropriate that MariaDBAccount
maintain its own finalizers on these secrets.

@openshift-ci openshift-ci bot requested review from dprince and frenzyfriday July 1, 2025 13:08
@zzzeek zzzeek changed the title add MariaDBAccount finalizer to Secret (and remove on delete) add MariaDBAccount finalizer to Secret (and remove on delete) (PR 3 of 6) Jul 1, 2025
@zzzeek zzzeek force-pushed the OSPRH-14916-pr3 branch 2 times, most recently from 193486c to 76514e6 Compare July 4, 2025 01:00
@zzzeek zzzeek force-pushed the OSPRH-14916-pr3 branch 2 times, most recently from 2c15104 to 6633878 Compare August 18, 2025 19:22
@zzzeek zzzeek force-pushed the OSPRH-14916-pr3 branch 2 times, most recently from 002d4b0 to 7a7e73c Compare October 11, 2025 22:11
@zzzeek
Copy link
Contributor Author

zzzeek commented Oct 11, 2025

/recheck

@zzzeek
Copy link
Contributor Author

zzzeek commented Oct 11, 2025

/retest

@zzzeek zzzeek force-pushed the OSPRH-14916-pr3 branch 2 times, most recently from 59f8e74 to edb9263 Compare November 5, 2025 13:50
in mariadbdatabase_funcs, the EnsureMariaDBAccount function
called by external controllers adds a finalizer for that calling
controller to the Secret referenced by the MariaDBAccount.  This
seems a little off, since the Secret is most immediately needed
by the MariaDBAccount CR itself, and the controller refers to that
MariaDBAccount CR also.   It seems more appropriate that
MariaDBAccount itself should maintain its own finalizer on that
Secret, so this logic is added there.

The change here causes the API function EnsureMariaDBAccount
to add a finalizer to the secret that is local to the mariadbaccount,
rather than the helper passed for the calling controller.
Existing "remove finalizer" calls which look for the calling
controller's finalizer tag in the secret are maintained however
to assist with backwards compatibility.

This comes up now because we are seeking to add a new class of
system-level MariaDBAccount that
is used only by the Galera controller itself, but also that these
accounts (really all accounts, but mainly the system ones) will
support in-place password changes by updating the name of the Secret
to be used, implying the old one is no longer needed once the change
takes place; it therefore is most appropriate that MariaDBAccount
maintain its own finalizers on these secrets.
@dciabrin
Copy link
Contributor

dciabrin commented Nov 6, 2025

/lgtm

@lmiccini
Copy link

lmiccini commented Nov 6, 2025

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lmiccini, zzzeek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Nov 6, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 44d4046 into openstack-k8s-operators:main Nov 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants