-
-
Notifications
You must be signed in to change notification settings - Fork 331
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 restart
utility function.
#635
Conversation
Signed-off-by: Adrian Pistol <vifino@tty.sh>
Hello again! Thanks a lot for doing this. Just a bit of double checking here. I was cross-referencing a bit with kubectl it does seem like they use a Now, I don't know why they have chosen to do this (it could be a fairly arbitrary choice), but it would be good to make sure that the strategy we use won't interfere with other |
Hey @clux! I've tested this on a few deployments, all work fine. Some of those deployments have lots of labels and quite a few annotations. The only thing I noticed was that there is both a |
Hm. The rustfmt check fails, but |
Signed-off-by: Adrian Pistol <vifino@tty.sh>
388077d
to
e6fc00f
Compare
Ah, sorry, yeah, we use a couple of nightly only formatting rules. |
Ah, perfect. That's the type of thing I was worried about. (I imagine it would not be like that if we took |
Ah, for some reason I have to keep approving since you're a first time contributor. Anyway, if just rustfmt fails here I'll just merge it. There's a follow-up system that fixes any issues. |
Ah, it's fixed. Perfect. Thank you very much. I'll get it into the next release probably sometime this week :-) |
Nice! Thanks for merging. |
* kube-core: Add Restart marker and request. Signed-off-by: Adrian Pistol <vifino@tty.sh> * kube: Add restart method to Deployments and Sets. Signed-off-by: Adrian Pistol <vifino@tty.sh> Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
Released in 0.61.0. Thanks again :-) |
Woohoo! |
This PR adds the
restart(name)
function onApi<K>
whereK
is one ofDeployment
,DaemonSet
,StatefulSet
orReplicaSet
.It also adds the complementary method to the
kube
crate.To implement this functionality, I chose to add
chrono
to thekube-core
crate, as the alternatives involved lots of code and it's already used in the bigger crate.This fixes #630 by implementing the necessary functionality.
I hope this PR is acceptable.
Thank you.