-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
when encountering a malformed kustomization.yaml file which is due to poor definition, kustomize will silently create an empty yaml file instead of reporting an error:
(note the two spaces at the beginning of the yaml file!)
✗ head infrastructure/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
(... snipped ...)
✗ kustomize build infrastructure -o test.yaml
✗ ls -l test.yaml
-rw-r--r-- 1 gilbahat staff 0 Nov 10 14:06 test.yaml
this is unlike other error modes which output usable error messages and do not generate an empty yaml file, e.g.:
✗ kustomize build infrastructure -o test.yaml
Error: accumulating resources: accumulation err='accumulating resources from (... snipped ...)
✗ ls -l test.yaml
ls: test.yaml: No such file or directory