valuesFromFile:
chartFileRef:
myScript: path/to/file.js
externalSourceRef:
defaultScript: https://raw.githubusercontent.com/cdenneen/example/master/script.js
result in equivalent of:
helm install --set-file key=path/to/file.js
values.yaml
myScript: |
const { events, Job } = require("brigadier")
function run(e, project) {
console.log("this is my script")
}
events.on("run", run)
defaultScript: |
const { events, Job } = require("brigadier")
function run(e, project) {
console.log("hello default script")
}
events.on("run", run)
I see, the aim is to put a file content into a subkey of values, rather than expecting a whole values file. Seems reasonable to me.
I think this can be done backward-compatibly by adding a valuesKey field to externalSourceRef, secretKeyRef, chartFileRef, configMapKeyRef (in the cases of secretKeyRef and configMapKeyRef, there is already a field key, so the new field cannot have that name).
So for backward-compatibly, this would look like this if I understand properly :
valuesFromFile:
chartFileRef:
valuesKey: myscript
path: path/to/file.js
externalSourceRef:
valuesKey: defaultScript
url: https://raw.githubusercontent.com/cdenneen/example/master/script.js
If so, then I can have a look, this is something I'd like to have available to only store externally the values and not the whole yaml structure key: value
Most helpful comment
I see, the aim is to put a file content into a subkey of values, rather than expecting a whole values file. Seems reasonable to me.
I think this can be done backward-compatibly by adding a
valuesKeyfield toexternalSourceRef,secretKeyRef,chartFileRef,configMapKeyRef(in the cases ofsecretKeyRefandconfigMapKeyRef, there is already a fieldkey, so the new field cannot have that name).