cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

🐛: securitygroup: fix comparison of ingress rules sets.

Open r4f4 opened this issue 1 year ago • 21 comments
trafficstars

What type of PR is this? /kind bug

What this PR does / why we need it:

We are comparing sets that are not compatible, so rules will always be revoked and authorized during reconciliation. We need to expand the rules from the spec so there is one rule for each item in cidrBlock/sourceSecurityGroupIds.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #5023

Special notes for your reviewer:

Checklist:

  • [X] squashed commits
  • [ ] includes documentation
  • [X] includes emojis
  • [x] adds unit tests
  • [ ] adds or updates e2e tests

Release note:

Fix comparison of ingress rules during Security Group reconciliation to avoid unnecessary revokes and authorizes.

r4f4 avatar Jun 13 '24 16:06 r4f4