User-provided Name
tag on subnets get overwritten
#3989
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
/kind bug
What steps did you take and what happened:
Specify a subnet on an
AWSCluster
CR that has aName
tag defined. E.g.This
Name
tag will be instead replaced with one built in code and instead becomeName: example-subnet-private-eu-north-1a
What did you expect to happen:
If a
Name
tag is provided by the user it is what should be used when creating / updating the subnet. If not provided CAPA should default to the current generated format.Anything else you would like to add:
Block of code building the Name value: https://github.com/giantswarm/cluster-api-provider-aws/blob/70373384dc117ea387d28a8548d49ecc58e7cca0/pkg/cloud/services/network/subnets.go#L426-L441
Block of code overwriting any user-provided Name tag: https://github.com/giantswarm/cluster-api-provider-aws/blob/70373384dc117ea387d28a8548d49ecc58e7cca0/api/v1beta1/tags.go#L198-L200
As far as I can see, that tag isn't used anywhere in the codebase for matching or looking up of subnets. It seem purely for display.
Multiple subnets can end up with the same Name value.
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: