metatron 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/metatron/templates/container.rb +18 -3
- data/lib/metatron/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e64a202aa6679076cdd620c17c7885e0f01b34af6b8d0fcc07051ff26f0b9489
|
|
4
|
+
data.tar.gz: c470c047b7cb57a770d372b988a8135ca06139bc730dfafca01b8dc759f15df0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4708fb55b631916c16214f436b7d7577dece26c66cf7dab478a5d8a76a711b50d71fd267bfe72719eb999411377eb5190bb5b42874dbe153ee05def637321eef
|
|
7
|
+
data.tar.gz: a5ee6b2437fb07fcbb5a3bd17859ed73e5dbd25af935ca6dcfff6568f30eed7a520b711065e54db978489ec7d91082b9d1cefa1119f68db9ad42c79f2966c74a
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
metatron (0.2.
|
|
4
|
+
metatron (0.2.6)
|
|
5
5
|
json (~> 2.6)
|
|
6
6
|
puma (~> 6.3)
|
|
7
7
|
sinatra (~> 2.2)
|
|
@@ -39,7 +39,7 @@ GEM
|
|
|
39
39
|
puma (6.3.0)
|
|
40
40
|
nio4r (~> 2.0)
|
|
41
41
|
racc (1.7.1)
|
|
42
|
-
rack (2.2.
|
|
42
|
+
rack (2.2.8)
|
|
43
43
|
rack-protection (2.2.4)
|
|
44
44
|
rack
|
|
45
45
|
rack-test (2.1.0)
|
|
@@ -64,7 +64,7 @@ GEM
|
|
|
64
64
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
65
65
|
rspec-support (~> 3.12.0)
|
|
66
66
|
rspec-support (3.12.1)
|
|
67
|
-
rubocop (1.55.
|
|
67
|
+
rubocop (1.55.1)
|
|
68
68
|
json (~> 2.3)
|
|
69
69
|
language_server-protocol (>= 3.17.0)
|
|
70
70
|
parallel (~> 1.10)
|
|
@@ -83,7 +83,7 @@ GEM
|
|
|
83
83
|
rubocop (~> 1.33)
|
|
84
84
|
rubocop-rake (0.6.0)
|
|
85
85
|
rubocop (~> 1.0)
|
|
86
|
-
rubocop-rspec (2.
|
|
86
|
+
rubocop-rspec (2.23.0)
|
|
87
87
|
rubocop (~> 1.33)
|
|
88
88
|
rubocop-capybara (~> 2.17)
|
|
89
89
|
rubocop-factory_bot (~> 2.22)
|
|
@@ -5,7 +5,7 @@ module Metatron
|
|
|
5
5
|
# Template for containers used by k8s resources (not an actual resource)
|
|
6
6
|
class Container
|
|
7
7
|
attr_accessor :name, :image, :command, :args, :env, :envfrom, :resources, :volume_mounts,
|
|
8
|
-
:image_pull_policy, :
|
|
8
|
+
:image_pull_policy, :lifecycle, :probes, :security_context, :ports,
|
|
9
9
|
:stdin, :tty
|
|
10
10
|
|
|
11
11
|
alias imagePullPolicy image_pull_policy
|
|
@@ -23,15 +23,16 @@ module Metatron
|
|
|
23
23
|
@resources = {}
|
|
24
24
|
@volume_mounts = []
|
|
25
25
|
@image_pull_policy = "IfNotPresent"
|
|
26
|
-
@
|
|
26
|
+
@lifecycle = {}
|
|
27
27
|
@probes = {}
|
|
28
28
|
@stdin = true
|
|
29
29
|
@tty = true
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def render
|
|
32
|
+
def render # rubocop:disable Metrics/AbcSize
|
|
33
33
|
{
|
|
34
34
|
name:,
|
|
35
|
+
command:,
|
|
35
36
|
image:,
|
|
36
37
|
imagePullPolicy:,
|
|
37
38
|
stdin:,
|
|
@@ -43,9 +44,23 @@ module Metatron
|
|
|
43
44
|
.merge(formatted_ports)
|
|
44
45
|
.merge(formatted_volume_mounts)
|
|
45
46
|
.merge(formatted_security_context)
|
|
47
|
+
.merge(formatted_args)
|
|
48
|
+
.merge(formatted_lifecycle)
|
|
46
49
|
.compact
|
|
47
50
|
end
|
|
48
51
|
|
|
52
|
+
def formatted_args
|
|
53
|
+
return {} unless args && !args.empty?
|
|
54
|
+
|
|
55
|
+
{ args: }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def formatted_lifecycle
|
|
59
|
+
return {} unless lifecycle && !lifecycle.empty?
|
|
60
|
+
|
|
61
|
+
{ lifecycle: }
|
|
62
|
+
end
|
|
63
|
+
|
|
49
64
|
def formatted_environment # rubocop:disable Metrics/PerceivedComplexity
|
|
50
65
|
return {} unless env && !env.empty?
|
|
51
66
|
|
data/lib/metatron/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metatron
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Gnagy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-08-
|
|
11
|
+
date: 2023-08-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|