我正在使用 Helm 3 和 microk8s。当我尝试空运行时:
microk8s.helm install <...> --dry-run --debug
我看到像这样的错误
Error: YAML parse error on ./templates/deployment.yaml: error converting YAML to JSON: yaml: mapping values are not allowed in this context
helm.go:76: [debug] error converting YAML to JSON: yaml: mapping values are not allowed in this context
YAML parse error on ./templates/deployment.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
/home/circleci/helm.sh/helm/pkg/releaseutil/manifest_sorter.go:129
helm.sh/helm/v3/pkg/releaseutil.SortManifests
/home/circleci/helm.sh/helm/pkg/releaseutil/manifest_sorter.go:98
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
/home/circleci/helm.sh/helm/pkg/action/install.go:455
helm.sh/helm/v3/pkg/action.(*Install).Run
/home/circleci/helm.sh/helm/pkg/action/install.go:214
main.runInstall
...
我发现了几个有类似错误的问题,但答案通常只是要求阅读图表代码。我有一个大图表,需要自己调试这个错误。并且猜测它抱怨哪条线似乎没有意义。
有没有办法知道配置中到底出了什么问题?