kubernetes-deploy 0.7.5 → 0.7.7

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
  SHA1:
3
- metadata.gz: 8974c6df435df28dab80164ebdea271275813e2b
4
- data.tar.gz: a4d53b653bb5cfa44307f92f865bcdf08a5c1540
3
+ metadata.gz: 736dcd89768f7d52df6c38968e10dcb19b05f08c
4
+ data.tar.gz: 95592ab3302c663f8144b191b951e7dc11debd4d
5
5
  SHA512:
6
- metadata.gz: 3f2d103ec8b209060c2bcfcb426ac7a7ed002770ac45f2e5ca1aed2d918e86dc6636509ce0eb26610702cf29689b57e48696e41d99a64c2d7ead4a4ac0169ac6
7
- data.tar.gz: 2d7f6b144b8c8af3d577ec8fd4f1636b6e274510df9b32036b7f1e4865abc71b3a75eea03c7427a7c46cce9b63019b85bf3a2ce242b0673ea72e9cc6d7ae0b3e
6
+ metadata.gz: 7c7be904670a6dbffb98f9252e5d0d5c804b91958ac723505882c9edcde01a54f68753cc47b8a085bfe02118b006911805ce995e7b29c84669bdd18ea41bde30
7
+ data.tar.gz: 5c973ed3573aa46a155c982f1f780b64ba47a391fc5d970f5d9b255d8bce1c17bbfdac1b6e3a1aa56433cf602a589bf689c2cb743aa48178120bcfeaf1b21be7
@@ -34,7 +34,7 @@ module KubernetesDeploy
34
34
  private
35
35
 
36
36
  def cloudsql_proxy_deployment_exists?
37
- deployment, _err, st = kubectl.run("get", "deployments", "cloudsql-proxy", "-o=json")
37
+ deployment, _err, st = kubectl.run("get", "deployments", "cloudsql-#{cloudsql_resource_uuid}", "-o=json")
38
38
 
39
39
  if st.success?
40
40
  parsed = JSON.parse(deployment)
@@ -62,5 +62,16 @@ module KubernetesDeploy
62
62
 
63
63
  false
64
64
  end
65
+
66
+ def cloudsql_resource_uuid
67
+ return @cloudsql_resource_uuid if defined?(@cloudsql_resource_uuid) && @cloudsql_resource_uuid
68
+
69
+ redis, _err, st = kubectl.run("get", "cloudsqls", @name, "-o=json")
70
+ if st.success?
71
+ parsed = JSON.parse(redis)
72
+
73
+ @cloudsql_resource_uuid = parsed.fetch("metadata", {}).fetch("uid", nil)
74
+ end
75
+ end
65
76
  end
66
77
  end
@@ -106,7 +106,7 @@ module KubernetesDeploy
106
106
  container.args = args
107
107
  container.env ||= []
108
108
 
109
- env_args = env_vars.map do |key, value|
109
+ env_args = env_vars.map do |env|
110
110
  key, value = env.split('=', 2)
111
111
  { name: key, value: value }
112
112
  end
@@ -1,3 +1,3 @@
1
1
  module KubernetesDeploy
2
- VERSION = "0.7.5"
2
+ VERSION = "0.7.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubernetes-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Verey
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-06-15 00:00:00.000000000 Z
12
+ date: 2017-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport