Skip to content

Commit

Permalink
Suffix pod cron with .c
Browse files Browse the repository at this point in the history
Small cleanup
  • Loading branch information
byrnedo committed Aug 4, 2024
1 parent 0d2a08b commit 9945359
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl DefaultExecutor {
let mut pod = Pod::default();
pod.spec = pod_template_spec.spec;
pod.metadata = cron_job.metadata.clone();
pod.metadata.name = Some(format!("{}.c", ns_name.to_string()));
let mut_spec = pod.spec.as_mut().unwrap();
mut_spec.restart_policy = Some("Never".to_string());

Expand Down
9 changes: 5 additions & 4 deletions src/refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@ pub async fn refresh(args: RefreshArgs) -> Result<(), Box<dyn Error>> {
let state = refreshed_state(&cluster.name, &clients, &config).await.expect("failed to refresh state");

for node in &(state.nodes) {
match node.status {
let emoji = match node.status {
NodeStatus::Unhealthy => {
println!("node {} {} - {} ", node.node_name, node.status, CROSS_EMOJI)
CROSS_EMOJI
}
NodeStatus::Healthy => {
println!("node {} {} - {} ", node.node_name, node.status, CHECKBOX_EMOJI)
CHECKBOX_EMOJI
}
NodeStatus::Unknown => {
println!("node {} {} - {} ", node.node_name, node.status, '?')
' '
}
};
println!("node {} {} - {} ", node.node_name, node.status, emoji)
}

state.persist()
Expand Down
1 change: 0 additions & 1 deletion src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ impl DefaultScheduler {
let mut labels = meta.labels.unwrap_or_default();
labels.insert("skate.io/deployment".to_string(), d.metadata.name.as_ref().unwrap().clone());
labels.insert("skate.io/replica".to_string(), i.to_string());
meta.labels = Some(labels.clone());
meta.labels = Some(labels);

let pod = Pod {
Expand Down

0 comments on commit 9945359

Please sign in to comment.