How to pass local arguments to "kpt fn render"?

129 views Asked by At

I am trying to parameterize the kpt fn render pipeline.

I know that kpt pkg get automagically creates the package-context.yaml file containing a ConfigMap that in turn contains the name of the local kpt package. That is a good start, but what if I want to add additional local parameters to the pipeline between kpt pkg get and kpt fn render? Are there any best practices for this, or is this considered an anti-pattern for some reason?

Our current approach is to pass the parameters as environment variables, and the first step of the pipeline (a Starlark script) injects a ConfigMap with the parameters into the package. The rest of the pipeline steps refer to the fields of this "parameters" ConfigMap. Is there a better way?

0

There are 0 answers