sensu-plugins-kubernetes 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -2
- data/bin/check-kube-pods-running.rb +12 -3
- data/lib/sensu-plugins-kubernetes/cli.rb +2 -1
- data/lib/sensu-plugins-kubernetes/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c1b3b5137ced0c6f5389c7758feb32414c642e6892f097d72e504d50c3239e24
|
4
|
+
data.tar.gz: 18be79eb55bc1f39e24701dc515289c600e375e640bfa410efb01204307bd98b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14cda7064913e1b125fecc685c38f8632c4d40d9af234002ca5fffb63e5c1bbc28016d0fa3df2f3d37b08c5b4ebe964696b99e7c7d180fb6541d62e29ccea96c
|
7
|
+
data.tar.gz: c00a75f45747398767f47cc810c85d6f22832ba49c2c5cfe97542add001f0e10749ecc236e5feb73749b199e82a3bb357bfec0dd5d9022893ae96f6b2696b074
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
|
-
This CHANGELOG follows the format listed
|
4
|
+
This CHANGELOG follows the format listed [here ](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
### Fixed
|
9
|
+
- check-kube-pods-running.rb no longer throws an exception when there are no 3 conditions in the status information. Issue #39 (@AgarFu)
|
10
|
+
|
8
11
|
## [3.0.0] - 2017-09-12
|
9
12
|
### Breaking Change
|
10
13
|
- check-kube-nodes-ready.rb no longer triggers an alert if an unschedulable node becomes NotReady (@tg90nor)
|
@@ -65,7 +68,8 @@ pending pods, the restart count portion has been split into it's own check, `che
|
|
65
68
|
### Added
|
66
69
|
- initial release
|
67
70
|
|
68
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.0.
|
71
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.0.1...HEAD
|
72
|
+
[3.0.1]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.0.0...3.0.0.1
|
69
73
|
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/2.0.0...3.0.0
|
70
74
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/1.1.0...2.0.0
|
71
75
|
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/1.0.0...1.1.0
|
@@ -91,9 +91,7 @@ class AllPodsAreRunning < Sensu::Plugins::Kubernetes::CLI
|
|
91
91
|
next if should_exclude_namespace(pod.metadata.namespace)
|
92
92
|
next unless pods_list.include?(pod.metadata.name) || pods_list.include?('all')
|
93
93
|
next unless pod.status.phase != 'Succeeded' && !pod.status.conditions.nil?
|
94
|
-
|
95
|
-
failed_pods << pod.metadata.name
|
96
|
-
end
|
94
|
+
failed_pods << pod.metadata.name unless ready? pod
|
97
95
|
end
|
98
96
|
|
99
97
|
if failed_pods.empty?
|
@@ -115,4 +113,15 @@ class AllPodsAreRunning < Sensu::Plugins::Kubernetes::CLI
|
|
115
113
|
return !config[:include_namespace].include?(namespace) unless config[:include_namespace].empty?
|
116
114
|
config[:exclude_namespace].include?(namespace)
|
117
115
|
end
|
116
|
+
|
117
|
+
def ready?(pod)
|
118
|
+
failed = true
|
119
|
+
pod.status.conditions.each do |c|
|
120
|
+
if c.type == 'Ready'
|
121
|
+
failed = false if c.status == 'True'
|
122
|
+
break
|
123
|
+
end
|
124
|
+
end
|
125
|
+
!failed
|
126
|
+
end
|
118
127
|
end
|
@@ -76,8 +76,9 @@ module Sensu
|
|
76
76
|
# Initializes the Sensu check by creating a Kubernetes client
|
77
77
|
# from the given options and will report a critical error if
|
78
78
|
# those arguments are incorrect.
|
79
|
-
def initialize
|
79
|
+
def initialize(argv = ARGV)
|
80
80
|
super()
|
81
|
+
self.argv = parse_options(argv)
|
81
82
|
begin
|
82
83
|
@client = kubeclient(
|
83
84
|
server: config[:api_server],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-kubernetes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
version: '0'
|
236
236
|
requirements: []
|
237
237
|
rubyforge_project:
|
238
|
-
rubygems_version: 2.6
|
238
|
+
rubygems_version: 2.7.6
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Sensu plugins for kubernetes
|