Expected behavior
Actual behavior
- got errors due to crd not installed
- example error message:
error: resource mapping not found for name: "apply-setters-simple" namespace: "" from "STDIN": no matches for kind "Kptfile" in version "kpt.dev/v1" ensure CRDs are installed first
Information
kpt version: 1.0.0-beta.19
example : Kpt Package that can demonstrate the error. (https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters-simple@apply-setters/v0.2.0)
The cause of this is not working is that kpt fn render -o unwrap now output Kptfile and configMap files defined ini Kptfile, those are not recognized by k8s cluster. Although, we can create .krmignore to exclude Kptfile in output, but this trick cannot be used to configMap files defined in Kptfile, as that would cause dataMap being ignored by krm functions as well.
Before certain version, those stuff are not included in the output from kpt fn render -o unwrap, reverting the behavior will probably introduce another breaking change, but could you add a flag to control the output not including Kptfile and congiMap files?
Steps to reproduce the behavior
- run
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters-simple@apply-setters/v0.2.0 with the latest kpt
- then in
apply-setters-simple folder, run kpt fn render -o unwrap | kubectl apply -f -
Expected behavior
kpt fn render -o unwrap | kubectl apply -f -, according to https://kpt.dev/reference/cli/fn/render/?id=examples I'd expect the command succeeds.Actual behavior
error: resource mapping not found for name: "apply-setters-simple" namespace: "" from "STDIN": no matches for kind "Kptfile" in version "kpt.dev/v1" ensure CRDs are installed firstInformation
kpt version: 1.0.0-beta.19
example : Kpt Package that can demonstrate the error. (https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters-simple@apply-setters/v0.2.0)
The cause of this is not working is that
kpt fn render -o unwrapnow outputKptfileandconfigMap filesdefined ini Kptfile, those are not recognized by k8s cluster. Although, we can create.krmignoreto exclude Kptfile in output, but this trick cannot be used to configMap files defined in Kptfile, as that would cause dataMap being ignored by krm functions as well.Before certain version, those stuff are not included in the output from
kpt fn render -o unwrap, reverting the behavior will probably introduce another breaking change, but could you add a flag to control the output not including Kptfile and congiMap files?Steps to reproduce the behavior
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters-simple@apply-setters/v0.2.0with the latest kptapply-setters-simplefolder, runkpt fn render -o unwrap | kubectl apply -f -