metatron 0.7.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +45 -42
- data/lib/metatron/templates/cluster_role.rb +1 -1
- data/lib/metatron/templates/daemon_set.rb +1 -1
- data/lib/metatron/templates/job.rb +1 -1
- data/lib/metatron/templates/namespace.rb +1 -1
- data/lib/metatron/templates/network_policy.rb +1 -1
- data/lib/metatron/templates/resource_quota.rb +32 -0
- data/lib/metatron/templates/role.rb +1 -1
- data/lib/metatron/version.rb +1 -1
- data/lib/metatron.rb +1 -0
- data/metatron.gemspec +2 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef4bf936a9316f23439a920e4a6923362640b185ccc1ee529ce4b164cf6acd08
|
4
|
+
data.tar.gz: 6a8b1ce24431f8bf991d0a2c9cf9ab85c82c601e80c001e3ef8c40e5d9fda009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbd66de712a0770d70f907157d7165e3d3c05e3c0c273e29786ac826022f1564be6019e22c0539c6d8a36e91047e851e019f7ad01521060e1603644f45dd5d11
|
7
|
+
data.tar.gz: d168cebe1c6aa51f36975313b731e9f07a09402f446a6fe891f51b01d0106fc7c4a28ca87c4641239dc1165cad9aa157ec2e4fed111518c5034d18327efd5891
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.3.5
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metatron (0.
|
4
|
+
metatron (0.8.2)
|
5
5
|
json (~> 2.6)
|
6
6
|
rack (>= 2.2.8, < 4)
|
7
7
|
|
@@ -12,71 +12,73 @@ GEM
|
|
12
12
|
backport (1.2.0)
|
13
13
|
benchmark (0.3.0)
|
14
14
|
byebug (11.1.3)
|
15
|
-
diff-lcs (1.5.
|
16
|
-
docile (1.4.
|
15
|
+
diff-lcs (1.5.1)
|
16
|
+
docile (1.4.1)
|
17
17
|
e2mmap (0.1.0)
|
18
|
-
jaro_winkler (1.
|
19
|
-
json (2.
|
18
|
+
jaro_winkler (1.6.0)
|
19
|
+
json (2.7.2)
|
20
20
|
kramdown (2.4.0)
|
21
21
|
rexml
|
22
22
|
kramdown-parser-gfm (1.1.0)
|
23
23
|
kramdown (~> 2.0)
|
24
24
|
language_server-protocol (3.17.0.3)
|
25
|
-
nokogiri (1.
|
25
|
+
nokogiri (1.16.7-arm64-darwin)
|
26
26
|
racc (~> 1.4)
|
27
|
-
nokogiri (1.
|
27
|
+
nokogiri (1.16.7-x86_64-linux)
|
28
28
|
racc (~> 1.4)
|
29
|
-
parallel (1.
|
30
|
-
parser (3.
|
29
|
+
parallel (1.26.3)
|
30
|
+
parser (3.3.5.0)
|
31
31
|
ast (~> 2.4.1)
|
32
32
|
racc
|
33
|
-
racc (1.
|
34
|
-
rack (3.
|
33
|
+
racc (1.8.1)
|
34
|
+
rack (3.1.8)
|
35
35
|
rack-test (2.1.0)
|
36
36
|
rack (>= 1.3)
|
37
37
|
rainbow (3.1.1)
|
38
38
|
rake (12.3.3)
|
39
39
|
rbs (2.8.4)
|
40
|
-
regexp_parser (2.
|
40
|
+
regexp_parser (2.9.2)
|
41
41
|
reverse_markdown (2.1.1)
|
42
42
|
nokogiri
|
43
|
-
rexml (3.
|
44
|
-
rspec (3.
|
45
|
-
rspec-core (~> 3.
|
46
|
-
rspec-expectations (~> 3.
|
47
|
-
rspec-mocks (~> 3.
|
48
|
-
rspec-core (3.
|
49
|
-
rspec-support (~> 3.
|
50
|
-
rspec-expectations (3.
|
43
|
+
rexml (3.3.8)
|
44
|
+
rspec (3.13.0)
|
45
|
+
rspec-core (~> 3.13.0)
|
46
|
+
rspec-expectations (~> 3.13.0)
|
47
|
+
rspec-mocks (~> 3.13.0)
|
48
|
+
rspec-core (3.13.2)
|
49
|
+
rspec-support (~> 3.13.0)
|
50
|
+
rspec-expectations (3.13.3)
|
51
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
-
rspec-support (~> 3.
|
53
|
-
rspec-mocks (3.
|
52
|
+
rspec-support (~> 3.13.0)
|
53
|
+
rspec-mocks (3.13.2)
|
54
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-support (3.
|
57
|
-
rubocop (1.
|
55
|
+
rspec-support (~> 3.13.0)
|
56
|
+
rspec-support (3.13.1)
|
57
|
+
rubocop (1.67.0)
|
58
58
|
json (~> 2.3)
|
59
59
|
language_server-protocol (>= 3.17.0)
|
60
60
|
parallel (~> 1.10)
|
61
|
-
parser (>= 3.
|
61
|
+
parser (>= 3.3.0.2)
|
62
62
|
rainbow (>= 2.2.2, < 4.0)
|
63
|
-
regexp_parser (>=
|
64
|
-
|
65
|
-
rubocop-ast (>= 1.28.1, < 2.0)
|
63
|
+
regexp_parser (>= 2.4, < 3.0)
|
64
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
66
65
|
ruby-progressbar (~> 1.7)
|
67
66
|
unicode-display_width (>= 2.4.0, < 3.0)
|
68
|
-
rubocop-ast (1.
|
69
|
-
parser (>= 3.
|
70
|
-
rubocop-capybara (2.
|
67
|
+
rubocop-ast (1.32.3)
|
68
|
+
parser (>= 3.3.1.0)
|
69
|
+
rubocop-capybara (2.21.0)
|
71
70
|
rubocop (~> 1.41)
|
72
|
-
rubocop-factory_bot (2.
|
73
|
-
rubocop (~> 1.
|
71
|
+
rubocop-factory_bot (2.26.1)
|
72
|
+
rubocop (~> 1.61)
|
74
73
|
rubocop-rake (0.6.0)
|
75
74
|
rubocop (~> 1.0)
|
76
|
-
rubocop-rspec (2.
|
75
|
+
rubocop-rspec (2.31.0)
|
77
76
|
rubocop (~> 1.40)
|
78
77
|
rubocop-capybara (~> 2.17)
|
79
78
|
rubocop-factory_bot (~> 2.22)
|
79
|
+
rubocop-rspec_rails (~> 2.28)
|
80
|
+
rubocop-rspec_rails (2.29.1)
|
81
|
+
rubocop (~> 1.61)
|
80
82
|
ruby-progressbar (1.13.0)
|
81
83
|
simplecov (0.22.0)
|
82
84
|
docile (~> 1.1)
|
@@ -85,9 +87,9 @@ GEM
|
|
85
87
|
simplecov-cobertura (2.1.0)
|
86
88
|
rexml
|
87
89
|
simplecov (~> 0.19)
|
88
|
-
simplecov-html (0.
|
90
|
+
simplecov-html (0.13.1)
|
89
91
|
simplecov_json_formatter (0.1.4)
|
90
|
-
solargraph (0.
|
92
|
+
solargraph (0.50.0)
|
91
93
|
backport (~> 1.2)
|
92
94
|
benchmark
|
93
95
|
bundler (~> 2.0)
|
@@ -103,13 +105,14 @@ GEM
|
|
103
105
|
thor (~> 1.0)
|
104
106
|
tilt (~> 2.0)
|
105
107
|
yard (~> 0.9, >= 0.9.24)
|
106
|
-
thor (1.3.
|
107
|
-
tilt (2.
|
108
|
-
unicode-display_width (2.
|
109
|
-
yard (0.9.
|
108
|
+
thor (1.3.2)
|
109
|
+
tilt (2.4.0)
|
110
|
+
unicode-display_width (2.6.0)
|
111
|
+
yard (0.9.37)
|
110
112
|
|
111
113
|
PLATFORMS
|
112
114
|
arm64-darwin-22
|
115
|
+
arm64-darwin-23
|
113
116
|
x86_64-linux
|
114
117
|
|
115
118
|
DEPENDENCIES
|
@@ -128,4 +131,4 @@ DEPENDENCIES
|
|
128
131
|
yard (~> 0.9)
|
129
132
|
|
130
133
|
BUNDLED WITH
|
131
|
-
2.4.
|
134
|
+
2.4.13
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Metatron
|
4
|
+
module Templates
|
5
|
+
# Template for basic Role k8s resource
|
6
|
+
class ResourceQuota < Template
|
7
|
+
include Concerns::Annotated
|
8
|
+
include Concerns::Namespaced
|
9
|
+
|
10
|
+
attr_accessor :additional_labels, :spec
|
11
|
+
|
12
|
+
def initialize(name)
|
13
|
+
super
|
14
|
+
@additional_labels = {}
|
15
|
+
@spec = {}
|
16
|
+
end
|
17
|
+
|
18
|
+
def render
|
19
|
+
{
|
20
|
+
apiVersion:,
|
21
|
+
kind:,
|
22
|
+
metadata: {
|
23
|
+
name:,
|
24
|
+
labels: base_labels.merge(additional_labels)
|
25
|
+
}.merge(formatted_annotations).merge(formatted_namespace).compact
|
26
|
+
}.merge(formatted_spec)
|
27
|
+
end
|
28
|
+
|
29
|
+
def formatted_spec = (@spec || {}).empty? ? {} : { spec: }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/metatron/version.rb
CHANGED
data/lib/metatron.rb
CHANGED
@@ -35,6 +35,7 @@ require "metatron/templates/namespace"
|
|
35
35
|
require "metatron/templates/network_policy"
|
36
36
|
require "metatron/templates/persistent_volume_claim"
|
37
37
|
require "metatron/templates/replica_set"
|
38
|
+
require "metatron/templates/resource_quota"
|
38
39
|
require "metatron/templates/role"
|
39
40
|
require "metatron/templates/role_binding"
|
40
41
|
require "metatron/templates/secret"
|
data/metatron.gemspec
CHANGED
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.required_ruby_version = "~> 3.1"
|
28
28
|
|
29
|
-
spec.
|
30
|
-
spec.
|
29
|
+
spec.add_dependency "json", "~> 2.6"
|
30
|
+
spec.add_dependency "rack", ">= 2.2.8", "< 4"
|
31
31
|
|
32
32
|
spec.add_development_dependency "bundler", "~> 2.3"
|
33
33
|
spec.add_development_dependency "byebug", "~> 11"
|
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.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Gnagy
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -212,7 +212,7 @@ dependencies:
|
|
212
212
|
- - "~>"
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '0.9'
|
215
|
-
description:
|
215
|
+
description:
|
216
216
|
email:
|
217
217
|
- jonathan.gnagy@gmail.com
|
218
218
|
executables: []
|
@@ -255,6 +255,7 @@ files:
|
|
255
255
|
- lib/metatron/templates/persistent_volume_claim.rb
|
256
256
|
- lib/metatron/templates/pod.rb
|
257
257
|
- lib/metatron/templates/replica_set.rb
|
258
|
+
- lib/metatron/templates/resource_quota.rb
|
258
259
|
- lib/metatron/templates/role.rb
|
259
260
|
- lib/metatron/templates/role_binding.rb
|
260
261
|
- lib/metatron/templates/secret.rb
|
@@ -272,7 +273,7 @@ licenses:
|
|
272
273
|
metadata:
|
273
274
|
homepage_uri: https://github.com/jgnagy/metatron
|
274
275
|
source_code_uri: https://github.com/jgnagy/metatron
|
275
|
-
post_install_message:
|
276
|
+
post_install_message:
|
276
277
|
rdoc_options: []
|
277
278
|
require_paths:
|
278
279
|
- lib
|
@@ -287,8 +288,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
288
|
- !ruby/object:Gem::Version
|
288
289
|
version: '0'
|
289
290
|
requirements: []
|
290
|
-
rubygems_version: 3.
|
291
|
-
signing_key:
|
291
|
+
rubygems_version: 3.5.16
|
292
|
+
signing_key:
|
292
293
|
specification_version: 4
|
293
294
|
summary: So meta
|
294
295
|
test_files: []
|