Skip to content

Conversation

@reshnm
Copy link
Contributor

@reshnm reshnm commented Aug 4, 2025

What this PR does / why we need it:

When the authorization component is being deleted it must be ensured that all ClusterAdmin resources with the same name as the authorization component are being deleted before the deletion can continue.
Otherwise the ClusterAdmin resource will be orphaned and can't be deleted.

Which issue(s) this PR fixes:
Fixes #112

Special notes for your reviewer:

Release note:

Ensure that the corresponding ClusterAdmin resource is deleted before the ManagedControlPlane is being deleted.

@reshnm reshnm requested a review from Diaphteiros August 4, 2025 11:55
@reshnm reshnm changed the title fix: authorization controller triggers deletion clusteradmin fix: authorization controller triggers deletion of clusteradmin Aug 4, 2025
@Diaphteiros
Copy link
Contributor

This fixes #112, I guess?

@Diaphteiros
Copy link
Contributor

This fixes #112, I guess?

Hm, no, I guess it doesn't, because it removes only a single ClusterAdmin resource and not potentially more user-created ones.

Should we directly implement a fix for #112 ?
I assume that all ClusterAdmin resources belonging to an MCP become orphaned and unable to be deleted when the MCP is removed?

@reshnm
Copy link
Contributor Author

reshnm commented Aug 4, 2025

This fixes #112, I guess?

Hm, no, I guess it doesn't, because it removes only a single ClusterAdmin resource and not potentially more user-created ones.

Should we directly implement a fix for #112 ? I assume that all ClusterAdmin resources belonging to an MCP become orphaned and unable to be deleted when the MCP is removed?

A MCP should only delete its own ClusterAdmin resources.
The Project Workspace Operator has a feature that can block deletion until all resources of a GVK are being deleted.

The owner of the Workspace should be able to delete all ClusterAdmins before the workspace is being deleted.

@reshnm reshnm merged commit 304dcc7 into main Aug 4, 2025
10 checks passed
@reshnm reshnm deleted the fix/trigger-deletion-of-clusteradmin branch August 4, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove leftover ClusterAdmin resources

2 participants