kubernetes.io/cluster/<cluster-name>:shared tag on unmanaged subnets won't be removed on cluster deletion #4133
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
triage/duplicate
Indicates an issue is a duplicate of other open issue.
/kind bug
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
In BYOI https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/docs/book/src/topics/bring-your-own-aws-infrastructure.md case, when deleting subnets https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/pkg/cloud/services/network/subnets.go#L278 in ReconcileDelete cluster, it just skips the unmanaged subnets and won't remove the tags (https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/pkg/cloud/services/network/subnets.go#L506
kubernetes.io/cluster/<cluster-name>:shared
) added for this cluster on the unmanaged subnets.When customer have many clusters created and deleted, the tags are staled on those unmanaged subnets. Even worse, as more and more clusters create and delete, customers will hit tag limitation for these subnets in their environment. They cannot create new clusters with these unmanaged subnets and have to remove these tags manually to workaround.
What did you expect to happen:
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: