kubec 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/exe/kubec +1 -0
- data/kubec.gemspec +2 -0
- data/lib/kubec/application.rb +2 -0
- data/lib/kubec/config/base.rb +2 -0
- data/lib/kubec/config/downloader.rb +2 -0
- data/lib/kubec/config.rb +2 -0
- data/lib/kubec/deploy.rb +2 -0
- data/lib/kubec/dsl/env.rb +2 -0
- data/lib/kubec/dsl/paths.rb +2 -0
- data/lib/kubec/dsl.rb +2 -0
- data/lib/kubec/install.rb +2 -0
- data/lib/kubec/kubernetes/config.rb +2 -0
- data/lib/kubec/kubernetes/config_map.rb +2 -0
- data/lib/kubec/kubernetes/container.rb +2 -0
- data/lib/kubec/kubernetes/cron_job.rb +2 -0
- data/lib/kubec/kubernetes/deployment.rb +2 -0
- data/lib/kubec/kubernetes/has_attribute.rb +2 -0
- data/lib/kubec/kubernetes/metadata.rb +2 -0
- data/lib/kubec/kubernetes/service.rb +2 -0
- data/lib/kubec/kubernetes/template.rb +2 -0
- data/lib/kubec/kubernetes/volume.rb +11 -0
- data/lib/kubec/kubernetes.rb +2 -0
- data/lib/kubec/setup.rb +2 -0
- data/lib/kubec/status/base.rb +2 -0
- data/lib/kubec/status/deployment.rb +2 -0
- data/lib/kubec/status/pod.rb +2 -0
- data/lib/kubec/status/service.rb +2 -0
- data/lib/kubec/status.rb +2 -0
- data/lib/kubec/tasks/config.rake +2 -0
- data/lib/kubec/tasks/deploy.rake +2 -0
- data/lib/kubec/tasks/install.rake +2 -0
- data/lib/kubec/tasks/restart.rake +5 -3
- data/lib/kubec/tasks/status.rake +2 -0
- data/lib/kubec/utils/helper.rb +2 -0
- data/lib/kubec/utils/humanize_time.rb +3 -1
- data/lib/kubec/utils.rb +2 -0
- data/lib/kubec/version.rb +3 -1
- data/lib/kubec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98288e8129770078f433bbac2a568a01a0ae911c
|
4
|
+
data.tar.gz: 315fbf207df4a42dba6c85ab609f12a3eed0c8be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 109d0f108d214e8c72d167cef844551f370940c41eabebb1cc4c18608cb5e10fe7ba1383adcfa7bbb32c36a30ef80a7458ce0791c86da4deb371828e714a4c9a
|
7
|
+
data.tar.gz: c077d1da8a8100ab5a3d46c2f3308a749a7cb8e2901aca869ae7a09ce18666238fdf56e486fa5e1aef3fff7f958af4b5eebe0b53dbc9750028e01ceb315bb7a1
|
data/.rubocop.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
AllCops:
|
2
|
-
|
2
|
+
TargetRubyVersion: 2.3
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/exe/kubec
CHANGED
data/kubec.gemspec
CHANGED
data/lib/kubec/application.rb
CHANGED
data/lib/kubec/config/base.rb
CHANGED
data/lib/kubec/config.rb
CHANGED
data/lib/kubec/deploy.rb
CHANGED
data/lib/kubec/dsl/env.rb
CHANGED
data/lib/kubec/dsl/paths.rb
CHANGED
data/lib/kubec/dsl.rb
CHANGED
data/lib/kubec/install.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Kubec
|
2
4
|
class Kubernetes
|
3
5
|
# :nodoc:
|
@@ -42,6 +44,15 @@ module Kubec
|
|
42
44
|
end
|
43
45
|
}
|
44
46
|
end
|
47
|
+
|
48
|
+
def secret(name, items = nil)
|
49
|
+
self[:secret] = {
|
50
|
+
secretName: name,
|
51
|
+
items: items&.map do |key, path|
|
52
|
+
{ key: key, path: path }
|
53
|
+
end
|
54
|
+
}
|
55
|
+
end
|
45
56
|
end
|
46
57
|
end
|
47
58
|
end
|
data/lib/kubec/kubernetes.rb
CHANGED
data/lib/kubec/setup.rb
CHANGED
data/lib/kubec/status/base.rb
CHANGED
data/lib/kubec/status/pod.rb
CHANGED
data/lib/kubec/status/service.rb
CHANGED
data/lib/kubec/status.rb
CHANGED
data/lib/kubec/tasks/config.rake
CHANGED
data/lib/kubec/tasks/deploy.rake
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
desc 'Restart all services'
|
2
4
|
task :restart do
|
3
5
|
# TODO: Refactor this section
|
@@ -7,11 +9,11 @@ task :restart do
|
|
7
9
|
end
|
8
10
|
|
9
11
|
Kubec::Utils::Helper.header 'Restarting deployments'
|
10
|
-
Kubec::Kubernetes.deployment.
|
12
|
+
Kubec::Kubernetes.deployment.map do |deploy|
|
11
13
|
Thread.new do
|
12
14
|
puts "=> Restart #{deploy.name}"
|
13
15
|
scale(stage, deploy.name, 0)
|
14
16
|
scale(stage, deploy.name, deploy.replicas)
|
15
|
-
end
|
16
|
-
end
|
17
|
+
end
|
18
|
+
end.each(&:join)
|
17
19
|
end
|
data/lib/kubec/tasks/status.rake
CHANGED
data/lib/kubec/utils/helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Kubec
|
2
4
|
module Utils
|
3
5
|
# :nodoc:
|
@@ -31,7 +33,7 @@ module Kubec
|
|
31
33
|
|
32
34
|
def convert(secs)
|
33
35
|
PAIRS.dup.map do |count, name|
|
34
|
-
next unless secs
|
36
|
+
next unless secs.positive?
|
35
37
|
secs, n = secs.divmod(count)
|
36
38
|
[n, name]
|
37
39
|
end.compact.reverse
|
data/lib/kubec/utils.rb
CHANGED
data/lib/kubec/version.rb
CHANGED
data/lib/kubec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kubec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 5xRuby
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|