Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require CloudInit .spec.contents to be valid YAML
The Elemental cloud-init executor will fail in disastrous ways instead of just discarding the document if the document's contents are not YAML. However, it does ignore instructions that it doesn't understand if the document is valid YAML. So, require that the CloudInit resource's .spec.contents are valid YAML. Ideally we could use the yip package to parse and perform semantic analysis on the document as a richer form of validation here, but that package does not expose a way of reading those diagnostics. In client code, it only logs what the errors are (in fact, the function signature doesn't return an error.) Some future work upstream in that package could be beneficial here to create an API such that the yip package can return errors to its caller instead of simply logging them. Signed-off-by: Connor Kuehl <[email protected]>
- Loading branch information