kuby-azure 0.3.1 → 0.3.2

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: 4027520ee2e9376cadfea437510c241d52302865a36d03892cc7f62bdd7f144d
4
- data.tar.gz: 27c981836c7941d690d7180173398931ff8eef430f76b6e80d98b26553dee416
3
+ metadata.gz: 843b278c3e282adca8a249e1e82cbe53f11d61508bc943a842612923dc5bffb8
4
+ data.tar.gz: 2ec6da6f810679586997592b4b6eb55b15c2509f052fbc1b122bf567206d30b2
5
5
  SHA512:
6
- metadata.gz: 109405ffc24f9a2907c12e52bd79bba0f0d187ae40ac3bb86a9b6453198afbf1d49f1c87b7ab313822b1543b4fe63c8ec249864c48b30a79bd14a5199288c570
7
- data.tar.gz: adc4a21adca8cbd0472da690ae9213198d6cdabf0eb48a85ceff6faeb4738892703a564e05bb88a3b4533fd7046df70f67bf304b46e0fcb05e87e47a4fce4a6c
6
+ metadata.gz: 02e7d0be446f09f5d5fd158adee1f122173f8d78e5479e93ee2946f786ac1a8f41b3b1eef19f2850cea8e4fc7c76763ad27a15f23e4fd9fd30da08d2bd924e42
7
+ data.tar.gz: 0f53e31bf7ff3714823d8a21a1028f9c211df621bf0e23019ac4edb980e476ad9a469ef6fc61f99b05a309e8791924d3f51f4ea80e81cd8a084b98bd99dffb9b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.3.2
2
+ * Refresh kubeconfig before CLI object is constructed.
3
+
1
4
  ## 0.3.1
2
5
  * Add a unique hash of the configuration options to the kubeconfig path (#1, @pandwoter)
3
6
 
@@ -25,22 +25,18 @@ module Kuby
25
25
  STORAGE_CLASS_NAME
26
26
  end
27
27
 
28
- def before_setup
29
- refresh_kubeconfig
30
- end
31
-
32
- def before_deploy(*)
33
- refresh_kubeconfig
28
+ def kubernetes_cli
29
+ @kubernetes_cli ||= begin
30
+ refresh_kubeconfig
31
+ super
32
+ end
34
33
  end
35
34
 
36
35
  private
37
36
 
38
37
  def after_initialize
39
38
  @config = Config.new
40
-
41
- kubernetes_cli.before_execute do
42
- refresh_kubeconfig
43
- end
39
+ @kubeconfig_refreshed = false
44
40
  end
45
41
 
46
42
  def client
@@ -67,10 +63,13 @@ module Kuby
67
63
  kubeconfig = cred.kubeconfigs.first.value.pack('C*')
68
64
  File.write(kubeconfig_path, kubeconfig)
69
65
 
66
+ @kubeconfig_refreshed = true
67
+
70
68
  Kuby.logger.info('Successfully refreshed kubeconfig!')
71
69
  end
72
70
 
73
71
  def should_refresh_kubeconfig?
72
+ return false if @kubeconfig_refreshed
74
73
  !File.exist?(kubeconfig_path) || !can_communicate_with_cluster?
75
74
  end
76
75
 
@@ -1,5 +1,5 @@
1
1
  module Kuby
2
2
  module Azure
3
- VERSION = '0.3.1'.freeze
3
+ VERSION = '0.3.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuby-azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-01 00:00:00.000000000 Z
11
+ date: 2022-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kube-dsl
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.1.4
76
+ rubygems_version: 3.2.22
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Azure provider for Kuby.