<p>头盔安装/升级不支持在设置标志中使用逗号</p>

创建于 2017-09-20  ·  4评论  ·  资料来源: helm/helm

helm cli似乎不支持在set标志中包含用于安装或升级的逗号值。

$ helm install --set greeting='hello, world' .
Error: failed parsing --set data: key " world" has no value

如果解析器在值中发现逗号,则它似乎正在尝试寻找其他键。 我尝试了几种引用或转义策略,但似乎都存在相同的问题。

$ helm install --set greeting="hello, world" .
Error: failed parsing --set data: key " world" has no value
$ helm install --set "greeting=hello, world" .
Error: failed parsing --set data: key " world" has no value
$ helm install --set greeting=hello,\ world .
Error: failed parsing --set data: key " world" has no value

解决方法是使用值文件而不是set标志,但是对于我的将配置文件传递到configmap的用例,分别管理配置文件并将其放入set标志比将它们存储在其中更容易,更清洁。 yaml包装器或动态构建该包装器。

questiosupport

最有用的评论

\,对我来说很好用。

><> helm template chart/draftd/ --set image.tag="hello\, world" | grep hello
        image: "microsoft/draft:hello, world"

所有4条评论

\,对我来说很好用。

><> helm template chart/draftd/ --set image.tag="hello\, world" | grep hello
        image: "microsoft/draft:hello, world"

https://docs.helm.sh/using_helm/#the -format-and-limitations-of-set下的文档中对此进行了说明,因此我已解决此问题。 如果该修复不适用于您,请重新打开。 谢谢!

嗯,我本可以发誓要尝试转义逗号,但是我只检查了2.4.0版,它对所有版本都有效。 我显然是误会了,我的错。

如果有人像我一样通过Google遇到此问题,则到​​Helm 2中--set的文档更新链接为: https: //v2.helm.sh/docs/using_helm/#the -format-and设置限制

此页面是否有帮助?
0 / 5 - 0 等级