kubernetes-sigs / cluster-api-provider-openstack

Cluster API implementation for OpenStack
https://cluster-api-openstack.sigs.k8s.io/
Apache License 2.0
275 stars 253 forks source link

Bastion security group is not deleted when removing a cluster that had bastion and then disabled #2113

Closed EmilienM closed 3 weeks ago

EmilienM commented 3 weeks ago

/kind bug

What steps did you take and what happened: If you have deployed a cluster with managed security groups that has a bastion, then we have a security group created for the bastion. If the user disables the bastion, the bastion server and ports get deleted but not the security group. The security group gets removed from the cluster status though.

When removing the cluster, the bastion security group is not deleted and remained a staled resource.

What did you expect to happen:

We should have deleted the bastion security group in the first place when the bastion was disabled.