civo_cli 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/civo_cli/version.rb +1 -1
- data/lib/kubernetes.rb +18 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b547957f2d531e61809da88d07b4e67e0822f8b950585a7ca6837b42c038a736
|
4
|
+
data.tar.gz: d42ce8e7b56a75affd123b8d233ae24c502177143b1db08c324e1680031e7690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e47da3fbcde79faae12e110e0118d57d0a6f927f9e06ba2ba542c8b231b35d03e44ce7f69a09cbbbff7eaf53b17a540c0fb374e588687d0cbe18833a8ad66cf
|
7
|
+
data.tar.gz: a3cb039260a20a553eb971ce0fbc206862e5c866e3c9b272f9700e71149099680843302712506dd9e2a53f6619046779d336e73f28e0dccd20b8eff095d44750
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ 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.6] - 2019-11-13
|
7
|
+
### Added
|
8
|
+
- Support for not installing default applications using `--remove-applications` during k3s cluster creation
|
9
|
+
|
6
10
|
## [0.5.5] - 2019-11-12
|
7
11
|
### Fixed
|
8
12
|
- Support for `development` version k3s clusters when showing the details
|
data/Gemfile.lock
CHANGED
data/lib/civo_cli/version.rb
CHANGED
data/lib/kubernetes.rb
CHANGED
@@ -16,10 +16,15 @@ module CivoCLI
|
|
16
16
|
rows = []
|
17
17
|
Civo::Kubernetes.all.items.each do |cluster|
|
18
18
|
version = cluster.kubernetes_version
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
|
20
|
+
if cluster.kubernetes_version != "development"
|
21
|
+
latest_version = get_latest_k3s_version
|
22
|
+
if Gem::Version.new(latest_version) > Gem::Version.new(version)
|
23
|
+
upgrade_available = true
|
24
|
+
version = "#{version} *".colorize(:red)
|
25
|
+
end
|
22
26
|
end
|
27
|
+
|
23
28
|
rows << [cluster.id, cluster.name, cluster.num_target_nodes, cluster.target_nodes_size, version, cluster.status]
|
24
29
|
end
|
25
30
|
puts Terminal::Table.new headings: ['ID', 'Name', '# Nodes', 'Size', 'Version', 'Status'], rows: rows
|
@@ -164,6 +169,7 @@ module CivoCLI
|
|
164
169
|
option :save, type: :boolean
|
165
170
|
option :switch, type: :boolean
|
166
171
|
option :applications, type: :string, aliases: %w{apps app application}
|
172
|
+
option :remove_applications, type: :string
|
167
173
|
long_desc <<-LONGDESC
|
168
174
|
Create a new Kubernetes cluster with name (randomly assigned if blank), instance size (default: g2.medium),
|
169
175
|
\x5\x5Optional parameters are as follows:
|
@@ -171,6 +177,7 @@ module CivoCLI
|
|
171
177
|
\x5 --nodes=<count> - '3' if blank
|
172
178
|
\x5 --version=<version> - our latest k3s version if blank
|
173
179
|
\x5 --applications=name1,name2 - optional, use names shown by running `civo applications`
|
180
|
+
\x5 --remove-applications=name1,name2 - optional, remove default application names shown by running `civo applications`
|
174
181
|
\x5 --wait - wait for build to complete and show status. Off by default.
|
175
182
|
\x5 --save - save resulting configuration to ~/.kube/config (requires kubectl and the --wait option)
|
176
183
|
\x5 --switch - switch context to newly-created cluster (requires kubectl and the --wait and --save options, as well as existing kubeconfig file)
|
@@ -207,6 +214,14 @@ module CivoCLI
|
|
207
214
|
end
|
208
215
|
end
|
209
216
|
|
217
|
+
(options[:remove_applications] || "").split(",").map(&:chomp).each do |name|
|
218
|
+
app = Finder.detect_app(name)
|
219
|
+
unless app.default # Not a default application, no need to remove
|
220
|
+
next
|
221
|
+
end
|
222
|
+
applications << "-#{app.name}"
|
223
|
+
end
|
224
|
+
|
210
225
|
@cluster = Civo::Kubernetes.create(name: name, target_nodes_size: options[:size], num_target_nodes: options[:nodes], applications: applications.join(","), version: options[:version])
|
211
226
|
|
212
227
|
if options[:wait]
|
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.6
|
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: 2019-11-
|
13
|
+
date: 2019-11-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|