cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

Removal of paused clusters or namespace containing it get stuck

Open pedjak opened this issue 2 years ago • 3 comments
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 AWSCluster foo instance by adding cluster.x-k8s.io/paused annotation to it
  • Try to remove either the whole namespace of just AWSCluster instance using kubectl 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

pedjak avatar Oct 19 '23 10:10 pedjak