k8sflow 0.12.0 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/k8sflow/command/docker/docker_topic.rb +1 -1
- data/lib/k8sflow/command/docker/run.rb +8 -6
- data/lib/k8sflow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d511f36f3f927c609c9faa3c22063c9fec510a9
|
4
|
+
data.tar.gz: eb0ed71a7af6fc36d8bd05b9ccd52f584aba5635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d609c04cb0d88dfde632838216b4aee1cbfe970e0c2f16be9489cd3ce72b5ae5f7d950f55878e2f00531a7d4aa9cac10a2da5e0124ed131bb9ee82cb4d1215c0
|
7
|
+
data.tar.gz: 70c22a1c8a3e9e7e76a761c6090b1f3e7e1640c624afcfaf7b45b8c1690361b3ba4e784fafa1e2546772668623dee93080a5ad58680160953312ed271252904b
|
@@ -5,7 +5,7 @@ module K8sflow
|
|
5
5
|
description: 'Mange docker image and run'
|
6
6
|
|
7
7
|
option :registry, '-r', '--registry DOCKER_REPO', 'Docker registry to pull/fetch images'
|
8
|
-
option :docker_api, "-H", "--host host", "docker api endpoint", default: "unix
|
8
|
+
option :docker_api, "-H", "--host host", "docker api endpoint", default: "unix:///var/run/docker.sock"
|
9
9
|
option :tag, '-t', '--tag TAG', "Image tag", default: 'latest'
|
10
10
|
|
11
11
|
end
|
@@ -56,7 +56,7 @@ $ k8sflow run -t 2.10 -p 3000:3000 'run server -p 3000'
|
|
56
56
|
|
57
57
|
def env_vars(options)
|
58
58
|
envs = {}
|
59
|
-
if options.
|
59
|
+
if options.key?(:envs)
|
60
60
|
options[:envs].each do |e|
|
61
61
|
sp = e.split("=")
|
62
62
|
key = sp[0..-2].join("=")
|
@@ -65,11 +65,13 @@ $ k8sflow run -t 2.10 -p 3000:3000 'run server -p 3000'
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
if options.
|
68
|
+
if options.key?(:varager_api) && !options[:varager_api].empty?
|
69
69
|
uri = options[:varager_api]
|
70
70
|
token = options[:varager_token]
|
71
|
-
|
72
|
-
|
71
|
+
if uri && token
|
72
|
+
client = K8sflow::Utils::Varager.new(token, uri)
|
73
|
+
envs.merge!(client.envs(options[:app], false))
|
74
|
+
end
|
73
75
|
end
|
74
76
|
pp envs
|
75
77
|
return envs
|
@@ -100,8 +102,8 @@ $ k8sflow run -t 2.10 -p 3000:3000 'run server -p 3000'
|
|
100
102
|
container.start
|
101
103
|
puts "container created with id: #{container.id}"
|
102
104
|
if !options[:detach]
|
103
|
-
puts "docker -H #{Docker.url} attach #{container.id}"
|
104
|
-
exec("docker -H #{Docker.url} attach #{container.id}")
|
105
|
+
puts "docker -H #{::Docker.url} attach #{container.id}"
|
106
|
+
exec("docker -H #{::Docker.url} attach #{container.id}")
|
105
107
|
end
|
106
108
|
end
|
107
109
|
|
data/lib/k8sflow/version.rb
CHANGED