-
Notifications
You must be signed in to change notification settings - Fork 48
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
Ec2: Network ACL CR should support deletion when subnet association is present #154
Conversation
Hi @nnbu. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@a-hilaly Please review when you get a chance |
/ok-to-test |
pkg/resource/network_acl/hooks.go
Outdated
if desired != nil { | ||
vpcID = desired.ko.Spec.VPCID | ||
aclID = desired.ko.Status.ID | ||
} else { | ||
vpcID = latest.ko.Spec.VPCID | ||
aclID = latest.ko.Status.ID | ||
|
||
} |
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.
Same philosophy comes back here, if we're reaching this level, it means that the resource exists, meaning that desired != nil and latest != nil
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.
deleteOldAssociations
is called from syncAssociation
, which in turn is called from either of sdkCreate
, sdkUpdate
or sdkDelete
.
In case of sdkDelete
, desired
will be nil.
In case of sdkCreate
, latest
will be nil.
I have addressed the comments. Please review when you get a chance. @a-hilaly |
Issues go stale after 180d of inactivity. |
/test all |
Stale issues rot after 60d of inactivity. |
@nnbu: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
Thank you @nnbu !
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, nnbu 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 |
Issue #, if available:
Description of changes:
Currently, when network acl cr has subnet association configured, we can not delete the cr. subnet association needs to be removed first and then cr can be deleted. This PR addresses this issue. When network acl CR is being deleted, the new change deletes subnet association from aws first and then deletes network acl from aws. This allows CR deletion to happen without any problem.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.