kd icon indicating copy to clipboard operation
kd copied to clipboard

Comment can result in empty deploy "error: no objects passed to apply"

Open lewismarshall opened this issue 6 years ago • 1 comments

When an empty yaml file is loaded - kd will error rather than move on e.g.:

# Some comment
---
yaml_key_start: bob

The template above will result in error:

[ERROR] 2019/01/22 15:02:52 main.go:241: error: no objects passed to apply

lewismarshall avatar Jan 22 '19 15:01 lewismarshall

I'd find it useful if we could add a flag to permit this. As yaml is easier than code, I've got a few yaml files with things like:

---
{{ .if PRODUCTION }}
key: value
{{ end }}
...

These resolve to an empty yaml file so return an error, whereas I'd like them to skip straight over.

zuzak avatar May 12 '21 14:05 zuzak