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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 899a89296d7fd7e8631068f9b480968bd151d6a4
4
- data.tar.gz: bd9958416c9ab799eedd7f5dc0f35e678a8a3a35
3
+ metadata.gz: 1b91f9a1f8905f8e09dfd8a3d67f092e909e59ff
4
+ data.tar.gz: 552bf56c1edf01d4a5e878344a2ce16523fc228c
5
5
  SHA512:
6
- metadata.gz: 5a3ee2788e8f79ede63ae0ce4050f80061722d3f84e969b291c1238b98e6ed7ace1f6e421e8f4d8cbab12124ab7f1f63b6805ba3c95ff640a78022919850ef8a
7
- data.tar.gz: 4f5bf2925f2106dea7cbb616d09b391524e9749af2ab9c36897a5babd710f39d8fc7edfbdd3365b660ab0b59b9c4e394e7a6ba50c4bad0fef5ccde08d88f5608
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 = ['CrashLoopBackOff'].freeze
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubernetes_health_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.7
4
+ version: 0.0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rohan Sahai