Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnedo committed Aug 12, 2024
1 parent a9be658 commit a560386
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
anyhow = "1.0.75"
async-ssh2-tokio = { version = "0.8.1", features = ["openssl"]}
async-ssh2-tokio = { version = "0.8.2", features = ["openssl"] }
async-trait = "0.1.74"
clap = { version = "4.4.7", features = ["derive", "env"] }
futures = "0.3.29"
Expand All @@ -34,4 +34,4 @@ fs2 = "0.4.3"
log = "0.4.20"
handlebars = "5.1.2"
cron = "0.12.1"
russh = "0.38.0"
russh = "=0.43.0"
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ skate create node --name foo --host bar

This will ensure all hosts are provisioned with `skatelet`, the agent

## Healthchecks

`podman kube play` supports `livenessProbe` in the pod manifest.
The best way to ensure that http traffic stops being routed to an unhealthy pod is to combine that with `restartPolicy`
of `Always` or `OnFailure`.

NOTE: using the `httpGet` probe results in podman trying to run `curl` within the container.
With `tcpSocket` it looks for `nc`.


## Playing with objects

```shell
Expand Down
6 changes: 3 additions & 3 deletions src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl LogArgs {
let tail = format!("--tail {}", &self.tail);
cmd.push(tail);
}
return cmd
return cmd;
}
}

Expand Down Expand Up @@ -104,7 +104,7 @@ pub async fn log_pod(conns: &ssh::SshClients, name: &str, ns: String, args: &Log
let result: Vec<_> = fut.collect().await;

if result.iter().all(|r| r.is_err()) {
return Err(format!("{:?}", result.into_iter().map(|r| r.err().unwrap().to_string()).collect::<Vec<String>>()).into())
return Err(format!("{:?}", result.into_iter().map(|r| r.err().unwrap().to_string()).collect::<Vec<String>>()).into());
}

for res in result {
Expand All @@ -130,7 +130,7 @@ pub async fn log_child_pods(conns: &ssh::SshClients, resource_type: ResourceType
let result: Vec<_> = fut.collect().await;

if result.iter().all(|r| r.is_err()) {
return Err(format!("{:?}", result.into_iter().map(|r| r.err().unwrap().to_string()).collect::<Vec<String>>()).into())
return Err(format!("{:?}", result.into_iter().map(|r| r.err().unwrap().to_string()).collect::<Vec<String>>()).into());
}

for res in result {
Expand Down

0 comments on commit a560386

Please sign in to comment.