Skip to content

Conversation

@simontesar
Copy link

No description provided.

@github-actions github-actions bot added the fix label Jan 30, 2026
@simontesar simontesar marked this pull request as ready for review January 30, 2026 06:38
@simontesar simontesar requested a review from OlegErshov January 30, 2026 10:10
Copy link
Contributor

@nexus49 nexus49 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we can manage the AccountInfo finalizer from the AuthorizationModel Subroutine as the logic for its removal needs to consider all APIBindings in that particular workspace.

I'd suggest to add a very basic accountInfo subroutine/controller that considers all APIbindings in the workspace and only manages the finalizer

Comment on lines +148 to +154
if controllerutil.ContainsFinalizer(&toDeleteAccountInfo, authorizationModelGenerationFinalizer) {
controllerutil.RemoveFinalizer(&toDeleteAccountInfo, authorizationModelGenerationFinalizer)
if err := bindingCluster.GetClient().Update(ctx, &toDeleteAccountInfo); err != nil {
return ctrl.Result{}, errors.NewOperatorError(fmt.Errorf("updating AccountInfo to remove finalizer: %w", err), true, true)
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this behavior is correct. The AccountInfo finalizer can then only be removed if there are no other APIBindings with the platform-mesh finalizer. Not only relative to a particular APIExport

@simontesar
Copy link
Author

I don't believe we can manage the AccountInfo finalizer from the AuthorizationModel Subroutine as the logic for its removal needs to consider all APIBindings in that particular workspace.

I'd suggest to add a very basic accountInfo subroutine/controller that considers all APIbindings in the workspace and only manages the finalizer

I agree on the problem, this was an oversight because I still have a hard time wrapping my head around how things get reconciled here. I'll try to implement what you're suggesting for now, but am still questioning whether this should be a controller reconcliling APIBindings because we cannot track state this way.

@simontesar
Copy link
Author

Superseded by #308

@simontesar simontesar closed this Feb 2, 2026
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.

4 participants