Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Add functionality to stop and restart processes #25

Merged
merged 4 commits into from
Dec 11, 2020

Conversation

soenkeliebau
Copy link
Member

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.

… on recreated pods.

Also contains change to add pod-uid to the config directory name.
Copy link
Member

@lfrancke lfrancke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments.

I still haven't looked at the starting etc. states in detail because I assume they'll change drastically with systemd integration?

@@ -153,6 +155,7 @@ impl Provider for StackableProvider {

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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwrap should be handled properly

src/provider/states/stopping.rs Outdated Show resolved Hide resolved
src/provider/states/stopping.rs Show resolved Hide resolved
lfrancke
lfrancke previously approved these changes Dec 10, 2020
@@ -43,4 +43,6 @@ pub enum StackableError {
"The following config maps were specified in a pod but not found: {missing_config_maps:?}"
)]
MissingConfigMapsError { missing_config_maps: Vec<String> },
#[error("An object received from Kubernetes didn't contain a required field: {field_name}")]
IllegalKubeObject { field_name: String },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/provider/mod.rs Show resolved Hide resolved
…uses in the operator framework (which in turn is copied from the kubernetes client crate).
@ohessel ohessel added this to To be merged in Stackable Dec 11, 2020
@soenkeliebau soenkeliebau merged commit fe3d655 into stackabletech:main Dec 11, 2020
Stackable automation moved this from To be merged to Done Dec 11, 2020
@soenkeliebau soenkeliebau deleted the restart branch December 11, 2020 08:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants