如何解决此HELM错误&Quot;Error:Upgrade Failed:验证&Quot;&&Quot;:验证数据&Quot;时出错? [英] How to solve this helm error "Error: UPGRADE FAILED: error validating "": error validating data"?
本文介绍了如何解决此HELM错误&Quot;Error:Upgrade Failed:验证&Quot;&&Quot;:验证数据&Quot;时出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.initContainers[1]): unknown field "mountPath" in io.k8s.api.core.v1.Container
make: *** [upgrade] Error 1
FWIW,下面是initcontainer spec
详细信息:
spec:
initContainers:
{{- if .Values.libp2p.staticKeypair.enabled}}
- name: libp2p-init-my-service
image: busybox:1.28
command: ['sh', '-c', '/bin/cp /libp2p-keys/* /root/libp2p-keys && /bin/chmod -R 0700 /root/libp2p-keys/']
volumeMounts:
- mountPath: /libp2p-keys
name: source-libp2p-keys
- mountPath: /root/libp2p-keys
name: destination-libp2p
{{- end }}
- name: config-dir
mountPath: /root/.mina-config
- name: fix-perms
image: busybox:1.28
command: [ 'sh', '-c', 'for dir in keys echo-keys faucet-keys; do [ -d /$dir ] && /bin/cp /$dir/* /wallet-keys; done; /bin/chmod 0700 /wallet-keys']
volumeMounts:
- mountPath: "/keys/"
name: private-keys
readOnly: true
- mountPath: /wallet-keys
name: wallet-keys
containers:
可能的原因是什么,我如何处理它们?
推荐答案
您正在使用Yaml,因此请注意缩进,因为它非常重要。
由于您声明了initContainers
,因此在第一个级别上定义了Containers
;但是在该级别上包含了以下内容:
- name: config-dir
mountPath: /root/.mina-config
因为name
实际上是Container
的属性,所以它会抱怨mountPath
。
我不知道您要将.mina-config
装载到哪里,但它应该嵌套在Container
内的volumeMounts
属性中,并且不在与容器相同的级别。
这篇关于如何解决此HELM错误&Quot;Error:Upgrade Failed:验证&Quot;&&Quot;:验证数据&Quot;时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文