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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e90ffc780245b77b913a2a5e314a47e0a0b7b3374cdfe9d648f84b8f66b414c8
4
- data.tar.gz: 63f17fd2007eedb6087efbcbb04a55fbbff126faebec1fec820699fa3f161e73
3
+ metadata.gz: b547957f2d531e61809da88d07b4e67e0822f8b950585a7ca6837b42c038a736
4
+ data.tar.gz: d42ce8e7b56a75affd123b8d233ae24c502177143b1db08c324e1680031e7690
5
5
  SHA512:
6
- metadata.gz: 6b6d6e5d96356fe3320a08242b1b1c32e4a512f8c594e8fe363666baff30df91c7d90d4ef8ecb718f6098bfd60530bfdfd100cdc977bfee8b39da1ffe93a813b
7
- data.tar.gz: 659852675b07e85f4a9886df8e9ac8ded3faf85e9f3bebe4879e5fcc2ff64f102f28c726c5d0bb852d8863759e7ded3701642dc5a2fc6e4c4ae2966b0c7d00c6
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- civo_cli (0.5.5)
4
+ civo_cli (0.5.6)
5
5
  bundler (>= 1.17)
6
6
  civo (>= 1.2.9)
7
7
  colorize
@@ -1,3 +1,3 @@
1
1
  module CivoCLI
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
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
- if Gem::Version.new(latest_version) > Gem::Version.new(version)
20
- upgrade_available = true
21
- version = "#{version} *".colorize(:red)
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.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-12 00:00:00.000000000 Z
13
+ date: 2019-11-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake