How to solve Error: YAML to JSON: yaml: line 118: did not find expected key
How to solve Error: YAML to JSON: yaml: line 118: did not find expected key
开始使用 helm chart 部署节点。我正在尝试使用 makefile
进行一些 helm 部署,其中 upgrade
归因于 helm upgrade $(name) . --namespace name
。所以我 运行 make upgrade
我得到了一个错误,如图所示:
walk.go:74: found symbolic link in path: /Users/samuelarogbonlo/Desktop/mina/helm/generic-node/Makefile resolves to /Users/samuelarogbonlo/Desktop/mina/helm/common/Makefile
Error: UPGRADE FAILED: YAML parse error on generic-node/templates/generic-node.yaml: error converting YAML to JSON: yaml: line 118: did not find expected key
make: *** [upgrade] Error 1
我试图删除 | quote
但它并没有改变这种情况,我猜测它与括号有关但所有尝试都失败了。
我渲染的 yaml 文件如下所示:
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: source-libp2p-keys
key: key
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: source-libp2p-keys
key: "some-libp2p-key"
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: private-keys
key: key
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: private-keys
key: ""
Error: YAML parse error on generic-node/templates/generic-node.yaml: error converting YAML to JSON: yaml: line 118: did not find expected key
helm.go:88: [debug] error converting YAML to JSON: yaml: line 118: did not find expected key
YAML parse error on generic-node/templates/generic-node.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
我真的需要帮助解决这个问题,因为即使我的 values.yaml
文件也引用了 graphql
的值。
谢谢。
错误在这里:
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: source-libp2p-keys
key: "some-libp2p-key"
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: private-keys
key: key
第 - name SECRET_USERNAME
行缩进了 space 太多。和前面的- name: SECRET_PASSWORD
.
一样缩进
开始使用 helm chart 部署节点。我正在尝试使用 makefile
进行一些 helm 部署,其中 upgrade
归因于 helm upgrade $(name) . --namespace name
。所以我 运行 make upgrade
我得到了一个错误,如图所示:
walk.go:74: found symbolic link in path: /Users/samuelarogbonlo/Desktop/mina/helm/generic-node/Makefile resolves to /Users/samuelarogbonlo/Desktop/mina/helm/common/Makefile
Error: UPGRADE FAILED: YAML parse error on generic-node/templates/generic-node.yaml: error converting YAML to JSON: yaml: line 118: did not find expected key
make: *** [upgrade] Error 1
我试图删除 | quote
但它并没有改变这种情况,我猜测它与括号有关但所有尝试都失败了。
我渲染的 yaml 文件如下所示:
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: source-libp2p-keys
key: key
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: source-libp2p-keys
key: "some-libp2p-key"
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: private-keys
key: key
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: private-keys
key: ""
Error: YAML parse error on generic-node/templates/generic-node.yaml: error converting YAML to JSON: yaml: line 118: did not find expected key
helm.go:88: [debug] error converting YAML to JSON: yaml: line 118: did not find expected key
YAML parse error on generic-node/templates/generic-node.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
我真的需要帮助解决这个问题,因为即使我的 values.yaml
文件也引用了 graphql
的值。
谢谢。
错误在这里:
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: source-libp2p-keys
key: "some-libp2p-key"
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: private-keys
key: key
第 - name SECRET_USERNAME
行缩进了 space 太多。和前面的- name: SECRET_PASSWORD
.