-
Notifications
You must be signed in to change notification settings - Fork 53
feat: Recreate TransitGateway/NatGatway if resource has deleted status #257
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
Conversation
Currently if a TransitGateway is deleted on accident by calling the API or console, it still dangles with a `deleted` state. With this change, the controller will recreate the TransitGateway if the resource has `deleted` state NatGateway getting the same changes
830d469
to
cad57ad
Compare
@michaelhtm: 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. |
@@ -40,6 +56,7 @@ func (rm *resourceManager) customUpdateNATGateway( | |||
// an error, then the update was successful and desired.Spec | |||
// (now updated.Spec) reflects the latest resource state. | |||
updated = rm.concreteResource(desired.DeepCopy()) | |||
updated.ko.Status = latest.ko.Status |
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.
Why is this needed
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.
i don't want the latest.Status to be discarded..the state was never being patched when i tested it locally.
https://github.com/aws-controllers-k8s/runtime/blob/07dcd404a9a7bc3efe890791b910f9ec41712926/pkg/runtime/reconciler.go#L781
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.
we do need some preCompareDeltas to ensure we ignore everything except tags tho..since that's the only field we can update
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.
👍
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.
thanks @michaelhtm !
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, michaelhtm, rushmash91 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 if a TransitGateway is deleted on accident by calling the API
or console, it still dangles with a
deleted
state.With this change, the controller will recreate the TransitGateway if the
resource has
deleted
stateBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.