kubernetes_health_checker 0.0.0.7 → 0.0.0.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b91f9a1f8905f8e09dfd8a3d67f092e909e59ff
|
4
|
+
data.tar.gz: 552bf56c1edf01d4a5e878344a2ce16523fc228c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45573b6b8e3674a46a79599306b39ad678d8a268b5f3e87ce101e9403b1dbf694ff1248c003b9063fb3c448e9130fdb23570acb4f77b8fb17beba1bb15c618fa
|
7
|
+
data.tar.gz: d2b68dcf889eabeacb47b13e0952e522df3c3f18e53854d4a40bdbf2225d2973bac62fc362384ebc2773e23fa4e7d73bffe302f4eafb00872686948c19cecdfb
|
@@ -15,7 +15,7 @@ module KubernetesHealthChecker
|
|
15
15
|
method_option :url, aliases: '-u', type: :string, desc: 'Specify the slack url you would like the alert POSTed to'
|
16
16
|
method_option :test, aliases: '-t', type: :boolean, desc: 'Specify if running the gem in test mode'
|
17
17
|
|
18
|
-
ALERT_STATUSES = ['
|
18
|
+
ALERT_STATUSES = ['crashloopbackoff', 'pending'].freeze
|
19
19
|
|
20
20
|
RUN_INTERVAL = 120
|
21
21
|
|
@@ -85,7 +85,7 @@ module KubernetesHealthChecker
|
|
85
85
|
|
86
86
|
if !@pods_data[pod_name].empty? && old_restarts == new_restarts && old_status == new_status
|
87
87
|
# we've already alerted from this state, skip
|
88
|
-
elsif ALERT_STATUSES.include?(new_status)
|
88
|
+
elsif ALERT_STATUSES.include?(new_status.downcase)
|
89
89
|
text = "Pod *#{pod_name}* is in status: *#{new_status}*.\n"
|
90
90
|
elsif new_restarts > @alert_threshold
|
91
91
|
text = "Pod *#{pod_name}* has restarted *#{new_restarts}* times and has status: *#{new_status}*.\n"
|