-
Notifications
You must be signed in to change notification settings - Fork 64
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
🌱Add condition indicating deletion timestamp is set #1284
Conversation
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.
now you have a problem with "needsUpdate". You currently don't check that for the condition. I would just say remove the "needsUpdate code and just always update it. If you want to make it 100% efficient in terms of API calls, you need to check whether the condition is set before.
You can do that with some utility function of the conditions package (something like HasReason)
e42bac5
to
8a134e3
Compare
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.
LGTM. Thank you! Please squash your commits now
c85823c
to
d117e35
Compare
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.
sorry I just realized something.. You don't want to check this only for hosts that are in state none - but for all that are getting deleted! You actually have to move this outside of this. Maybe even outside of the reconcileSelectedStates one. Because it is not related to a certain provisioning state
42bd5ca
to
3af97a6
Compare
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.
can you revert all changes to hetznerbaremetalhost_controller? I think those changes are not relevant anymore
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! This looks good now. You can squash all commits and do one small change:
use the severity "warning" instead of "info". I'm a bit afraid that it wouldn't be shown to users otherwise
597d90d
to
43696e1
Compare
43696e1
to
8a7d2bf
Compare
🌱Fix lint errors 🌱Fix gofmt lint error 🐛Fix condition 🌱Remove Deletion condition 🐛Fix condition errors 🌱Remove condition and split if statements 🐛Fix lint error and remove needsUpdate 🌱Remove if statement 🌱Move set condition outside the switch Add being deleted condition in host 🌱Remove deleting condition from reconcileSelectedStates method 🌱Minor change 🌱Revert changes made to hbmh controller 🌱Change severity
8a7d2bf
to
97547ac
Compare
What this PR does / why we need it:
Add condition indicating deletion timestamp is set
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 #1229
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs: