This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Add functionality to stop and restart processes#25
Merged
soenkeliebau merged 4 commits intostackabletech:mainfrom Dec 11, 2020
Merged
Add functionality to stop and restart processes#25soenkeliebau merged 4 commits intostackabletech:mainfrom
soenkeliebau merged 4 commits intostackabletech:mainfrom
Conversation
… on recreated pods. Also contains change to add pod-uid to the config directory name.
lfrancke
suggested changes
Dec 9, 2020
Member
lfrancke
left a comment
There was a problem hiding this comment.
Minor comments.
I still haven't looked at the starting etc. states in detail because I assume they'll change drastically with systemd integration?
|
|
||
| async fn initialize_pod_state(&self, pod: &Pod) -> anyhow::Result<Self::PodState> { | ||
| let service_name = pod.name(); | ||
| let service_uid = String::from(pod.as_kube_pod().metadata.uid.as_ref().unwrap()); |
Member
There was a problem hiding this comment.
unwrap should be handled properly
lfrancke
previously approved these changes
Dec 10, 2020
| )] | ||
| MissingConfigMapsError { missing_config_maps: Vec<String> }, | ||
| #[error("An object received from Kubernetes didn't contain a required field: {field_name}")] | ||
| IllegalKubeObject { field_name: String }, |
Member
There was a problem hiding this comment.
I have a similar error in operator-rs. I'd suggest we use the same here:
Error: https://github.com/stackabletech/operator-rs/blob/main/src/error.rs#L21-L22
Usage: https://github.com/stackabletech/operator-rs/blob/main/src/lib.rs#L105-L107
…uses in the operator framework (which in turn is copied from the kubernetes client crate).
lfrancke
approved these changes
Dec 10, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enables stopping services by deleting their pod objects and subsequently restarting them by recreating the pod.
This unlocks rolling restart/restart functionality in operators.
Also contains change to add pod-uid to the config directory name.