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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce0057cd5b89a1b677248f3401987bafe4fb33bba5c5fe0b89dfd22272c1b559
4
- data.tar.gz: 520b31ebea42dca62172db9f30884eb648a015ece3498f26bacfbe408a1d114b
3
+ metadata.gz: ef4bf936a9316f23439a920e4a6923362640b185ccc1ee529ce4b164cf6acd08
4
+ data.tar.gz: 6a8b1ce24431f8bf991d0a2c9cf9ab85c82c601e80c001e3ef8c40e5d9fda009
5
5
  SHA512:
6
- metadata.gz: f3265a4f7dfa3e3d318063a08455a62a12aaab8fb07c122884af4ebe9705d23741537438324904ab7dfe71fa37388e420913205daf1d0816884cde439a4888bb
7
- data.tar.gz: 46c81f307d87486f1fadaf2a929032b70b0803cd13b08118410b2a9ca6c8ccdb64903c3e2cc45a73777fcd5f6463a188dd412cf885b7eccc901d7bc0363f1f2a
6
+ metadata.gz: bbd66de712a0770d70f907157d7165e3d3c05e3c0c273e29786ac826022f1564be6019e22c0539c6d8a36e91047e851e019f7ad01521060e1603644f45dd5d11
7
+ data.tar.gz: d168cebe1c6aa51f36975313b731e9f07a09402f446a6fe891f51b01d0106fc7c4a28ca87c4641239dc1165cad9aa157ec2e4fed111518c5034d18327efd5891
data/.rubocop.yml CHANGED
@@ -59,3 +59,6 @@ Style/StringConcatenation:
59
59
 
60
60
  RSpec/ExampleLength:
61
61
  Max: 10
62
+
63
+ RSpecRails:
64
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.3.5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metatron (0.7.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.0)
16
- docile (1.4.0)
15
+ diff-lcs (1.5.1)
16
+ docile (1.4.1)
17
17
  e2mmap (0.1.0)
18
- jaro_winkler (1.5.6)
19
- json (2.6.3)
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.15.5-arm64-darwin)
25
+ nokogiri (1.16.7-arm64-darwin)
26
26
  racc (~> 1.4)
27
- nokogiri (1.15.5-x86_64-linux)
27
+ nokogiri (1.16.7-x86_64-linux)
28
28
  racc (~> 1.4)
29
- parallel (1.23.0)
30
- parser (3.2.2.4)
29
+ parallel (1.26.3)
30
+ parser (3.3.5.0)
31
31
  ast (~> 2.4.1)
32
32
  racc
33
- racc (1.7.3)
34
- rack (3.0.8)
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.8.2)
40
+ regexp_parser (2.9.2)
41
41
  reverse_markdown (2.1.1)
42
42
  nokogiri
43
- rexml (3.2.6)
44
- rspec (3.12.0)
45
- rspec-core (~> 3.12.0)
46
- rspec-expectations (~> 3.12.0)
47
- rspec-mocks (~> 3.12.0)
48
- rspec-core (3.12.2)
49
- rspec-support (~> 3.12.0)
50
- rspec-expectations (3.12.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.12.0)
53
- rspec-mocks (3.12.6)
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.12.0)
56
- rspec-support (3.12.1)
57
- rubocop (1.57.2)
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.2.2.4)
61
+ parser (>= 3.3.0.2)
62
62
  rainbow (>= 2.2.2, < 4.0)
63
- regexp_parser (>= 1.8, < 3.0)
64
- rexml (>= 3.2.5, < 4.0)
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.30.0)
69
- parser (>= 3.2.1.0)
70
- rubocop-capybara (2.19.0)
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.24.0)
73
- rubocop (~> 1.33)
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.25.0)
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.12.3)
90
+ simplecov-html (0.13.1)
89
91
  simplecov_json_formatter (0.1.4)
90
- solargraph (0.49.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.0)
107
- tilt (2.3.0)
108
- unicode-display_width (2.5.0)
109
- yard (0.9.34)
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.19
134
+ 2.4.13
@@ -11,7 +11,7 @@ module Metatron
11
11
  alias aggregationRule aggregation_rule
12
12
 
13
13
  def initialize(name)
14
- super(name)
14
+ super
15
15
  @api_version = "rbac.authorization.k8s.io/v1"
16
16
  @rules = []
17
17
  end
@@ -11,7 +11,7 @@ module Metatron
11
11
  attr_accessor :replicas, :additional_labels
12
12
 
13
13
  def initialize(name)
14
- super(name)
14
+ super
15
15
  @api_version = "apps/v1"
16
16
  end
17
17
 
@@ -19,7 +19,7 @@ module Metatron
19
19
  alias ttlSecondsAfterFinished ttl_seconds_after_finished
20
20
 
21
21
  def initialize(name)
22
- super(name)
22
+ super
23
23
  @api_version = "batch/v1"
24
24
  end
25
25
 
@@ -9,7 +9,7 @@ module Metatron
9
9
  attr_accessor :additional_labels
10
10
 
11
11
  def initialize(name)
12
- super(name)
12
+ super
13
13
  @additional_labels = {}
14
14
  end
15
15
 
@@ -12,7 +12,7 @@ module Metatron
12
12
  alias podSelector pod_selector
13
13
 
14
14
  def initialize(name)
15
- super(name)
15
+ super
16
16
  @pod_selector = pod_selector
17
17
  @ingress = ingress
18
18
  @egress = egress
@@ -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
@@ -10,7 +10,7 @@ module Metatron
10
10
  attr_accessor :rules
11
11
 
12
12
  def initialize(name)
13
- super(name)
13
+ super
14
14
  @api_version = "rbac.authorization.k8s.io/v1"
15
15
  @rules = []
16
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Metatron
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.2"
5
5
  end
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.add_runtime_dependency "json", "~> 2.6"
30
- spec.add_runtime_dependency "rack", ">= 2.2.8", "< 4"
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.7.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: 2023-11-27 00:00:00.000000000 Z
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.4.10
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: []