Skip to content
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

[release-2.2] cherry-pick: Fix cluster-api-provider-last-applied-tags-on-volumes to recalculate the value on each reconcile #4535

Merged

Conversation

Ankitasw
Copy link
Member

@Ankitasw Ankitasw commented Oct 3, 2023

What type of PR is this?
/kind bug

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
cherry-pick of #4531

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

Release note:

Fixed a bug with the `sigs.k8s.io/cluster-api-provider-aws-last-applied-tags` annotation that could cause excessive metadata values on AWSMachines. 

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 3, 2023
…the annotation value each reconcile instead of reusing the previous value
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 3, 2023
@Ankitasw Ankitasw changed the title Cleanup volume tags [release-2.2] cherry-pick: Fix cluster-api-provider-last-applied-tags-on-volumes to recalculate the value on each reconcile Oct 3, 2023
@Ankitasw
Copy link
Member Author

Ankitasw commented Oct 3, 2023

cc @cnmcavoy

@richardcase
Copy link
Member

/milestone v2.2.3

@k8s-ci-robot k8s-ci-robot added this to the v2.2.3 milestone Oct 3, 2023
@Ankitasw Ankitasw added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Ankitasw
Copy link
Member Author

Ankitasw commented Oct 3, 2023

cc @Skarlso @richardcase for LGTM

@Skarlso
Copy link
Contributor

Skarlso commented Oct 3, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2023
@k8s-ci-robot k8s-ci-robot merged commit 9b10597 into kubernetes-sigs:release-2.2 Oct 3, 2023
9 checks passed
for _, volumeID := range instance.VolumeIDs {
if subAnnotation, ok := annotations[volumeID].(map[string]interface{}); ok {
newAnnotation, err := r.ensureVolumeTags(ec2svc, aws.String(volumeID), subAnnotation, machine.Spec.AdditionalTags)
newAnnotation, err := r.ensureVolumeTags(ec2svc, aws.String(volumeID), subAnnotation, additionalTags)
Copy link
Contributor

@philjb philjb Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other side of this else was also supposed to be changed if #4512 was pulled in fully (that line and the test from that pr were not pulled in). This means release 2.2.4 contains some unapproved combination of code.

see https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/4512/files#r1369368660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants