uffizzi-cli 2.4.10 → 2.4.11
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/lib/uffizzi/cli/install.rb +15 -3
- data/lib/uffizzi/clients/api/api_client.rb +8 -0
- data/lib/uffizzi/clients/api/api_routes.rb +4 -0
- 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: 30f7c016d8af15ece13fcf170ef4b0cb244aba87837567b042e4d2d2cfba9512
|
|
4
|
+
data.tar.gz: 17ecf2ed0ba109eb515ad05695b92d0bccfe7ac535bd923e14d091ddc5feb814
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6482ab9cf846b47402a332de11f054c0c845efa472cf754e627c0b767c2926f5f9e5ffcbf604f34ccaa562fd551124c777e572b28a298cf96982d9cf7f0446c0
|
|
7
|
+
data.tar.gz: 685212d7f1102ed76976a330499e9ada8e0f9cf2e61a58fd01b65f240d2af66ac27f128c20bdc01d8b0dae06f014f947a7db2dd633481bce7471db616e43b6ee
|
data/lib/uffizzi/cli/install.rb
CHANGED
|
@@ -20,9 +20,10 @@ module Uffizzi
|
|
|
20
20
|
method_option :'node-selector-template', required: false, type: :string
|
|
21
21
|
def controller(hostname)
|
|
22
22
|
Uffizzi::AuthHelper.check_login
|
|
23
|
+
check_account_can_install
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
InstallService.kubectl_exists?
|
|
26
|
+
InstallService.helm_exists?
|
|
26
27
|
|
|
27
28
|
if options[:context].present? && options[:context] != InstallService.kubeconfig_current_context
|
|
28
29
|
InstallService.set_current_context(options[:context])
|
|
@@ -182,7 +183,18 @@ module Uffizzi
|
|
|
182
183
|
|
|
183
184
|
def create_controller_settings(params)
|
|
184
185
|
response = create_account_controller_settings(server, account_id, params)
|
|
185
|
-
|
|
186
|
+
unless Uffizzi::ResponseHelper.created?(response)
|
|
187
|
+
Uffizzi::ResponseHelper.handle_failed_response(response)
|
|
188
|
+
raise Uffizzi::Error.new
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
def check_account_can_install
|
|
193
|
+
response = check_can_install(server, account_id)
|
|
194
|
+
unless Uffizzi::ResponseHelper.ok?(response)
|
|
195
|
+
Uffizzi::ResponseHelper.handle_failed_response(response)
|
|
196
|
+
raise Uffizzi::Error.new
|
|
197
|
+
end
|
|
186
198
|
end
|
|
187
199
|
|
|
188
200
|
def build_controller_setting_params(uri, installation_options)
|
|
@@ -44,6 +44,14 @@ module ApiClient
|
|
|
44
44
|
build_response(response)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
def check_can_install(server, account_id)
|
|
48
|
+
uri = account_can_install_uri(server, account_id)
|
|
49
|
+
|
|
50
|
+
response = http_client.make_get_request(uri)
|
|
51
|
+
|
|
52
|
+
build_response(response)
|
|
53
|
+
end
|
|
54
|
+
|
|
47
55
|
def fetch_projects(server)
|
|
48
56
|
uri = projects_uri(server)
|
|
49
57
|
response = http_client.make_get_request(uri)
|
|
@@ -11,6 +11,10 @@ module ApiRoutes
|
|
|
11
11
|
"#{server}/api/cli/v1/accounts/#{account_name}"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
def account_can_install_uri(server, account_id)
|
|
15
|
+
"#{server}/api/cli/v1/accounts/#{account_id}/check_can_install"
|
|
16
|
+
end
|
|
17
|
+
|
|
14
18
|
def compose_file_uri(server, project_slug)
|
|
15
19
|
"#{server}/api/cli/v1/projects/#{project_slug}/compose_file"
|
|
16
20
|
end
|
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.11
|
|
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: 2024-
|
|
12
|
+
date: 2024-08-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|