kube_auto_analyzer 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/kubeautoanalyzer +5 -1
- data/lib/kube_auto_analyzer/version.rb +1 -1
- data/lib/kube_auto_analyzer.rb +21 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 505335d6f2e3102fce7ab791cf9dbd0d425287f6
|
4
|
+
data.tar.gz: 2ae7b141f4b7fca4d37c3bf95a9f86d26ac8685b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c7815f485ee0b1d293bc9e42a7f13d73a7c42cee38e5027394091e30040c50fc3631d1e0bc3ad9d5c17e7a106a2dd5946cdbe2080bb07a582f4f44180fdf38
|
7
|
+
data.tar.gz: c6c9ff8509a21c8d287b505f1c6e17b157c0adf61318b73326722885d7f17b044f1d46341a297c14cb63e8c7e7fbcada3a8220245ee31e5f659d48f3462eb766
|
data/bin/kubeautoanalyzer
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
options.agent_checks = false
|
17
17
|
options.insecure = false
|
18
18
|
options.context = false
|
19
|
-
|
19
|
+
options.nosslverify = false
|
20
20
|
|
21
21
|
opts = OptionParser.new do |opts|
|
22
22
|
opts.banner = "Kubernetes Auto Analyzer #{KubeAutoAnalyzer::VERSION}"
|
@@ -32,6 +32,10 @@
|
|
32
32
|
options.context = context
|
33
33
|
end
|
34
34
|
|
35
|
+
opts.on("--nosslverify [NOVERIFY]", "disable SSL verification") do |noverify|
|
36
|
+
options.nosslverify = true
|
37
|
+
end
|
38
|
+
|
35
39
|
opts.on("-s", "--server [SERVER]", "Target Server") do |serv|
|
36
40
|
options.target_server = serv
|
37
41
|
end
|
data/lib/kube_auto_analyzer.rb
CHANGED
@@ -69,14 +69,25 @@ module KubeAutoAnalyzer
|
|
69
69
|
puts "Config File could not be read, check the path?"
|
70
70
|
exit
|
71
71
|
end
|
72
|
-
@
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
72
|
+
if @options.nosslverify
|
73
|
+
@client = Kubeclient::Client.new(
|
74
|
+
context.api_endpoint,
|
75
|
+
context.api_version,
|
76
|
+
{
|
77
|
+
ssl_options: {client_cert: context.ssl_options[:client_cert], client_key: context.ssl_options[:client_key],verify_ssl: OpenSSL::SSL::VERIFY_NONE},
|
78
|
+
auth_options: context.auth_options
|
79
|
+
}
|
80
|
+
)
|
81
|
+
else
|
82
|
+
@client = Kubeclient::Client.new(
|
83
|
+
context.api_endpoint,
|
84
|
+
context.api_version,
|
85
|
+
{
|
86
|
+
ssl_options: context.ssl_options,
|
87
|
+
auth_options: context.auth_options
|
88
|
+
}
|
89
|
+
)
|
90
|
+
end
|
80
91
|
#We didn't specify the target on the command line so lets get it from the config file
|
81
92
|
@options.target_server = context.api_endpoint
|
82
93
|
@log.debug("target is " + @options.target_server)
|
@@ -85,7 +96,8 @@ module KubeAutoAnalyzer
|
|
85
96
|
#Test response
|
86
97
|
begin
|
87
98
|
@client.get_pods.to_s
|
88
|
-
rescue
|
99
|
+
rescue => error
|
100
|
+
puts error
|
89
101
|
puts "Check of API connection failed."
|
90
102
|
puts "try using kubectl with the same connection details"
|
91
103
|
puts "to see what's going wrong."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kube_auto_analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rory McCune
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|