uffizzi-cli 2.4.4 → 2.4.5

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
  SHA256:
3
- metadata.gz: c0dca2ba03ac849c8e1ca71bac3c495b698fda210f888320b06bbac114eb2168
4
- data.tar.gz: 1441cff7ebd668159423966a6b5a9604e8e377a45f8d027802c381814e297d1d
3
+ metadata.gz: 1ef83eb18cf4f320ac6b596cc3b2d9ba72b6ed5a60e90e7dc54f61fa1e042630
4
+ data.tar.gz: 0a93840aa290162c4dc58a8ff3614fac4d58d988bd5296da5614db69524d0b43
5
5
  SHA512:
6
- metadata.gz: 310e1accb7217654da0e8d4f84364c2db240495d5c5d4df602f63a8ad87b72c798b8151817a44a95224599dfd312bd83875fd7a36e4430bb1aefdcbd5425a9f0
7
- data.tar.gz: 262191965e225983bf075b45a878c49953f4f3955da4628ff64a39b5bc1641182e954a2c6d8bbc4a2808e3f4ba1382edc9b8cacfa36ac0d7de8db3bdf610c41a
6
+ metadata.gz: 215e24c7486176be02a14265492195334b096c20458f3ab926cb4bc76a82955f3f05f5ead2f9d812ca622a07e28d8747b580e47a8ac7f50c7a017c4674addb21
7
+ data.tar.gz: ad0e2178d3ad1d440d8b29cc2e1abc031b2ee5bdb5a6ac7119db36d287d69c7b8ae648ea817013c7fc1ad1d96dcd575ed0df956b6ed24f9da993acc41ccae577
@@ -11,7 +11,7 @@ module Uffizzi
11
11
 
12
12
  default_task :controller
13
13
 
14
- desc 'controller [HOSTNMAE]', 'Install uffizzi controller to cluster'
14
+ desc 'controller [HOSTNAME]', 'Install uffizzi controller to cluster'
15
15
  method_option :namespace, type: :string
16
16
  method_option :email, type: :string, required: true
17
17
  method_option :context, type: :string
@@ -20,14 +20,14 @@ module Uffizzi
20
20
  def controller(hostname)
21
21
  Uffizzi::AuthHelper.check_login
22
22
 
23
- InstallService.kubectl_exists?
24
- InstallService.helm_exists?
23
+ # InstallService.kubectl_exists?
24
+ # InstallService.helm_exists?
25
25
 
26
26
  if options[:context].present? && options[:context] != InstallService.kubeconfig_current_context
27
27
  InstallService.set_current_context(options[:context])
28
28
  end
29
29
 
30
- ask_confirmation
30
+ ask_confirmation(options[:namespace])
31
31
 
32
32
  uri = parse_hostname(hostname)
33
33
  installation_options = build_installation_options(uri)
@@ -159,16 +159,8 @@ module Uffizzi
159
159
  update_controller_settings(existing_controller_setting[:id], controller_setting_params)
160
160
  end
161
161
 
162
- def ask_confirmation
163
- msg = "\r\n"\
164
- 'This command will install Uffizzi into the default namespace of'\
165
- " the '#{InstallService.kubeconfig_current_context}' context."\
166
- "\r\n"\
167
- "To install in a different place, use options '--namespace' and/or '--context'."\
168
- "\r\n\r\n"\
169
- "After installation, new environments created for account '#{account_name}' will be deployed to this host cluster."\
170
- "\r\n\r\n"
171
-
162
+ def ask_confirmation(namespace)
163
+ msg = namespace.present? ? custom_namespace_installation_message(namespace) : default_installation_message
172
164
  Uffizzi.ui.say(msg)
173
165
 
174
166
  question = 'Okay to proceed?'
@@ -263,5 +255,25 @@ module Uffizzi
263
255
  def existing_controller_setting
264
256
  @existing_controller_setting ||= fetch_controller_settings[0]
265
257
  end
258
+
259
+ def default_installation_message
260
+ "\r\n"\
261
+ "This command will install Uffizzi into the 'default' namespace of"\
262
+ " the '#{InstallService.kubeconfig_current_context}' context."\
263
+ "\r\n"\
264
+ "To install in a different place, use options '--namespace' and/or '--context'."\
265
+ "\r\n\r\n"\
266
+ "After installation, new environments created for account '#{account_name}' will be deployed to this host cluster."\
267
+ "\r\n\r\n"
268
+ end
269
+
270
+ def custom_namespace_installation_message(namespace)
271
+ "\r\n"\
272
+ "This command will install Uffizzi into the '#{namespace}' namespace of"\
273
+ " the '#{InstallService.kubeconfig_current_context}' context."\
274
+ "\r\n\r\n"\
275
+ "After installation, new environments created for account '#{account_name}' will be deployed to this host cluster."\
276
+ "\r\n\r\n"
277
+ end
266
278
  end
267
279
  end
@@ -11,7 +11,7 @@ module Uffizzi
11
11
 
12
12
  default_task :controller
13
13
 
14
- desc 'controller [HOSTNMAE]', 'Install uffizzi controller to cluster'
14
+ desc 'controller [HOSTNAME]', 'Install uffizzi controller to cluster'
15
15
  method_option :namespace, type: :string
16
16
  method_option :context, type: :string
17
17
  def controller
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uffizzi
4
- VERSION = '2.4.4'
4
+ VERSION = '2.4.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uffizzi-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Thurman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-12-29 00:00:00.000000000 Z
12
+ date: 2024-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport