-
Notifications
You must be signed in to change notification settings - Fork 18
chore(shutdown): allow Shutdown to work on Windows #391
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
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
kubert/src/shutdown/signals.rs
Outdated
let ctrl_break = ctrl_break()?; | ||
let ctrl_c = ctrl_c()?; |
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 these signals? Why not the other signals? Can you reference some external resource or prior art that explains what we're doing 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.
You are right. After some research, It becomes clear that the signal that Kubernetes uses for graceful shutdown is Ctrl-Shutdown
. I have made the corresponding changes. For reference: https://kubernetes.io/docs/concepts/windows/intro/#compatibility-v1-pod
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
Signed-off-by: Zahari Dichev <[email protected]>
@just-cargo target={{ target }} fetch | ||
|
||
check *args: | ||
@just-cargo check --workspace --all-targets {{ _features }} {{ args }} | ||
|
||
clippy-all *args: | ||
@just-cargo clippy --workspace --all-targets --all-features {{ args }} | ||
@just-cargo target={{ target }} clippy --workspace --all-targets --all-features {{ args }} |
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 need to make this consistent -- if we need it in clippy-all, we should have it on clippy (and check, etc)
At the moment the shutdown feature cannot be used on Windows systems. This change abstracts the signal handling functionality so
Ctrl-C
andCtrl-Break
signals are used on WindowsSIGINT
andSIGTERM
are used on LinuxSigned-off-by: Zahari Dichev [email protected]