cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
🐛: securitygroup: fix comparison of ingress rules sets.
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.