Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty YAML manifests #178

viglesiasce opened this issue Jul 18, 2018 · 1 comment

Handle empty YAML manifests #178

viglesiasce opened this issue Jul 18, 2018 · 1 comment


Copy link

@viglesiasce viglesiasce commented Jul 18, 2018

When using helm template to generate your base resources, there may be times when a resource is empty due to the way templating works in upstream charts. We should ignore empty manifests. Here is an example:

# Only a comment exists in this block
apiVersion: extensions/v1beta1
kind: Deployment
  name: ci-jenkins
        - name: ci-jenkins
          image: jenkins/jenkins:lts

The error returned is:

$  kustomize buildError: loadResMapFromBasesAndResources: rawResources failed to read Resources: YAML file [/home/viglesias/git/kustomize-jenkins/charts/stable/my-jenkins/jenkins-base.yaml] encounters a format error.
error unmarshaling JSON: Object 'Kind' is missing in 'null'

For a example:

git clone
cd charts
helm template stable/jenkins
Copy link

@zabio3 zabio3 commented Jul 25, 2018

I was on the same problem.
The problem was solved by deleting "---" unique to yaml. (Perhaps it seems that json parsing can not be done if there is "---".)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants