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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d99eb5b07cc86404cdd7c047749d9c1b6d21adb1
4
- data.tar.gz: 9353e76146495023ba33aa292de226dea388d950
3
+ metadata.gz: 505335d6f2e3102fce7ab791cf9dbd0d425287f6
4
+ data.tar.gz: 2ae7b141f4b7fca4d37c3bf95a9f86d26ac8685b
5
5
  SHA512:
6
- metadata.gz: 25b50282a16a2ba5acaef4987159ecfece28d44a3a0b182d532264a5f3e161100ca3198a6a0ff23f0e5d54869d1e93f729f6c5728145cb5386e92d33056353c9
7
- data.tar.gz: 5dd0b75a81ffa473fbd2c93a0fdcecdc516aaeb0f20f9fd64a363f93180ef055b9cc52e8b5ee7d383c72e888f954f236b1673c112eeb262903aaa17cde71f64b
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
@@ -1,3 +1,3 @@
1
1
  module KubeAutoAnalyzer
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -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
- @client = Kubeclient::Client.new(
73
- context.api_endpoint,
74
- context.api_version,
75
- {
76
- ssl_options: context.ssl_options,
77
- auth_options: context.auth_options
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.12
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-07 00:00:00.000000000 Z
11
+ date: 2018-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler