metatron 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +24 -19
- data/lib/metatron/templates/persistent_volume_claim.rb +30 -2
- 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: 391fa61dd0511b360cf7a0327d6b5de19d9094908349feb79804ef2695db0950
|
4
|
+
data.tar.gz: 1db1d4a4590db27056933cb052445f2fecb4a856d024e0df8322e7379e3414ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 305f8fd71865860a6f85e21c79f0f6426bcb0cf260e63483d09c192a326de713db53f1da8a64728c336627ea239d6cb55c25272f56ca44785ed48d1c7300a6d9
|
7
|
+
data.tar.gz: effcc2c4603ead394a4a816412cf0460ff9c52a21621987492b17433e239fb8f695e014b252a463f32cecd41d76f5d6cb112bbbd32417ab93aaad5e7c971a148
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metatron (0.8.
|
4
|
+
metatron (0.8.8)
|
5
5
|
json (~> 2.6)
|
6
6
|
rack (>= 2.2.8, < 4)
|
7
7
|
|
@@ -14,38 +14,41 @@ GEM
|
|
14
14
|
byebug (11.1.3)
|
15
15
|
diff-lcs (1.5.1)
|
16
16
|
docile (1.4.1)
|
17
|
-
e2mmap (0.1.0)
|
18
17
|
jaro_winkler (1.6.0)
|
19
|
-
json (2.
|
18
|
+
json (2.10.1)
|
20
19
|
kramdown (2.5.1)
|
21
20
|
rexml (>= 3.3.9)
|
22
21
|
kramdown-parser-gfm (1.1.0)
|
23
22
|
kramdown (~> 2.0)
|
24
|
-
language_server-protocol (3.17.0.
|
25
|
-
|
23
|
+
language_server-protocol (3.17.0.4)
|
24
|
+
logger (1.6.5)
|
25
|
+
nokogiri (1.18.2-arm64-darwin)
|
26
26
|
racc (~> 1.4)
|
27
|
-
nokogiri (1.18.
|
27
|
+
nokogiri (1.18.2-x86_64-linux-gnu)
|
28
28
|
racc (~> 1.4)
|
29
|
+
observer (0.1.2)
|
30
|
+
ostruct (0.6.1)
|
29
31
|
parallel (1.26.3)
|
30
|
-
parser (3.3.7.
|
32
|
+
parser (3.3.7.1)
|
31
33
|
ast (~> 2.4.1)
|
32
34
|
racc
|
33
35
|
racc (1.8.1)
|
34
|
-
rack (3.1.
|
36
|
+
rack (3.1.10)
|
35
37
|
rack-test (2.2.0)
|
36
38
|
rack (>= 1.3)
|
37
39
|
rainbow (3.1.1)
|
38
40
|
rake (12.3.3)
|
39
|
-
rbs (
|
41
|
+
rbs (3.8.1)
|
42
|
+
logger
|
40
43
|
regexp_parser (2.10.0)
|
41
|
-
reverse_markdown (
|
44
|
+
reverse_markdown (3.0.0)
|
42
45
|
nokogiri
|
43
46
|
rexml (3.4.0)
|
44
47
|
rspec (3.13.0)
|
45
48
|
rspec-core (~> 3.13.0)
|
46
49
|
rspec-expectations (~> 3.13.0)
|
47
50
|
rspec-mocks (~> 3.13.0)
|
48
|
-
rspec-core (3.13.
|
51
|
+
rspec-core (3.13.3)
|
49
52
|
rspec-support (~> 3.13.0)
|
50
53
|
rspec-expectations (3.13.3)
|
51
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -54,17 +57,17 @@ GEM
|
|
54
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
58
|
rspec-support (~> 3.13.0)
|
56
59
|
rspec-support (3.13.2)
|
57
|
-
rubocop (1.
|
60
|
+
rubocop (1.71.2)
|
58
61
|
json (~> 2.3)
|
59
62
|
language_server-protocol (>= 3.17.0)
|
60
63
|
parallel (~> 1.10)
|
61
64
|
parser (>= 3.3.0.2)
|
62
65
|
rainbow (>= 2.2.2, < 4.0)
|
63
66
|
regexp_parser (>= 2.9.3, < 3.0)
|
64
|
-
rubocop-ast (>= 1.
|
67
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
65
68
|
ruby-progressbar (~> 1.7)
|
66
69
|
unicode-display_width (>= 2.4.0, < 4.0)
|
67
|
-
rubocop-ast (1.
|
70
|
+
rubocop-ast (1.38.0)
|
68
71
|
parser (>= 3.3.1.0)
|
69
72
|
rubocop-capybara (2.21.0)
|
70
73
|
rubocop (~> 1.41)
|
@@ -89,18 +92,20 @@ GEM
|
|
89
92
|
simplecov (~> 0.19)
|
90
93
|
simplecov-html (0.13.1)
|
91
94
|
simplecov_json_formatter (0.1.4)
|
92
|
-
solargraph (0.
|
95
|
+
solargraph (0.51.2)
|
93
96
|
backport (~> 1.2)
|
94
97
|
benchmark
|
95
98
|
bundler (~> 2.0)
|
96
99
|
diff-lcs (~> 1.4)
|
97
|
-
|
98
|
-
jaro_winkler (~> 1.5)
|
100
|
+
jaro_winkler (~> 1.6)
|
99
101
|
kramdown (~> 2.3)
|
100
102
|
kramdown-parser-gfm (~> 1.1)
|
103
|
+
logger (~> 1.6)
|
104
|
+
observer (~> 0.1)
|
105
|
+
ostruct (~> 0.6)
|
101
106
|
parser (~> 3.0)
|
102
|
-
rbs (~>
|
103
|
-
reverse_markdown (
|
107
|
+
rbs (~> 3.0)
|
108
|
+
reverse_markdown (>= 2.0, < 4)
|
104
109
|
rubocop (~> 1.38)
|
105
110
|
thor (~> 1.0)
|
106
111
|
tilt (~> 2.0)
|
@@ -7,10 +7,13 @@ module Metatron
|
|
7
7
|
include Concerns::Annotated
|
8
8
|
include Concerns::Namespaced
|
9
9
|
|
10
|
-
attr_accessor :additional_labels, :
|
10
|
+
attr_accessor :additional_labels, :data_source, :data_source_ref, :storage_class,
|
11
|
+
:access_modes, :storage
|
11
12
|
|
12
13
|
alias storageClassName storage_class
|
13
14
|
alias accessModes access_modes
|
15
|
+
alias dataSource data_source
|
16
|
+
alias dataSourceRef data_source_ref
|
14
17
|
|
15
18
|
def initialize(
|
16
19
|
name,
|
@@ -22,6 +25,7 @@ module Metatron
|
|
22
25
|
@storage_class = storage_class
|
23
26
|
@access_modes = access_modes
|
24
27
|
@storage = storage
|
28
|
+
@data_source = {}
|
25
29
|
@additional_labels = {}
|
26
30
|
end
|
27
31
|
|
@@ -41,9 +45,33 @@ module Metatron
|
|
41
45
|
storage:
|
42
46
|
}
|
43
47
|
}
|
44
|
-
}
|
48
|
+
}.merge(formatted_data_source).merge(formatted_data_source_ref)
|
45
49
|
}
|
46
50
|
end
|
51
|
+
|
52
|
+
def formatted_data_source
|
53
|
+
return {} unless data_source && !data_source.empty?
|
54
|
+
raise "dataSource must be a Hash" unless data_source.is_a?(Hash)
|
55
|
+
|
56
|
+
valid_keys = %i[apiGroup kind name]
|
57
|
+
unless data_source.keys.all? { valid_keys.include?(_1.to_sym) }
|
58
|
+
raise "dataSource may contain only the keys: #{valid_keys.join(", ")}"
|
59
|
+
end
|
60
|
+
|
61
|
+
{ dataSource: data_source.transform_keys(&:to_sym) }
|
62
|
+
end
|
63
|
+
|
64
|
+
def formatted_data_source_ref
|
65
|
+
return {} unless data_source_ref && !data_source_ref.empty?
|
66
|
+
raise "dataSourceRef must be a Hash" unless data_source_ref.is_a?(Hash)
|
67
|
+
|
68
|
+
valid_keys = %i[apiGroup kind name namespace]
|
69
|
+
unless data_source_ref.keys.all? { valid_keys.include?(_1.to_sym) }
|
70
|
+
raise "dataSourceRef may contain only the keys: #{valid_keys.join(", ")}"
|
71
|
+
end
|
72
|
+
|
73
|
+
{ dataSourceRef: data_source_ref.transform_keys(&:to_sym) }
|
74
|
+
end
|
47
75
|
end
|
48
76
|
end
|
49
77
|
end
|
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.8.
|
4
|
+
version: 0.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Gnagy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|