mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-20 18:51:03 +02:00
Mapping secret to envs looks correct
This commit is contained in:
parent
a880ca23a5
commit
b7f5ec0e99
1 changed files with 9 additions and 19 deletions
|
|
@ -25,15 +25,6 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
with_environment_valueFrom:: function(x) self + {
|
|
||||||
environment: super.environment + [
|
|
||||||
{
|
|
||||||
name: v.key, value: v.value
|
|
||||||
}
|
|
||||||
for v in std.objectKeysValues(x)
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
with_limits:: function(c, m) self + { limits: { cpu: c, memory: m } },
|
with_limits:: function(c, m) self + { limits: { cpu: c, memory: m } },
|
||||||
|
|
||||||
with_reservations::
|
with_reservations::
|
||||||
|
|
@ -57,18 +48,17 @@
|
||||||
with_env_var_secrets::
|
with_env_var_secrets::
|
||||||
function(vars)
|
function(vars)
|
||||||
std.foldl(
|
std.foldl(
|
||||||
function(obj, x) obj + obj.with_environment_valueFrom(
|
function(obj, x) obj + {
|
||||||
{
|
environment: super.environment + [{
|
||||||
[x]: {
|
name: x,
|
||||||
valueFrom: {
|
valueFrom: {
|
||||||
secretKeyRef: {
|
secretKeyRef: {
|
||||||
name: vars.name,
|
name: vars.name,
|
||||||
key: x,
|
key: x,
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
),
|
},
|
||||||
vars.variables,
|
vars.variables,
|
||||||
self
|
self
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue