You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@next
cd wordpress
kpt fn render
kpt fn eval --image gcr.io/kpt-fn/set-namespace:v0.1 -- namespace=wordpress
git diff
Two issues:
Why is set-namespace changing the formatting?
More importantly: This is a general issue that can happen with arbitrary functions. The current answer is that you should run render after eval. But then, why not just have eval perform formatting as well as a convenience?
The text was updated successfully, but these errors were encountered:
@mengqiy@droot I think we should have consistent usage of kyaml all across the functions. This is not just a problem with formatting but results in general.
This doesn't justify formatting resources by default as part of eval command as eval can be invoked on validation functions like kubeval, seeing formatting related diffs for invoking validator functions is scary.
But you can have a pipeline with just a validator and render would format?
Not all functions are or will be using Go or kyaml, so the general question about formatting by eval is orthogonal.
Agree. So how about formatting resources as part of eval command as with clear messaging. In the following example, search(without replace) is formatting resources with clear messaging.
$ kpt fn eval --image gcr.io/kpt-fn/search-replace:v0.1 -- by-value=4
[RUNNING] "gcr.io/kpt-fn/search-replace:v0.1"
[PASS] "gcr.io/kpt-fn/search-replace:v0.1"
Results:
[INFO] Matched field value to "4" in file "resources.yaml" in field "spec.replicas"
[INFO] Formatted resources.
Two issues:
set-namespace
changing the formatting?render
aftereval
. But then, why not just haveeval
perform formatting as well as a convenience?The text was updated successfully, but these errors were encountered: