vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.
Apache License 2.0
727 stars 62 forks source link

validate if name is set #272

Closed theSuess closed 5 years ago

theSuess commented 5 years ago

This change simply checks if the name of the object is set. Without this check, the validation succeeds on typos like this:

    metadata: { labels+: {"foo":"bar"}}

but will panic while updating with the following error, making it especially hard to debug:

panic: interface conversion: runtime.Object is *unstructured.UnstructuredList, not *unstructured.Unstructured