-
Notifications
You must be signed in to change notification settings - Fork 629
🐛 Don't overwrite subnet spec tags with AWS tags #5474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Don't overwrite subnet spec tags with AWS tags #5474
Conversation
476a202
to
b538673
Compare
b538673
to
bd953e3
Compare
Pinging @mtulio as you were interested on the subnet tags in the past 🙂 |
/test pull-cluster-api-provider-aws-e2e |
Hey @fiunchinho , Thanks for pinging! Good catch! Overall looks good to me. Do you think this scenario would be possible to reproduce in the tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I don't think there is any test currently that asserts behavior after running multiple reconciliations. This bug only surfaces when reconciling the same subnet several times. So I'm not really sure if we can easy test this, or if it's even worth it. |
/lgtm |
/lgtm |
/assign @AndiDog @richardcase @nrb for approval |
/test pull-cluster-api-provider-aws-e2e |
/retest |
/test pull-cluster-api-provider-aws-e2e |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nrb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…e-subnet-tags 🐛 Don't overwrite subnet spec tags with AWS tags
What type of PR is this?
/kind bug
What this PR does / why we need it:
When trying to update a subnet tag that is already present on AWS to a different value, CAPA keeps reconciling the
AWCluster
forever, flapping between the different values of the tag. When reconciling the subnet tags this is what happenssubnet-1a2b3c
has the tagcustomtag: 1
customtag: 2
(different from the value in theAWSCluster
CR)customtag: 1
AWSCluster
CR are saved back to the k8s api. So the tag from AWScustomtag: 2
is saved to the AWSCluster CRcustomtag: 2
to the subnet in AWS (because that's the value in the AWSCluster CR for this reconciliation), and it appliescustomtag: 1
to theAWSCluster
CR (because that's the value in AWS)With the change on this PR, what we are doing is that the tags already present on AWS are not saved back to the
AWSCluster
.Special notes for your reviewer:
Checklist:
Release note: