cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
Removal of paused clusters or namespace containing it get stuck
trafficstars
/kind bug
What steps did you take and what happened:
- Create a cluster with:
clusterctl generate cluster foo --kubernetes-version=1.26.0 | kubectl apply -f - - Pause
AWSClusterfooinstance by addingcluster.x-k8s.io/pausedannotation to it - Try to remove either the whole namespace of just
AWSClusterinstance usingkubectl delete awscluster foo- it hangs there forever
An user should be very surprised to discover that deletion of paused objects or higher order objects get stuck.
What did you expect to happen:
A paused resource should be removable, i.e. kubectl delete awscluster foo should remove the cluster.
Anything else you would like to add:
The controller returns very early when a cluster is paused, keeping the finalizer that blocks the deletion.
Environment:
- Cluster-api-provider-aws version: 2.2.4