-
Notifications
You must be signed in to change notification settings - Fork 637
WIP: 🐛 Fix SG deletion logic on Default VPC #5610
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| if sg.Name == "default" { | ||
| // skip rule reconciliation, as default SG group is already handled by revokeIngressAndEgressRulesFromVPCDefaultSecurityGroup | ||
| continue | ||
| } |
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.
This special handling could lead to more bugs. For example, authorizeSecurityGroupIngressRules is still below and is also exempted with this continue statement.
Can we instead rather fix this by ignoring the NotFound error where it happens?
(We're also observing this annoying problem for non-EKS clusters, by the way.)
|
|
||
| if _, err := s.EC2Client.RevokeSecurityGroupIngress(context.TODO(), input); err != nil && !awserrors.IsPermissionNotFoundError(errors.Cause(err)) { | ||
| _, err := s.EC2Client.RevokeSecurityGroupIngress(context.TODO(), input) | ||
| if err != nil && !awserrors.IsPermissionNotFoundError(errors.Cause(err)) { |
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.
No difference here, or am I overlooking something?
What type of PR is this?
/kind bug
What this PR does / why we need it:
It removes an invalid event when enabling emptyRoutesDefaultVPCSecurityGroup on AWSManagedControlPlane like this:
Without this PR, it creates tons of events like this:
Checklist:
Release note: