metatron 0.9.0 → 0.10.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/.github/workflows/ci.yml +0 -31
- data/.github/workflows/release.yml +33 -0
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +5 -5
- data/lib/metatron/template.rb +8 -3
- data/lib/metatron/templates/concerns/pod_producer.rb +5 -4
- data/lib/metatron/templates/daemon_set.rb +1 -1
- data/lib/metatron/templates/deployment.rb +1 -1
- data/lib/metatron/templates/replica_set.rb +1 -1
- data/lib/metatron/templates/stateful_set.rb +1 -1
- data/lib/metatron/version.rb +1 -1
- data/release-please-config.json +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7a6131869b316def00f00a41810b2aa467b4767d1fc360eb74105ce534568e8
|
4
|
+
data.tar.gz: f2d924bbc2240d5c04cde9942fb4907b585fce9434f6185b896dcf86afb3323a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe29d9fc841799ce4805cd31d002c9fa86e0cea5f91e4d8a9544165eb26563a4ec10d6a131434fe3ad54fd4bb1df3625fe6e19ccd1e5e73c66114b38a46209f9
|
7
|
+
data.tar.gz: d0835ea094c3fe4c990d96d711cbc55fcab15b2314008a80a6aec16d76675754425738bbd73744999a304cb7077af424e3d1a024ffadbe818a4f0397a854e535
|
data/.github/workflows/ci.yml
CHANGED
@@ -2,13 +2,6 @@ name: CI
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
pull_request:
|
5
|
-
push:
|
6
|
-
branches: [ "main" ]
|
7
|
-
|
8
|
-
permissions:
|
9
|
-
contents: write
|
10
|
-
pull-requests: write
|
11
|
-
id-token: write
|
12
5
|
|
13
6
|
jobs:
|
14
7
|
lint:
|
@@ -59,27 +52,3 @@ jobs:
|
|
59
52
|
|
60
53
|
- name: Run tests
|
61
54
|
run: bundle exec rake spec
|
62
|
-
|
63
|
-
release:
|
64
|
-
runs-on: ubuntu-latest
|
65
|
-
needs: [ lint, yard, test ]
|
66
|
-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
67
|
-
steps:
|
68
|
-
- uses: googleapis/release-please-action@v4
|
69
|
-
id: release
|
70
|
-
with:
|
71
|
-
# The token to use for authentication
|
72
|
-
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
|
73
|
-
|
74
|
-
- uses: actions/checkout@v4
|
75
|
-
if: ${{ steps.release.outputs.release_created }}
|
76
|
-
- name: Set up Ruby
|
77
|
-
uses: ruby/setup-ruby@v1
|
78
|
-
if: ${{ steps.release.outputs.release_created }}
|
79
|
-
with:
|
80
|
-
bundler-cache: true
|
81
|
-
ruby-version: .ruby-version
|
82
|
-
|
83
|
-
# Release
|
84
|
-
- uses: rubygems/release-gem@v1
|
85
|
-
if: ${{ steps.release.outputs.release_created }}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "main" ]
|
6
|
+
|
7
|
+
permissions:
|
8
|
+
contents: write
|
9
|
+
id-token: write
|
10
|
+
pull-requests: write
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
release:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
|
19
|
+
## Here's the new step for release-please
|
20
|
+
- uses: googleapis/release-please-action@v4
|
21
|
+
id: release
|
22
|
+
with:
|
23
|
+
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
|
24
|
+
|
25
|
+
- name: Set up Ruby
|
26
|
+
uses: ruby/setup-ruby@v1
|
27
|
+
if: ${{ steps.release.outputs.release_created }}
|
28
|
+
with:
|
29
|
+
bundler-cache: true
|
30
|
+
ruby-version: .ruby-version
|
31
|
+
|
32
|
+
- uses: rubygems/release-gem@v1
|
33
|
+
if: ${{ steps.release.outputs.release_created }}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.10.0](https://github.com/jgnagy/metatron/compare/metatron/v0.9.0...metatron/v0.10.0) (2025-03-19)
|
4
|
+
|
5
|
+
|
6
|
+
### ⚠ BREAKING CHANGES
|
7
|
+
|
8
|
+
* **templates:** pod match labels are distinct
|
9
|
+
* **templates:** allow overriding base labels
|
10
|
+
|
11
|
+
### Features
|
12
|
+
|
13
|
+
* **templates:** allow overriding base labels ([ba3d4c2](https://github.com/jgnagy/metatron/commit/ba3d4c2813518a5b9bb845700656b2ce67321369))
|
14
|
+
* **templates:** pod match labels are distinct ([82b59d0](https://github.com/jgnagy/metatron/commit/82b59d0d93cbf1c4423895f20351e2b73d6057e0))
|
15
|
+
|
3
16
|
## [0.9.0](https://github.com/jgnagy/metatron/compare/metatron-v0.8.8...metatron/v0.9.0) (2025-02-17)
|
4
17
|
|
5
18
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metatron (0.
|
4
|
+
metatron (0.10.0)
|
5
5
|
json (~> 2.6)
|
6
6
|
rack (>= 2.2.8, < 4)
|
7
7
|
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
diff-lcs (1.6.0)
|
16
16
|
docile (1.4.1)
|
17
17
|
jaro_winkler (1.6.0)
|
18
|
-
json (2.10.
|
18
|
+
json (2.10.2)
|
19
19
|
kramdown (2.5.1)
|
20
20
|
rexml (>= 3.3.9)
|
21
21
|
kramdown-parser-gfm (1.1.0)
|
@@ -23,9 +23,9 @@ GEM
|
|
23
23
|
language_server-protocol (3.17.0.4)
|
24
24
|
lint_roller (1.1.0)
|
25
25
|
logger (1.6.6)
|
26
|
-
nokogiri (1.18.
|
26
|
+
nokogiri (1.18.3-arm64-darwin)
|
27
27
|
racc (~> 1.4)
|
28
|
-
nokogiri (1.18.
|
28
|
+
nokogiri (1.18.3-x86_64-linux-gnu)
|
29
29
|
racc (~> 1.4)
|
30
30
|
observer (0.1.2)
|
31
31
|
ostruct (0.6.1)
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
ast (~> 2.4.1)
|
35
35
|
racc
|
36
36
|
racc (1.8.1)
|
37
|
-
rack (3.1.
|
37
|
+
rack (3.1.12)
|
38
38
|
rack-test (2.2.0)
|
39
39
|
rack (>= 1.3)
|
40
40
|
rainbow (3.1.1)
|
data/lib/metatron/template.rb
CHANGED
@@ -4,7 +4,8 @@ module Metatron
|
|
4
4
|
# Base class for templating Kubernetes resources
|
5
5
|
class Template
|
6
6
|
attr_accessor :api_version, :name, :additional_labels
|
7
|
-
attr_reader :kind
|
7
|
+
attr_reader :kind
|
8
|
+
attr_writer :base_labels
|
8
9
|
|
9
10
|
class << self
|
10
11
|
attr_writer :label_namespace
|
@@ -38,7 +39,6 @@ module Metatron
|
|
38
39
|
|
39
40
|
def initialize(name)
|
40
41
|
@name = name
|
41
|
-
@label_namespace = self.class.label_namespace
|
42
42
|
@api_version = "v1"
|
43
43
|
@kind = find_kind
|
44
44
|
@additional_labels = {}
|
@@ -47,10 +47,15 @@ module Metatron
|
|
47
47
|
|
48
48
|
alias apiVersion api_version
|
49
49
|
|
50
|
-
def base_labels
|
50
|
+
def base_labels
|
51
|
+
@base_labels || { "#{label_namespace}/name": name }
|
52
|
+
end
|
51
53
|
|
52
54
|
private
|
53
55
|
|
56
|
+
# defers to the nearest metatron ancestor to determine the label namespace
|
57
|
+
def label_namespace = self.class.label_namespace
|
58
|
+
|
54
59
|
def run_initializers
|
55
60
|
self.class.nearest_metatron_ancestor.initializers.each { send(_1.to_sym) }
|
56
61
|
end
|
@@ -9,10 +9,10 @@ module Metatron
|
|
9
9
|
# base.extend ClassMethods
|
10
10
|
base.class_eval do
|
11
11
|
attr_accessor :active_deadline_seconds, :additional_pod_labels,
|
12
|
-
:
|
13
|
-
:dns_policy, :enable_service_links, :hostname, :host_ipc,
|
14
|
-
:host_pid, :image_pull_secrets, :init_containers,
|
15
|
-
:node_name, :persistent_volume_claims, :pod_annotations,
|
12
|
+
:additional_pod_match_labels, :affinity, :automount_service_account_token,
|
13
|
+
:containers, :dns_policy, :enable_service_links, :hostname, :host_ipc,
|
14
|
+
:host_network, :host_pid, :image_pull_secrets, :init_containers,
|
15
|
+
:node_selector, :node_name, :persistent_volume_claims, :pod_annotations,
|
16
16
|
:priority_class_name, :restart_policy, :scheduler_name, :security_context,
|
17
17
|
:service_account, :service_account_name, :share_process_namespace,
|
18
18
|
:subdomain, :termination_grace_period_seconds, :tolerations, :volumes
|
@@ -41,6 +41,7 @@ module Metatron
|
|
41
41
|
|
42
42
|
def pod_producer_initialize
|
43
43
|
@additional_pod_labels = {}
|
44
|
+
@additional_pod_match_labels = {}
|
44
45
|
@affinity = {}
|
45
46
|
@containers = []
|
46
47
|
@enable_service_links = nil
|
@@ -38,7 +38,7 @@ module Metatron
|
|
38
38
|
serviceName:,
|
39
39
|
updateStrategy:,
|
40
40
|
selector: {
|
41
|
-
matchLabels: base_labels.merge(
|
41
|
+
matchLabels: base_labels.merge(additional_pod_match_labels)
|
42
42
|
}
|
43
43
|
}.merge(pod_template).merge(volume_claim_templates).compact
|
44
44
|
}
|
data/lib/metatron/version.rb
CHANGED
data/release-please-config.json
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
"package-name": "metatron",
|
7
7
|
"changelog-path": "CHANGELOG.md",
|
8
8
|
"release-type": "ruby",
|
9
|
-
"bump-minor-pre-major":
|
10
|
-
"bump-patch-for-minor-pre-major":
|
9
|
+
"bump-minor-pre-major": true,
|
10
|
+
"bump-patch-for-minor-pre-major": true,
|
11
11
|
"draft": false,
|
12
12
|
"prerelease": false,
|
13
13
|
"version-file": "lib/metatron/version.rb"
|
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.10.0
|
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-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -220,6 +220,7 @@ extensions: []
|
|
220
220
|
extra_rdoc_files: []
|
221
221
|
files:
|
222
222
|
- ".github/workflows/ci.yml"
|
223
|
+
- ".github/workflows/release.yml"
|
223
224
|
- ".gitignore"
|
224
225
|
- ".release-please-manifest.json"
|
225
226
|
- ".rspec"
|