uffizzi-cli 2.4.9 → 2.4.10

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: 744480393ee81d335802bcb1008333c1e6c9b6f9870d7710dfff294698a1eb7a
4
- data.tar.gz: cf43c7519e0621f9be3fbb18d9fd89fd0cf2a6ea0dc56d0b41662428e6d4b46c
3
+ metadata.gz: 208b6ac1dfb59b5b76aac7cc0b4a21c8b4c725e8e843958fe10b98bdd50ec43f
4
+ data.tar.gz: 7335a86326e93a84dbf67f31b3182d18a6fbf88a9e4ce4a4c04af265c68f3809
5
5
  SHA512:
6
- metadata.gz: ef39ee4ce26c553068d279f3960ba924b7458fbf439a4ffd0abbed363fa359cbf9707df59e8ee439ff06f091894836f67d7bcdb8f2c78879caa7b52120e2dfb2
7
- data.tar.gz: 6c0471f16b076c5c8dedd2b714416c6514e03f9ee96b6d6aead5d5fca19556ac6f09e73b44a050ef07f7cdcfd3a72d9bb2b14902eda9931b5251830389aacc57
6
+ metadata.gz: 5302d2e8db9c5afb7c2550d45a15125d98efd472f8ae6902739b6900260719d213b1c71d79050e70018ad4381849155a2cc0730ae89d9af1f7268e10f08af7ab
7
+ data.tar.gz: fbaf9bdba63f98ce1811d70e1388f9823baa32bf6bb28469e6e48a41d41d8b4e477b99addef053b290acfdc606f7ae5600c4ba77c2a5db4fed7356bca28c158c
@@ -71,16 +71,16 @@ module Uffizzi
71
71
  }
72
72
  end
73
73
 
74
- def wait_ip
74
+ def wait_endpoint
75
75
  spinner = TTY::Spinner.new('[:spinner] Waiting on IP address...', format: :dots)
76
76
  spinner.auto_spin
77
77
 
78
- ip = nil
78
+ endpoint = nil
79
79
  try = 0
80
80
 
81
81
  loop do
82
- ip = InstallService.get_controller_ip(namespace)
83
- break if ip.present?
82
+ endpoint = InstallService.get_controller_endpoint(namespace)
83
+ break if endpoint.present?
84
84
 
85
85
  if try == 90
86
86
  spinner.error
@@ -94,7 +94,7 @@ module Uffizzi
94
94
 
95
95
  spinner.success
96
96
 
97
- ip
97
+ endpoint
98
98
  end
99
99
 
100
100
  def build_helm_values(params)
@@ -196,10 +196,10 @@ module Uffizzi
196
196
  end
197
197
 
198
198
  def say_success(uri)
199
- ip_address = wait_ip
199
+ endpoint = wait_endpoint
200
200
 
201
201
  msg = 'Your Uffizzi controller is ready. To configure DNS,'\
202
- " create a record for the hostname '*.#{uri.host}' pointing to '#{ip_address}'"
202
+ " create a record for the hostname '*.#{uri.host}' pointing to '#{endpoint}'"
203
203
  Uffizzi.ui.say(msg)
204
204
  end
205
205
 
@@ -85,7 +85,7 @@ class InstallService
85
85
  execute_command(cmd, say: false) { |stdout| stdout.present? && stdout.chop }
86
86
  end
87
87
 
88
- def get_controller_ip(namespace)
88
+ def get_controller_endpoint(namespace)
89
89
  cmd = "kubectl get ingress -n #{namespace} -o json"
90
90
  res = execute_command(cmd, say: false)
91
91
  ingress = JSON.parse(res)['items'].detect { |i| i['metadata']['name'] = INGRESS_NAME }
@@ -95,7 +95,10 @@ class InstallService
95
95
  load_balancers = ingress.dig('status', 'loadBalancer', 'ingress')
96
96
  return if load_balancers.blank?
97
97
 
98
- load_balancers.map { |i| i['ip'] }[0]
98
+ ip = load_balancers.map { |i| i['ip'] }[0]
99
+ return ip if ip.present?
100
+
101
+ load_balancers.map { |i| i['hostname'] }[0]
99
102
  end
100
103
 
101
104
  def build_controller_host(host)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uffizzi
4
- VERSION = '2.4.9'
4
+ VERSION = '2.4.10'
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.9
4
+ version: 2.4.10
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-04-02 00:00:00.000000000 Z
12
+ date: 2024-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport