mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-19 18:21:03 +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:: [],
|
variables:: [],
|
||||||
|
|
||||||
with_env_var::
|
with_env_var::
|
||||||
function(name) self + {
|
function(name, key) self + {
|
||||||
variables: super.variables + [name],
|
variables: super.variables + [name],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
valueFrom: {
|
valueFrom: {
|
||||||
secretKeyRef: {
|
secretKeyRef: {
|
||||||
name: vars.name,
|
name: vars.name,
|
||||||
key: x,
|
key: vars.keyMap[x],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
@ -312,23 +312,12 @@
|
||||||
name: name,
|
name: name,
|
||||||
|
|
||||||
variables: [],
|
variables: [],
|
||||||
|
keyMap: {},
|
||||||
|
|
||||||
with_size:: function(size) self + { size: size },
|
with_size:: function(size) self + { size: size },
|
||||||
|
|
||||||
add:: function() [
|
add:: function() [
|
||||||
/*
|
],
|
||||||
{
|
|
||||||
apiVersion: "v1",
|
|
||||||
kind: "Secret",
|
|
||||||
metadata: {
|
|
||||||
name: volume.name,
|
|
||||||
namespace: "trustgraph",
|
|
||||||
},
|
|
||||||
data: {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
],
|
|
||||||
|
|
||||||
volRef:: function() {
|
volRef:: function() {
|
||||||
name: volume.name,
|
name: volume.name,
|
||||||
|
|
@ -336,8 +325,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
with_env_var::
|
with_env_var::
|
||||||
function(name) self + {
|
function(name, key) self + {
|
||||||
variables: super.variables + [name],
|
variables: super.variables + [name],
|
||||||
|
keyMap: super.keyMap + { [name]: key },
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue