tazjin/kontemplate

Kubectl errors not revealed by kontemplate apply

jsierles opened this issue · 3 comments

A deployment silently failed to apply with kontemplate. When using kubectl on the rendered template, I see:

error: error validating "dep.yml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

Is it possible to see kubectl errors with the kontemplate command?

Hey,

this sounds like a bug - kubectl output should be printed by kontemplate and non-zero exit codes should cause it to stop. I'll take a look :)

@jsierles Can you tell me what version of kontemplate and kubectl you run? If you run this template with kubectl directly, does it exit with a non-zero error code?

I've tested a few scenarios and I can't find one where an error from kubectl "slips through the tracks". Are you running on a non-standard platform (Windows, some BSD, etc.)?

I haven't been able to reproduce this and there's been no further activity on the thread, so I'm closing it.