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
fatal: [localhost]: FAILED! => {
"msg": "kustomize command failed with: # Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.\n# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.\n"
}
Stepping through the code, it looks like the deprecation warnings are present in stderr, and the plugin simply looks for the presence of the error without any additional nuance. I confirmed that out in this case actually contains the manifest that I'm looking for.
I think my expectation here would be to delegate to the user whether or not to treat deprecation warnings as errors maybe with a switch, with a stricter default of True, but at least that would give me a path to ignoring these.
This is something that should ultimately be addressed at the kubectl/kustomize level. I would be hesitant to start parsing the output of kustomize to figure out what's an error and what's a warning. A quick search through the kustomize code shows deprecation messages don't follow a standard format. The work being done in https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/3104-introduce-kuberc would likely offer a way to suppress warnings.
We can keep this open and consider it, but I'm inclined to see whether KEP 3104 offers a better solution. As a workaround you could use errors='ignore' or errors='warn'.
SUMMARY
Kustomize Version: 5.1.0
I'm attempting to use the kustomize plugin to render a manifest and getting the following error:
Error output:
Stepping through the code, it looks like the deprecation warnings are present in
stderr
, and the plugin simply looks for the presence of the error without any additional nuance. I confirmed thatout
in this case actually contains the manifest that I'm looking for.I think my expectation here would be to delegate to the user whether or not to treat deprecation warnings as errors maybe with a switch, with a stricter default of
True
, but at least that would give me a path to ignoring these.ISSUE TYPE
COMPONENT NAME
Kustomize lookup plugin
ANSIBLE VERSION
COLLECTION VERSION
Affected collection version: 2.4.0
I'm also seeing this on
main
.CONFIGURATION
OS / ENVIRONMENT
Arch Linux
STEPS TO REPRODUCE
metallb/
EXPECTED RESULTS
Expecting to have the contents of the manifest in the manifest var.
ACTUAL RESULTS
Error seen in summary
The text was updated successfully, but these errors were encountered: