score-spec / score-k8s

A reference Score implementation that targets Kubernetes
https://score.dev/
Apache License 2.0
18 stars 8 forks source link

Add templating support to cmd provisioner #26

Closed maxstepanov closed 2 weeks ago

maxstepanov commented 2 weeks ago

Here is my attempt at implementing templating support for cmd provisioner.

cmd provisioner arguments can now use the same templating facilities as template provider. This is very useful in constructing arguments.

Let me know what you think!

astromechza commented 2 weeks ago

@maxstepanov interesting idea, can you explain more about the need here?

The cmd provisioner itself could perform the same templating since all inputs are passed to it.

maxstepanov commented 2 weeks ago

@astromechza to be honest, i didn't see that there is json input in stdin. The only advantage this PR has over stdin json is it can be used directly in the body of the cmd provisioner arguments instead of parsing it in from stdin. I guess this can be closed then

astromechza commented 2 weeks ago

I think also for the security concern of changing what binary and arguments are called, it's not great. Best to leave the templating up to the process execution itself.