kube_cluster 1.6.0 → 1.7.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 +13 -0
- data/Gemfile.lock +1 -1
- data/lib/kube/cluster/standard/env_processing.rb +26 -1
- data/lib/kube/cluster/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c57aae5fbe1903b9bc6bd63073ed4dd9d5731102b524077c4969051593b84b86
|
|
4
|
+
data.tar.gz: 19a1be373f25d1faee87bf83072c45987ecac39cc384c932168e4afefc42a7ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db92c45266952b68584a01029cd2502caa5ab1ea2e9d010e91bf70b9385227578378d36be82c3c83eb3cf3966b04b2547732d63bd706555cd3fef6e14c28c869
|
|
7
|
+
data.tar.gz: a53b5a9d8165400643e0693259940f5cf2695d97afd12a258e20dc7ecbd9bfd04aed135803e1d402ec2c3215bb5e17e64d98da8725cb45175a3d208b08c419b1
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.7.0] - 2026-09-17
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `Standard::EnvProcessing` now maps `ESO::ExternalSecret::KeyRef` (the struct
|
|
12
|
+
returned by `ExternalSecret#key`) to a `secretKeyRef` env var, mirroring the
|
|
13
|
+
support `VolumeProcessing` has always had. Unlike `.template`, `.key`
|
|
14
|
+
registers nothing on the ExternalSecret — it references a key the secret
|
|
15
|
+
already materialises (declared via `keys:` at construction, or by a
|
|
16
|
+
`.template` call elsewhere). This makes `Custom::PassboltSecret`-style
|
|
17
|
+
secrets — whose template is fully built at construction — usable from env
|
|
18
|
+
hashes, where previously the only option was a raw `valueFrom` hash or a
|
|
19
|
+
whole-secret `envFrom`.
|
|
20
|
+
|
|
8
21
|
## [1.6.0] - 2026-08-03
|
|
9
22
|
|
|
10
23
|
### Added
|
data/Gemfile.lock
CHANGED
|
@@ -22,6 +22,14 @@ module Kube
|
|
|
22
22
|
# "FOO" => Secret.new(name: "creds").key("bar")
|
|
23
23
|
# => { name: "FOO", valueFrom: { secretKeyRef: { name: "creds", key: "bar" } } }
|
|
24
24
|
#
|
|
25
|
+
# ExternalSecret::KeyRef values reference a key the ExternalSecret
|
|
26
|
+
# already materialises (declared via keys: at construction, or by a
|
|
27
|
+
# .template call elsewhere) -- unlike .template, .key registers
|
|
28
|
+
# NOTHING on the ExternalSecret. Reference a key that never lands in
|
|
29
|
+
# the target Secret and the pod sits in CreateContainerConfigError.
|
|
30
|
+
# "FOO" => ExternalSecret::Creds.key("bar")
|
|
31
|
+
# => { name: "FOO", valueFrom: { secretKeyRef: { name: "creds", key: "bar" } } }
|
|
32
|
+
#
|
|
25
33
|
def self.process(env)
|
|
26
34
|
return env if env.is_a?(Array)
|
|
27
35
|
return [] if env.nil?
|
|
@@ -33,7 +41,7 @@ module Kube
|
|
|
33
41
|
when ESO::ExternalSecret::TemplateRef
|
|
34
42
|
value.secret.register_template!(key, value.template_value)
|
|
35
43
|
{ name: key, valueFrom: { secretKeyRef: { name: value.secret.secret_name, key: key } } }
|
|
36
|
-
when Kube::Cluster::Standard::Secret::KeyRef
|
|
44
|
+
when ESO::ExternalSecret::KeyRef, Kube::Cluster::Standard::Secret::KeyRef
|
|
37
45
|
{ name: key, valueFrom: { secretKeyRef: { name: value.secret.secret_name, key: value.key_name } } }
|
|
38
46
|
else
|
|
39
47
|
{ name: key, value: value.to_s }
|
|
@@ -58,6 +66,23 @@ describe "EnvProcessing" do
|
|
|
58
66
|
]
|
|
59
67
|
end
|
|
60
68
|
|
|
69
|
+
it "maps an ExternalSecret::KeyRef to a secretKeyRef env var without registering anything" do
|
|
70
|
+
secret = Kube::Cluster::Standard::ESO::ExternalSecret.new(
|
|
71
|
+
name: "svix-jwt", store: "passbolt", remote_key: "svix-jwt",
|
|
72
|
+
keys: { "SVIX_JWT_SECRET" => "SVIX_JWT_SECRET" }
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
Kube::Cluster::Standard::EnvProcessing
|
|
76
|
+
.process("SVIX_JWT_SECRET" => secret.key("SVIX_JWT_SECRET"))
|
|
77
|
+
.should == [
|
|
78
|
+
{ name: "SVIX_JWT_SECRET", valueFrom: { secretKeyRef: { name: "svix-jwt", key: "SVIX_JWT_SECRET" } } }
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
# Unlike .template, .key must not touch the ExternalSecret's spec.
|
|
82
|
+
secret.to_h.dig(:spec, :target, :template).should.be.nil
|
|
83
|
+
secret.to_h.dig(:spec, :data).length.should == 1
|
|
84
|
+
end
|
|
85
|
+
|
|
61
86
|
it "still maps plain string values to value env vars" do
|
|
62
87
|
Kube::Cluster::Standard::EnvProcessing
|
|
63
88
|
.process("FOO" => "bar")
|
data/lib/kube/cluster/version.rb
CHANGED