metatron 0.8.0 → 0.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b844d137e3df7127e494a87bba53cf57343a99a91e0f36fdbd33defff23df6d
4
- data.tar.gz: 4dba955ae80c9ecffff78cca57de7750486ad7d07ca2c939c6678a6d048e253f
3
+ metadata.gz: ab8b6e01568e5bca15099a98463b818ff61bfded886be916822be4b01730900f
4
+ data.tar.gz: 25a3058b16e8978ab1300f6d8a88bb54efd6240dcec7c5bdd5fe8d18db21710a
5
5
  SHA512:
6
- metadata.gz: ffe7d65914ad3db99912387b9b27b177bde7e37981f0fe5b358b1f69a01eb271380f7326f8b84d93b0b82751a91ebebdd106816d0555dca657cff9d5b4b3e4a5
7
- data.tar.gz: 5e7893561036961a85605bbcac1a8b6d7ad4242c9298050ef2d73a32d5a7cc1818f05862b4b53497acbc6e3592fae3e80dc5f258043bb83eb61358c994011584
6
+ metadata.gz: ff00fade4a9ce16cf88d9edc146c4d65ae624f190fe1cafc90601e80483be195c067cb7bfcac49f3022ec5265d01b0e96c222d7a221ae3f5f717a9f48be8db28
7
+ data.tar.gz: b53644bed5c397ce9d7949f0cd7e356125e93c0d2d52fcd938dba36cd078fca7ee51aff66c9729c54d3d714ff9dbfed6f3138e1d5501744c60715f9af61958ec
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.4
1
+ 3.3.5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metatron (0.8.0)
4
+ metatron (0.8.3)
5
5
  json (~> 2.6)
6
6
  rack (>= 2.2.8, < 4)
7
7
 
@@ -10,63 +10,61 @@ GEM
10
10
  specs:
11
11
  ast (2.4.2)
12
12
  backport (1.2.0)
13
- benchmark (0.3.0)
13
+ benchmark (0.4.0)
14
14
  byebug (11.1.3)
15
15
  diff-lcs (1.5.1)
16
16
  docile (1.4.1)
17
17
  e2mmap (0.1.0)
18
18
  jaro_winkler (1.6.0)
19
- json (2.7.2)
20
- kramdown (2.4.0)
21
- rexml
19
+ json (2.9.0)
20
+ kramdown (2.5.1)
21
+ rexml (>= 3.3.9)
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.16.7-arm64-darwin)
25
+ nokogiri (1.17.2-arm64-darwin)
26
26
  racc (~> 1.4)
27
- nokogiri (1.16.7-x86_64-linux)
27
+ nokogiri (1.17.2-x86_64-linux)
28
28
  racc (~> 1.4)
29
29
  parallel (1.26.3)
30
- parser (3.3.4.2)
30
+ parser (3.3.6.0)
31
31
  ast (~> 2.4.1)
32
32
  racc
33
33
  racc (1.8.1)
34
- rack (3.1.7)
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.9.2)
40
+ regexp_parser (2.9.3)
41
41
  reverse_markdown (2.1.1)
42
42
  nokogiri
43
- rexml (3.3.5)
44
- strscan
43
+ rexml (3.3.9)
45
44
  rspec (3.13.0)
46
45
  rspec-core (~> 3.13.0)
47
46
  rspec-expectations (~> 3.13.0)
48
47
  rspec-mocks (~> 3.13.0)
49
- rspec-core (3.13.0)
48
+ rspec-core (3.13.2)
50
49
  rspec-support (~> 3.13.0)
51
- rspec-expectations (3.13.1)
50
+ rspec-expectations (3.13.3)
52
51
  diff-lcs (>= 1.2.0, < 2.0)
53
52
  rspec-support (~> 3.13.0)
54
- rspec-mocks (3.13.1)
53
+ rspec-mocks (3.13.2)
55
54
  diff-lcs (>= 1.2.0, < 2.0)
56
55
  rspec-support (~> 3.13.0)
57
- rspec-support (3.13.1)
58
- rubocop (1.65.1)
56
+ rspec-support (3.13.2)
57
+ rubocop (1.69.2)
59
58
  json (~> 2.3)
60
59
  language_server-protocol (>= 3.17.0)
61
60
  parallel (~> 1.10)
62
61
  parser (>= 3.3.0.2)
63
62
  rainbow (>= 2.2.2, < 4.0)
64
- regexp_parser (>= 2.4, < 3.0)
65
- rexml (>= 3.2.5, < 4.0)
66
- rubocop-ast (>= 1.31.1, < 2.0)
63
+ regexp_parser (>= 2.9.3, < 3.0)
64
+ rubocop-ast (>= 1.36.2, < 2.0)
67
65
  ruby-progressbar (~> 1.7)
68
- unicode-display_width (>= 2.4.0, < 3.0)
69
- rubocop-ast (1.32.1)
66
+ unicode-display_width (>= 2.4.0, < 4.0)
67
+ rubocop-ast (1.37.0)
70
68
  parser (>= 3.3.1.0)
71
69
  rubocop-capybara (2.21.0)
72
70
  rubocop (~> 1.41)
@@ -89,7 +87,7 @@ GEM
89
87
  simplecov-cobertura (2.1.0)
90
88
  rexml
91
89
  simplecov (~> 0.19)
92
- simplecov-html (0.12.3)
90
+ simplecov-html (0.13.1)
93
91
  simplecov_json_formatter (0.1.4)
94
92
  solargraph (0.50.0)
95
93
  backport (~> 1.2)
@@ -107,11 +105,12 @@ GEM
107
105
  thor (~> 1.0)
108
106
  tilt (~> 2.0)
109
107
  yard (~> 0.9, >= 0.9.24)
110
- strscan (3.1.0)
111
- thor (1.3.1)
108
+ thor (1.3.2)
112
109
  tilt (2.4.0)
113
- unicode-display_width (2.5.0)
114
- yard (0.9.36)
110
+ unicode-display_width (3.1.2)
111
+ unicode-emoji (~> 4.0, >= 4.0.4)
112
+ unicode-emoji (4.0.4)
113
+ yard (0.9.37)
115
114
 
116
115
  PLATFORMS
117
116
  arm64-darwin-22
@@ -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
@@ -8,11 +8,13 @@ module Metatron
8
8
  include Concerns::Namespaced
9
9
 
10
10
  attr_accessor :type, :selector, :additional_labels, :ports,
11
- :additional_selector_labels, :publish_not_ready_addresses
11
+ :additional_selector_labels, :publish_not_ready_addresses,
12
+ :cluster_ip
12
13
 
13
14
  def initialize(name, port = nil)
14
15
  super(name)
15
16
  @type = "ClusterIP"
17
+ @cluster_ip = nil
16
18
  @selector = base_labels
17
19
  @additional_labels = {}
18
20
  @additional_selector_labels = {}
@@ -30,6 +32,7 @@ module Metatron
30
32
  end
31
33
 
32
34
  alias publishNotReadyAddresses publish_not_ready_addresses
35
+ alias clusterIP cluster_ip
33
36
 
34
37
  def formatted_ports
35
38
  ports&.any? ? { ports: } : {}
@@ -46,8 +49,9 @@ module Metatron
46
49
  spec: {
47
50
  type:,
48
51
  selector: selector.merge(additional_selector_labels),
49
- publishNotReadyAddresses:
50
- }.merge(formatted_ports)
52
+ publishNotReadyAddresses:,
53
+ clusterIP:
54
+ }.compact.merge(formatted_ports)
51
55
  }
52
56
  end
53
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Metatron
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.3"
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"
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.8.0
4
+ version: 0.8.3
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: 2024-08-18 00:00:00.000000000 Z
11
+ date: 2024-12-14 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: []