mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-16 16:51:02 +02:00
Tidier templating for environment variables
This commit is contained in:
parent
b7f5ec0e99
commit
56cfe31e88
2 changed files with 6 additions and 16 deletions
|
|
@ -195,7 +195,7 @@
|
|||
variables:: [],
|
||||
|
||||
with_env_var::
|
||||
function(name) self + {
|
||||
function(name, key) self + {
|
||||
variables: super.variables + [name],
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
valueFrom: {
|
||||
secretKeyRef: {
|
||||
name: vars.name,
|
||||
key: x,
|
||||
key: vars.keyMap[x],
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
|
@ -312,23 +312,12 @@
|
|||
name: name,
|
||||
|
||||
variables: [],
|
||||
keyMap: {},
|
||||
|
||||
with_size:: function(size) self + { size: size },
|
||||
|
||||
add:: function() [
|
||||
/*
|
||||
{
|
||||
apiVersion: "v1",
|
||||
kind: "Secret",
|
||||
metadata: {
|
||||
name: volume.name,
|
||||
namespace: "trustgraph",
|
||||
},
|
||||
data: {
|
||||
}
|
||||
},
|
||||
*/
|
||||
],
|
||||
],
|
||||
|
||||
volRef:: function() {
|
||||
name: volume.name,
|
||||
|
|
@ -336,8 +325,9 @@
|
|||
},
|
||||
|
||||
with_env_var::
|
||||
function(name) self + {
|
||||
function(name, key) self + {
|
||||
variables: super.variables + [name],
|
||||
keyMap: super.keyMap + { [name]: key },
|
||||
},
|
||||
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue