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 +4 -4
- data/lib/uffizzi/cli/install.rb +26 -14
- data/lib/uffizzi/cli/uninstall.rb +1 -1
- data/lib/uffizzi/version.rb +1 -1
- 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: 1ef83eb18cf4f320ac6b596cc3b2d9ba72b6ed5a60e90e7dc54f61fa1e042630
|
4
|
+
data.tar.gz: 0a93840aa290162c4dc58a8ff3614fac4d58d988bd5296da5614db69524d0b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 215e24c7486176be02a14265492195334b096c20458f3ab926cb4bc76a82955f3f05f5ead2f9d812ca622a07e28d8747b580e47a8ac7f50c7a017c4674addb21
|
7
|
+
data.tar.gz: ad0e2178d3ad1d440d8b29cc2e1abc031b2ee5bdb5a6ac7119db36d287d69c7b8ae648ea817013c7fc1ad1d96dcd575ed0df956b6ed24f9da993acc41ccae577
|
data/lib/uffizzi/cli/install.rb
CHANGED
@@ -11,7 +11,7 @@ module Uffizzi
|
|
11
11
|
|
12
12
|
default_task :controller
|
13
13
|
|
14
|
-
desc 'controller [
|
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 =
|
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 [
|
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
|
data/lib/uffizzi/version.rb
CHANGED
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
|
+
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:
|
12
|
+
date: 2024-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|