After adding a tag to a subnet, it can't be removed #5121
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
/kind bug
What steps did you take and what happened:
Using
managed
VPC and subnets, I wanted to add tags to the subnets that CAPA would create. For that I set the desired tags in theAWSCluster.spec.network.subnets[].tags
. The tags were added successfully to the created subnets. But If I delete any of the tags, they won't ever be removed.This is because CAPA network reconciler goes to fetch the existing subnets on AWS, and copies the details to the subnets in the
AWSCluster
CR. This means that whatever tags already exist on AWS are the tags that will be used during the reconciliation.Removing the tag directly from AWS, allows me to delete the tag. But tags need to be deleted the same way they were added.
What did you expect to happen:
Deleting tags from subnets defined in
AWSCluster
CR would actually remove the tags on the AWS Subnet resource.Anything else you would like to add:
It looks like the source of truth is the AWS Subnet resource, rather than the subnet spec in the
AWSCluster
. Is this by design or a mistake?Environment:
kubectl version
): 1.28/etc/os-release
):The text was updated successfully, but these errors were encountered: