kube_cluster 1.0.0 → 1.1.0
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/CHANGELOG.md +16 -0
- data/Gemfile.lock +3 -1
- data/kube_cluster.gemspec +1 -0
- data/lefthook.yml +9 -0
- data/lib/kube/cluster/standard/cdi/data_volume.rb +20 -19
- data/lib/kube/cluster/standard.rb +13 -0
- data/lib/kube/cluster/version.rb +1 -1
- data/lib/kube/cluster.rb +8 -4
- metadata +17 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5439cb8e1c5dcc7f1cb319b5523241aaa2a2fbc94e52e03e3316a7c383f435fd
|
|
4
|
+
data.tar.gz: 8052cb7358d8b8846d3503dcc586c36b1dae29cc5ab8d4638bcbaf83de29b9a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f11d2e8c01f906b1b1f7999db505c3791fcf91496890c3b8a39d1f9660ea04d3d26812942a479a51572f3c27aff1ec8db22e92fe2c059aba5bb7787c8c410cd2
|
|
7
|
+
data.tar.gz: f39b6d6878548cdea033d94978f487777b8f7537807e0884463df15d7edf2c47ba472556bff0ac245b1ed547e10ffa6eb88347528609039cd0af454f1177afd4
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.0] - 2026-07-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `Standard::CDI::DataVolume` — a thin CDI `DataVolume` wrapper (was stubbed
|
|
12
|
+
out), pinned to `cdi.kubevirt.io/v1beta1/DataVolume` in the resolve table.
|
|
13
|
+
- lefthook `pre-commit` hook that runs the full test suite (`bin/test`) before
|
|
14
|
+
every commit; add `lefthook` as a development dependency.
|
|
15
|
+
|
|
16
|
+
## [1.0.1] - 2026-07-13
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- `require "kube/cluster/standard"` — an aggregator that loads the entire
|
|
20
|
+
Standard tree at once, for projects that use most of it. The tree remains
|
|
21
|
+
opt-in (`require "kube/cluster"` alone does not load it), so resolve overrides
|
|
22
|
+
still take effect. The core auto-require now also skips this aggregator file.
|
|
23
|
+
|
|
8
24
|
## [1.0.0] - 2026-07-13
|
|
9
25
|
|
|
10
26
|
### Added
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
kube_cluster (1.
|
|
4
|
+
kube_cluster (1.1.0)
|
|
5
5
|
activesupport (~> 8.0)
|
|
6
6
|
kube_kubectl (~> 2.0)
|
|
7
7
|
kube_schema (~> 1.9.2)
|
|
@@ -135,6 +135,7 @@ GEM
|
|
|
135
135
|
kube_schema (1.9.2)
|
|
136
136
|
json_schemer (~> 2.5.0)
|
|
137
137
|
rubyshell (~> 1.5.0)
|
|
138
|
+
lefthook (2.1.10)
|
|
138
139
|
localhost (1.8.0)
|
|
139
140
|
bake
|
|
140
141
|
logger (1.7.0)
|
|
@@ -257,6 +258,7 @@ DEPENDENCIES
|
|
|
257
258
|
bake-modernize
|
|
258
259
|
bake-releases
|
|
259
260
|
kube_cluster!
|
|
261
|
+
lefthook (~> 2.1)
|
|
260
262
|
rake (~> 13.0)
|
|
261
263
|
scampi (~> 1.0)
|
|
262
264
|
utopia-project
|
data/kube_cluster.gemspec
CHANGED
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
|
|
31
31
|
spec.add_development_dependency "rake", "~> 13.0"
|
|
32
32
|
spec.add_development_dependency "scampi", "~> 1.0"
|
|
33
|
+
spec.add_development_dependency "lefthook", "~> 2.1"
|
|
33
34
|
|
|
34
35
|
spec.add_dependency "kube_schema", "~> 1.9.2"
|
|
35
36
|
spec.add_dependency "kube_kubectl", "~> 2.0"
|
data/lefthook.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Git hooks (managed by lefthook). Install with `bundle exec lefthook install`.
|
|
2
|
+
#
|
|
3
|
+
# Run the full test suite before every commit; a failing test blocks the
|
|
4
|
+
# commit. Wrapped in `nix develop --command` because the hook fires outside the
|
|
5
|
+
# flake devshell, so bundler/scampi wouldn't otherwise be on PATH.
|
|
6
|
+
pre-commit:
|
|
7
|
+
commands:
|
|
8
|
+
tests:
|
|
9
|
+
run: nix develop --command bin/test
|
|
@@ -7,14 +7,14 @@ module Kube
|
|
|
7
7
|
module Cluster
|
|
8
8
|
module Standard
|
|
9
9
|
module CDI
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
class DataVolume < Kube::Cluster['DataVolume']
|
|
11
|
+
def initialize(name:, &block)
|
|
12
|
+
super() {
|
|
13
|
+
metadata.name = name
|
|
14
|
+
instance_exec(&block) if block
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -22,14 +22,15 @@ end
|
|
|
22
22
|
|
|
23
23
|
__END__
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
describe "CDI::DataVolume" do
|
|
26
|
+
it "initializes without error" do
|
|
27
|
+
Kube::Cluster::Standard::CDI::DataVolume
|
|
28
|
+
.new(name: "my-example-volume") {
|
|
29
|
+
spec.source.blank = {}
|
|
30
|
+
spec.storage.resources = { requests: { storage: "1Gi" } }
|
|
31
|
+
}
|
|
32
|
+
.to_yaml
|
|
33
|
+
.is_a?(String)
|
|
34
|
+
.should == true
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# Opt-in loader for the whole Standard tree.
|
|
4
|
+
#
|
|
5
|
+
# `require "kube/cluster"` deliberately does NOT auto-load the Standard classes
|
|
6
|
+
# (so resolve overrides can be configured before they bind their superclasses).
|
|
7
|
+
# Requiring this file pulls in every Standard class at once — the convenient
|
|
8
|
+
# "give me all of them" entry point for projects that use most of the tree.
|
|
9
|
+
require "kube/cluster"
|
|
10
|
+
|
|
11
|
+
Dir.glob("#{__dir__}/standard/**/*.rb").sort.each do |path|
|
|
12
|
+
require path
|
|
13
|
+
end
|
data/lib/kube/cluster/version.rb
CHANGED
data/lib/kube/cluster.rb
CHANGED
|
@@ -117,6 +117,9 @@ Kube::Cluster.config do
|
|
|
117
117
|
# KubeVirt.
|
|
118
118
|
resolve "VirtualMachine", to: "kubevirt.io/v1/VirtualMachine"
|
|
119
119
|
|
|
120
|
+
# CDI (Containerized Data Importer).
|
|
121
|
+
resolve "DataVolume", to: "cdi.kubevirt.io/v1beta1/DataVolume"
|
|
122
|
+
|
|
120
123
|
# k3s HelmChart.
|
|
121
124
|
resolve "HelmChart", to: "helm.cattle.io/v1/HelmChart"
|
|
122
125
|
|
|
@@ -142,11 +145,12 @@ Kube::Cluster.config do
|
|
|
142
145
|
resolve "PersesGlobalDatasource", to: "perses.dev/v1alpha2/PersesGlobalDatasource"
|
|
143
146
|
end
|
|
144
147
|
|
|
145
|
-
|
|
148
|
+
standard_root = "#{__dir__}/cluster/standard"
|
|
146
149
|
Dir.glob("#{__dir__}/cluster/**/*.rb").sort.each do |path|
|
|
147
|
-
# The standard/ tree is opt-in
|
|
148
|
-
#
|
|
149
|
-
|
|
150
|
+
# The standard/ tree is opt-in — via `require "kube/cluster/standard"` or a
|
|
151
|
+
# specific class — so that resolve overrides can be configured beforehand.
|
|
152
|
+
# Skip both the tree and its aggregator loader (cluster/standard.rb).
|
|
153
|
+
next if path == "#{standard_root}.rb" || path.start_with?("#{standard_root}/")
|
|
150
154
|
|
|
151
155
|
require path
|
|
152
156
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kube_cluster
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan K
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '1.0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: lefthook
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '2.1'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '2.1'
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
55
|
name: kube_schema
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -173,6 +187,7 @@ files:
|
|
|
173
187
|
- guides/middleware/readme.md
|
|
174
188
|
- guides/resources/readme.md
|
|
175
189
|
- kube_cluster.gemspec
|
|
190
|
+
- lefthook.yml
|
|
176
191
|
- lib/kube/cli/cluster.rb
|
|
177
192
|
- lib/kube/cluster.rb
|
|
178
193
|
- lib/kube/cluster/connection.rb
|
|
@@ -198,6 +213,7 @@ files:
|
|
|
198
213
|
- lib/kube/cluster/resource/extensions/custom_resource_definition.rb
|
|
199
214
|
- lib/kube/cluster/resource/persistence.rb
|
|
200
215
|
- lib/kube/cluster/script_command.rb
|
|
216
|
+
- lib/kube/cluster/standard.rb
|
|
201
217
|
- lib/kube/cluster/standard/cdi/data_volume.rb
|
|
202
218
|
- lib/kube/cluster/standard/cloud_native_pg/cluster.rb
|
|
203
219
|
- lib/kube/cluster/standard/cloud_native_pg/database_with_external_secret.rb
|