kpt icon indicating copy to clipboard operation
kpt copied to clipboard

did not find expected node content

Open StarpTech opened this issue 4 years ago • 8 comments

What does the error mean? The repository is public.

kpt pkg get https://github.com/StarpTech/k8s-gitops.git/demo@main helloworld
fetching package /demo from https://github.com/StarpTech/k8s-gitops to helloworld
error: D:\repositories\starptech\helmsphere\helloworld\umbrella-chart\charts\order-service\templates\deployment.yaml: yaml: line 5: did not find expected node content

\umbrella-chart\charts\order-service\templates\deployment.yaml

StarpTech avatar Oct 08 '20 09:10 StarpTech

@StarpTech Thanks for filing the issue. This must be related to parsing template structures in yaml.

phanimarupaka avatar Oct 09 '20 08:10 phanimarupaka

@StarpTech The problem here is that your package contains a Helm chart which has files with .yaml extension, but doesn't actually contain valid yaml. We plan to provide a way to exclude files like this from the parts of kpt that requires yaml files: https://github.com/GoogleContainerTools/kpt/issues/517

mortent avatar Oct 13 '20 20:10 mortent

@mortent I also encountered this issue when trying to vendor a third-party Helm chart. In my case, I actually want to vendor the Helm chart, not ignore it, in order to then use it with kustomize HelmInflator. This seems like a use-case kpt could support, so does it make sense to allow it by relaxing this check in kpt pkg get (maybe with a flag?).

yanniszark avatar Dec 29 '20 15:12 yanniszark

I also encountered this issue when trying out the inflator-helm-chart example (which is not curated). https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/apply-setters/v0.1/examples/contrib/inflate-helm-chart @mengqiy

yuwenma avatar Jul 22 '21 03:07 yuwenma

The inflate-helm-chart examples have been updated. They can be found in https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/contrib/inflate-helm-chart

mengqiy avatar Jul 27 '21 00:07 mengqiy

Has this issue been fixed?

emirot avatar Dec 06 '22 00:12 emirot

I am facing same issue. Is there any fix on this issue in recent versions ?

JagratiS avatar Nov 16 '23 13:11 JagratiS

Also seeing this issue. Improving the error to specify its a possible yaml format issue would be a good first step

daxmc99 avatar Jul 31 '24 00:07 daxmc99