metatron 0.11.3 → 0.11.4
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/.release-please-manifest.json +1 -1
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +5 -5
- data/README.md +1 -1
- data/lib/metatron/templates/horizontal_pod_autoscaler.rb +43 -0
- data/lib/metatron/version.rb +1 -1
- data/lib/metatron.rb +1 -0
- data/metatron.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ee5149b290884a4e26b48f5763caa5149aaca435edd53245654236a2f5e91f6
|
|
4
|
+
data.tar.gz: 57ed2e8b0a9f7dc41f72b62ff61dec3018332bc5659a5e0a57df6160ac1e6b22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee27cb05a60efb40c4f677b90715bdb2825ae673f9d656e7857c544d2271a8130243d16172acb4992519adcbeb4006eac86a95a252e25b435080be0087e3f2a5
|
|
7
|
+
data.tar.gz: fdd97067b1e3c0a97e8aef6d8a702bcacfab1fff7a5d8113fe5bcc3e7e9c1903112445c11678d6fc4f07efd3d0bdffa2ba42ee7f151ae0517ef45db7fa5aaecc
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.3.
|
|
1
|
+
3.3.11
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.4](https://github.com/jgnagy/metatron/compare/metatron/v0.11.3...metatron/v0.11.4) (2026-07-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add HorizontalPodAutoscaler template ([5999ba9](https://github.com/jgnagy/metatron/commit/5999ba94f02ec4e2861bcef696bed7fa44748b9d))
|
|
9
|
+
* add HorizontalPodAutoscaler template (closes [#31](https://github.com/jgnagy/metatron/issues/31)) ([a828211](https://github.com/jgnagy/metatron/commit/a828211a21b5b1230fefe21472fda5b00c3f0a34))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* raise minimum Ruby version to 3.3 (EOL cleanup) ([3c1a94f](https://github.com/jgnagy/metatron/commit/3c1a94f77d5641239d370e9a1e5390077ebe8e90))
|
|
15
|
+
* raise minimum Ruby version to 3.3 (EOL cleanup) ([9b01b86](https://github.com/jgnagy/metatron/commit/9b01b86dbca32e4c412e9ac753907cc7c026731f))
|
|
16
|
+
|
|
3
17
|
## [0.11.3](https://github.com/jgnagy/metatron/compare/metatron/v0.11.2...metatron/v0.11.3) (2026-02-27)
|
|
4
18
|
|
|
5
19
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
metatron (0.11.
|
|
4
|
+
metatron (0.11.4)
|
|
5
5
|
base64
|
|
6
6
|
json (~> 2.6)
|
|
7
7
|
rack (>= 2.2.8, < 4)
|
|
@@ -25,9 +25,9 @@ GEM
|
|
|
25
25
|
language_server-protocol (3.17.0.4)
|
|
26
26
|
lint_roller (1.1.0)
|
|
27
27
|
logger (1.6.6)
|
|
28
|
-
nokogiri (1.
|
|
28
|
+
nokogiri (1.19.4-arm64-darwin)
|
|
29
29
|
racc (~> 1.4)
|
|
30
|
-
nokogiri (1.
|
|
30
|
+
nokogiri (1.19.4-x86_64-linux-gnu)
|
|
31
31
|
racc (~> 1.4)
|
|
32
32
|
observer (0.1.2)
|
|
33
33
|
ostruct (0.6.1)
|
|
@@ -36,7 +36,7 @@ GEM
|
|
|
36
36
|
ast (~> 2.4.1)
|
|
37
37
|
racc
|
|
38
38
|
racc (1.8.1)
|
|
39
|
-
rack (3.1.
|
|
39
|
+
rack (3.1.21)
|
|
40
40
|
rack-test (2.2.0)
|
|
41
41
|
rack (>= 1.3)
|
|
42
42
|
rainbow (3.1.1)
|
|
@@ -120,7 +120,7 @@ GEM
|
|
|
120
120
|
unicode-display_width (3.1.4)
|
|
121
121
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
122
122
|
unicode-emoji (4.0.4)
|
|
123
|
-
yard (0.9.
|
|
123
|
+
yard (0.9.44)
|
|
124
124
|
|
|
125
125
|
PLATFORMS
|
|
126
126
|
arm64-darwin-22
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Metatron is a Ruby library for creating [Metacontroller](https://metacontroller.github.io/metacontroller/)-based custom Kubernetes controllers.
|
|
4
4
|
|
|
5
|
-
The intention is to make it as easy as possible to use Ruby to manage [custom resources](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) within your Kubernetes infrastructure. No Golang required! Use simple, Rack-based controllers to provide the logic for your custom resources. Metatron templates provide
|
|
5
|
+
The intention is to make it as easy as possible to use Ruby to manage [custom resources](https://kubernetes.io/docs/concepts/api-extension/custom-resources/) within your Kubernetes infrastructure. No Golang required! Use simple, Rack-based controllers to provide the logic for your custom resources. Metatron templates provide most Kubernetes boilerplate code for you, so you can focus on the logic that enables your custom resources to do what you need them to do.
|
|
6
6
|
|
|
7
7
|
For more information, see the [Metatron Wiki on GitHub](https://github.com/jgnagy/metatron/wiki)!
|
|
8
8
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metatron
|
|
4
|
+
module Templates
|
|
5
|
+
# Template for HorizontalPodAutoscaler v2 k8s resource
|
|
6
|
+
class HorizontalPodAutoscaler < Template
|
|
7
|
+
include Concerns::Annotated
|
|
8
|
+
include Concerns::Namespaced
|
|
9
|
+
|
|
10
|
+
attr_accessor :min_replicas, :max_replicas, :scale_target_ref, :metrics, :behavior
|
|
11
|
+
|
|
12
|
+
alias minReplicas min_replicas
|
|
13
|
+
alias maxReplicas max_replicas
|
|
14
|
+
alias scaleTargetRef scale_target_ref
|
|
15
|
+
|
|
16
|
+
def initialize(name)
|
|
17
|
+
super
|
|
18
|
+
@api_version = "autoscaling/v2"
|
|
19
|
+
@min_replicas = nil
|
|
20
|
+
@max_replicas = 1
|
|
21
|
+
@scale_target_ref = { apiVersion: "apps/v1", kind: "Deployment", name: name }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def render
|
|
25
|
+
{
|
|
26
|
+
apiVersion:,
|
|
27
|
+
kind:,
|
|
28
|
+
metadata: {
|
|
29
|
+
name:,
|
|
30
|
+
labels: base_labels.merge(additional_labels)
|
|
31
|
+
}.merge(formatted_annotations).merge(formatted_namespace),
|
|
32
|
+
spec: {
|
|
33
|
+
scaleTargetRef:,
|
|
34
|
+
minReplicas:,
|
|
35
|
+
maxReplicas:,
|
|
36
|
+
metrics:,
|
|
37
|
+
behavior:
|
|
38
|
+
}.compact
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
data/lib/metatron/version.rb
CHANGED
data/lib/metatron.rb
CHANGED
|
@@ -39,6 +39,7 @@ require "metatron/templates/gateway/listener"
|
|
|
39
39
|
require "metatron/templates/grpc_route"
|
|
40
40
|
require "metatron/templates/grpc_route/rule"
|
|
41
41
|
require "metatron/templates/grpc_route/filter"
|
|
42
|
+
require "metatron/templates/horizontal_pod_autoscaler"
|
|
42
43
|
require "metatron/templates/http_route"
|
|
43
44
|
require "metatron/templates/http_route/rule"
|
|
44
45
|
require "metatron/templates/http_route/filter"
|
data/metatron.gemspec
CHANGED
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
26
26
|
spec.require_paths = ["lib"]
|
|
27
27
|
|
|
28
|
-
spec.required_ruby_version = "
|
|
28
|
+
spec.required_ruby_version = ">= 3.3"
|
|
29
29
|
|
|
30
30
|
spec.add_dependency "base64"
|
|
31
31
|
spec.add_dependency "json", "~> 2.6"
|
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.11.
|
|
4
|
+
version: 0.11.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Gnagy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -271,6 +271,7 @@ files:
|
|
|
271
271
|
- lib/metatron/templates/grpc_route.rb
|
|
272
272
|
- lib/metatron/templates/grpc_route/filter.rb
|
|
273
273
|
- lib/metatron/templates/grpc_route/rule.rb
|
|
274
|
+
- lib/metatron/templates/horizontal_pod_autoscaler.rb
|
|
274
275
|
- lib/metatron/templates/http_route.rb
|
|
275
276
|
- lib/metatron/templates/http_route/filter.rb
|
|
276
277
|
- lib/metatron/templates/http_route/rule.rb
|
|
@@ -314,9 +315,9 @@ require_paths:
|
|
|
314
315
|
- lib
|
|
315
316
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
316
317
|
requirements:
|
|
317
|
-
- - "
|
|
318
|
+
- - ">="
|
|
318
319
|
- !ruby/object:Gem::Version
|
|
319
|
-
version: '3.
|
|
320
|
+
version: '3.3'
|
|
320
321
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
322
|
requirements:
|
|
322
323
|
- - ">="
|