civo_cli 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -2
- data/Gemfile.lock +15 -15
- data/civo_cli.gemspec +1 -1
- data/lib/civo_cli/version.rb +1 -1
- data/lib/kubernetes.rb +15 -11
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afd6eb59ccb5d4705c1ad9297b54a82b532156d4dce0fea48d22090e3023a247
|
4
|
+
data.tar.gz: 56963fcf395128dac55f6d4902de0f5f6a30adc7b998a18515632a410c3f5ff4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1df2645cf61927040d5ee7f5b9025622255a328f208fdb2a736df1c92f9b8513c03cb67a0ac78f5ba00fc66e398cc6234ff83259850c1a6ffbd2023660688ef
|
7
|
+
data.tar.gz: 95596ea445dde062af24522d0d06c044b2fcd4fff526a75ff2af4df4baf828f276d211705e7da5f06203ea3049966e1372d616a8ff41c87b7846321d7d3d7967
|
data/CHANGELOG.md
CHANGED
@@ -3,12 +3,17 @@ All notable changes to the Civo CLI will be documented in this file.
|
|
3
3
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
5
5
|
|
6
|
+
## [0.5.9] - 2020-04-08
|
7
|
+
### Fixed
|
8
|
+
- Issues with Windows merging KUBECONFIG should be resolved (thanks to Johannes Tegnér for the PR)
|
9
|
+
- Allowed overriding of the KUBECONFIG file when merging (thanks to Jetchko Jekov for the suggestion)
|
10
|
+
|
6
11
|
## [0.5.8] - 2020-02-14
|
7
|
-
###
|
12
|
+
### Fixed
|
8
13
|
- Fix error with k3s versioning having plus signs
|
9
14
|
|
10
15
|
## [0.5.7] - 2019-12-04
|
11
|
-
###
|
16
|
+
### Fixed
|
12
17
|
- Set a minimum version of activesupport to fix https://github.com/civo/cli/issues/51 (thanks to Dr Nic Williams for the bug report)
|
13
18
|
|
14
19
|
## [0.5.6] - 2019-11-13
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
civo_cli (0.5.
|
4
|
+
civo_cli (0.5.9)
|
5
5
|
activesupport (>= 6.0.0)
|
6
6
|
bundler (>= 1.17)
|
7
7
|
civo (>= 1.2.9)
|
@@ -13,7 +13,7 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (6.0.
|
16
|
+
activesupport (6.0.2.2)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 0.7, < 2)
|
19
19
|
minitest (~> 5.1)
|
@@ -27,16 +27,16 @@ GEM
|
|
27
27
|
toml
|
28
28
|
coderay (1.1.2)
|
29
29
|
colorize (0.8.1)
|
30
|
-
commander (4.
|
30
|
+
commander (4.5.0)
|
31
31
|
highline (~> 2.0.0)
|
32
|
-
concurrent-ruby (1.1.
|
32
|
+
concurrent-ruby (1.1.6)
|
33
33
|
crack (0.4.3)
|
34
34
|
safe_yaml (~> 1.0.0)
|
35
35
|
diff-lcs (1.3)
|
36
|
-
faraday (0.
|
36
|
+
faraday (1.0.0)
|
37
37
|
multipart-post (>= 1.2, < 3)
|
38
38
|
ffi (1.11.1)
|
39
|
-
flexirest (1.
|
39
|
+
flexirest (1.9.12)
|
40
40
|
activesupport
|
41
41
|
crack
|
42
42
|
faraday
|
@@ -59,19 +59,19 @@ GEM
|
|
59
59
|
rspec (>= 2.99.0, < 4.0)
|
60
60
|
hashdiff (1.0.0)
|
61
61
|
highline (2.0.3)
|
62
|
-
i18n (1.
|
62
|
+
i18n (1.8.2)
|
63
63
|
concurrent-ruby (~> 1.0)
|
64
|
-
json (2.
|
64
|
+
json (2.3.0)
|
65
65
|
listen (3.1.5)
|
66
66
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
67
67
|
rb-inotify (~> 0.9, >= 0.9.7)
|
68
68
|
ruby_dep (~> 1.2)
|
69
69
|
lumberjack (1.0.13)
|
70
70
|
method_source (0.9.2)
|
71
|
-
mime-types (3.3)
|
71
|
+
mime-types (3.3.1)
|
72
72
|
mime-types-data (~> 3.2015)
|
73
73
|
mime-types-data (3.2019.1009)
|
74
|
-
minitest (5.
|
74
|
+
minitest (5.14.0)
|
75
75
|
multi_json (1.14.1)
|
76
76
|
multipart-post (2.1.1)
|
77
77
|
nenv (0.3.0)
|
@@ -83,7 +83,7 @@ GEM
|
|
83
83
|
coderay (~> 1.1.0)
|
84
84
|
method_source (~> 0.9.0)
|
85
85
|
public_suffix (3.1.1)
|
86
|
-
rake (
|
86
|
+
rake (13.0.1)
|
87
87
|
rb-fsevent (0.10.3)
|
88
88
|
rb-inotify (0.10.0)
|
89
89
|
ffi (~> 1.0)
|
@@ -110,14 +110,14 @@ GEM
|
|
110
110
|
thread_safe (0.3.6)
|
111
111
|
toml (0.2.0)
|
112
112
|
parslet (~> 1.8.0)
|
113
|
-
tzinfo (1.2.
|
113
|
+
tzinfo (1.2.6)
|
114
114
|
thread_safe (~> 0.1)
|
115
|
-
unicode-display_width (1.6.
|
115
|
+
unicode-display_width (1.6.1)
|
116
116
|
webmock (3.7.0)
|
117
117
|
addressable (>= 2.3.6)
|
118
118
|
crack (>= 0.3.2)
|
119
119
|
hashdiff (>= 0.4.0, < 2.0.0)
|
120
|
-
zeitwerk (2.
|
120
|
+
zeitwerk (2.3.0)
|
121
121
|
|
122
122
|
PLATFORMS
|
123
123
|
ruby
|
@@ -126,7 +126,7 @@ DEPENDENCIES
|
|
126
126
|
civo_cli!
|
127
127
|
guard
|
128
128
|
guard-rspec
|
129
|
-
rake (~>
|
129
|
+
rake (~> 13.0)
|
130
130
|
rspec (~> 3.0)
|
131
131
|
terminal-notifier-guard
|
132
132
|
webmock
|
data/civo_cli.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.required_ruby_version = '~> 2.0'
|
40
40
|
|
41
|
-
spec.add_development_dependency "rake", "~>
|
41
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
42
42
|
spec.add_development_dependency "rspec", "~> 3.0"
|
43
43
|
spec.add_development_dependency "guard"
|
44
44
|
spec.add_development_dependency "guard-rspec"
|
data/lib/civo_cli/version.rb
CHANGED
data/lib/kubernetes.rb
CHANGED
@@ -330,33 +330,33 @@ module CivoCLI
|
|
330
330
|
end
|
331
331
|
|
332
332
|
def save_config(cluster)
|
333
|
-
config_file_exists = File.exist?("#{
|
333
|
+
config_file_exists = File.exist?(ENV['KUBECONFIG'] || "#{Dir.home}/.kube/config")
|
334
334
|
tempfile = Tempfile.new('import_kubeconfig')
|
335
335
|
begin
|
336
336
|
tempfile.write(cluster.kubeconfig)
|
337
337
|
tempfile.size
|
338
338
|
if windows?
|
339
|
-
home = `echo %HOMEPATH%`.chomp
|
340
339
|
if options[:switch]
|
341
|
-
ENV['KUBECONFIG'] = "#{tempfile.path}
|
340
|
+
ENV['KUBECONFIG'] = "#{tempfile.path};" + (ENV['KUBECONFIG'] ? ENV['KUBECONFIG'] : "#{Dir.home}\\.kube\\config")
|
342
341
|
else
|
343
|
-
ENV['KUBECONFIG'] = "#{home}\\.kube\\config;#{tempfile.path}"
|
342
|
+
ENV['KUBECONFIG'] = (ENV['KUBECONFIG'] ? ENV['KUBECONFIG'] : "#{Dir.home}\\.kube\\config") + ";#{tempfile.path}"
|
344
343
|
end
|
345
344
|
result = `kubectl config view --flatten`
|
346
345
|
else
|
347
346
|
if options[:switch]
|
348
|
-
result = `KUBECONFIG=#{tempfile.path}
|
347
|
+
result = `KUBECONFIG=#{tempfile.path}:#{ENV['KUBECONFIG'] || "~/.kube/config"} kubectl config view --flatten`
|
349
348
|
else
|
350
|
-
|
349
|
+
puts "KUBECONFIG=#{ENV['KUBECONFIG'] || "~/.kube/config"}:#{tempfile.path} kubectl config view --flatten"
|
350
|
+
result = `KUBECONFIG=#{ENV['KUBECONFIG'] || "~/.kube/config"}:#{tempfile.path} kubectl config view --flatten`
|
351
351
|
end
|
352
352
|
end
|
353
353
|
write_file(result)
|
354
354
|
if config_file_exists && options[:switch]
|
355
|
-
puts "Merged".colorize(:green) + " config into ~/.kube/config and switched context to #{cluster.name}"
|
355
|
+
puts "Merged".colorize(:green) + " config into #{ENV['KUBECONFIG'] || "~/.kube/config"} and switched context to #{cluster.name}"
|
356
356
|
elsif config_file_exists && !options[:switch]
|
357
|
-
puts "Merged".colorize(:green) + " config into ~/.kube/config"
|
357
|
+
puts "Merged".colorize(:green) + " config into #{ENV['KUBECONFIG'] || "~/.kube/config"}"
|
358
358
|
else
|
359
|
-
puts "Saved".colorize(:green) + " config to ~/.kube/config"
|
359
|
+
puts "Saved".colorize(:green) + " config to #{ENV['KUBECONFIG'] || "~/.kube/config"}"
|
360
360
|
end
|
361
361
|
ensure
|
362
362
|
tempfile.close
|
@@ -365,8 +365,12 @@ module CivoCLI
|
|
365
365
|
end
|
366
366
|
|
367
367
|
def write_file(result)
|
368
|
-
|
369
|
-
|
368
|
+
if ENV['KUBECONFIG']
|
369
|
+
File.write(ENV["KUBECONFIG"], result)
|
370
|
+
else
|
371
|
+
Dir.mkdir("#{Dir.home}/.kube/") unless Dir.exist?("#{Dir.home}/.kube/")
|
372
|
+
File.write("#{Dir.home}/.kube/config", result)
|
373
|
+
end
|
370
374
|
end
|
371
375
|
|
372
376
|
def reject_user_access
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civo_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '13.0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '13.0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rspec
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
268
|
- !ruby/object:Gem::Version
|
269
269
|
version: '0'
|
270
270
|
requirements: []
|
271
|
-
rubygems_version: 3.0.
|
271
|
+
rubygems_version: 3.0.6
|
272
272
|
signing_key:
|
273
273
|
specification_version: 4
|
274
274
|
summary: CLI for interacting with Civo.com
|