kubernetes_health_checker 0.0.0.19 → 0.0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/kubernetes_health_checker +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2ec47753f96855648ebd5d399f48104d2d8fff7f5dc1144fa5f80e047839336
|
4
|
+
data.tar.gz: 4ed66fba4f249d0d81026cc683911a70e37120d716b72a11b82659f38be4965a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14680daea6b04d3b5e7beca49306694aa66cb984d55a0d41d4a0c76bac3baa62b96c91867ee4bf3649f7dece8946c3e4023d870b6b8e5b793de56f667adb2989
|
7
|
+
data.tar.gz: cdce024d7e5a2ae4266ea6962a60227bbba056086324a024f86693570462000d13f3b863180abbbc6f6df83a8ae53758cef7b50d287aecc764c8f2952d759e7a
|
@@ -112,10 +112,10 @@ module KubernetesHealthChecker
|
|
112
112
|
text = "Pod *#{pod_name}* is in status: *#{new_status}*.\n"
|
113
113
|
elsif TIMED_ALERT_STATUSES.keys.include?(new_status.downcase)
|
114
114
|
alert_threshold = TIMED_ALERT_STATUSES[new_status.downcase]
|
115
|
-
if age > alert_threshold
|
115
|
+
if age.nil? || age > alert_threshold
|
116
116
|
text = "Pod #{pod_name} has been in status: *#{new_status}* for #{age} seconds :grimacing:.\n"
|
117
117
|
end
|
118
|
-
elsif new_restarts > @alert_threshold
|
118
|
+
elsif !new_restarts.nil? && new_restarts > @alert_threshold
|
119
119
|
text = "Pod *#{pod_name}* has restarted *#{new_restarts}* times and has status: *#{new_status}*.\n"
|
120
120
|
end
|
121
121
|
|