Skip to content

Commit

Permalink
fix not ready container detection
Browse files Browse the repository at this point in the history
  • Loading branch information
edrevo committed Nov 20, 2019
1 parent 0e8e595 commit 7a1d31e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "suspicious-pods"
version = "0.5.0"
version = "0.5.1"
authors = ["edrevo <[email protected]>"]
edition = "2018"
keywords = ["k8s", "kubernetes"]
Expand All @@ -14,4 +14,4 @@ repository = "https://github.com/edrevo/suspicious-pods"
[dependencies]
clap = "2.33.0"
failure = "0.1.6"
suspicious-pods-lib = { version="0.3.0", path = "lib" }
suspicious-pods-lib = { version="0.3.1", path = "lib" }
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "suspicious-pods-lib"
version = "0.3.0"
version = "0.3.1"
authors = ["edrevo <[email protected]>"]
edition = "2018"
keywords = ["k8s", "kubernetes"]
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn is_suspicious_container(pod_name: &str, status: ContainerStatus) -> Option<Su
Some(SuspiciousContainerReason::ContainerWaiting(msg))
} else if state.terminated.is_some() && state.terminated.as_ref().unwrap().exit_code != 0 {
Some(SuspiciousContainerReason::TerminatedWithError(state.terminated.unwrap().exit_code))
} else if !status.ready {
} else if state.running.is_some() && !status.ready {
Some(SuspiciousContainerReason::NotReady)
} else {
None
Expand Down

0 comments on commit 7a1d31e

Please sign in to comment.