cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
Support custom CIDRs for port 6443 via ControlPlaneLoadBalancer.IngressRules
What type of PR is this? /kind bug
What this PR does / why we need it:
On adding custom ingress rules for port 6443 or any other port which is already present in the rule(like port 22 when bastion is enabled), the ingress rules comparison and addition used to fail saying InvalidParameterValue: The same permission must not appear multiple times
This PR fixes the following to support addition of new CIDR's for already existing ports:
- Remove duplicates while generating
getSecurityGroupIngressRules
forSecurityGroupControlPlane
- Club rules with same protocol and port range while converting
ingressRulesToSDKType
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 #4470
Special notes for your reviewer:
Checklist:
- [ ] squashed commits
- [ ] includes documentation
- [x] adds unit tests
- [ ] adds or updates e2e tests
Release note: