You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Helm安装argocd-apps时出现ObjectMeta.metadata.name类型错误的问题求助

使用Helm安装argocd-apps时出现ObjectMeta.metadata.name类型错误的问题求助

大家好,最近我在用Helm安装argocd-apps的时候遇到了一个类型错误,折腾了好一会儿没找到根源,特意来求助社区的大佬们。

我执行的安装命令是这样的:

➜  infra git:(main) ✗ helm secrets -n argocd upgrade --install \
    argocd-apps \
    argo/argocd-apps \
    -f values/argocd-apps.yaml

结果直接报错了,输出如下:

[helm-secrets] Decrypt skipped: values/argocd-apps.yaml
Release "argocd-apps" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: unable to decode "": json: cannot unmarshal number into Go struct field ObjectMeta.metadata.name of type string
Error: plugin "secrets" exited with error

看到错误提示是ObjectMeta.metadata.name的类型不匹配(数字转字符串失败),我就用helm template命令生成了实际的Manifest文件,想看看具体哪里出了问题:

➜  infra git:(main) ✗ helm secrets -n argocd template \
    argocd-apps \
    argo/argocd-apps \
    -f values/argocd-apps.yaml

结果生成的YAML里,Application的name字段居然是数字0:

---
# Source: argocd-apps/templates/applications.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: 0
  namespace: argocd

这显然是有问题的啊,Kubernetes资源的name必须是字符串类型,不能是纯数字。我怀疑是不是自己的values/argocd-apps.yaml配置写错了,但目前还没定位到具体哪里错了。有没有朋友遇到过类似的情况?或者能给我指个方向,我应该去检查values文件里的哪些配置项?

备注:内容来源于stack exchange,提问作者Oleg

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 09:04:28