无法将“linkerd.io/inject: enabled”添加到 ArgoCD 清单 - io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.annotations 的类型无效

Unable to add `linkerd.io/inject: enabled` to ArgoCD manifest - invalid type for io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.annotations

我可以用这个 helm 命令安装 bitnami/redis:

helm upgrade --install "my-release" bitnami/redis \
     --set auth.existingSecret=redis-key \
     --set metrics.enabled=true \
     --set metrics.podAnnotations.release=prom \
     --set master.podAnnotations."linkerd\.io/inject"=enabled \
     --set replica.podAnnotations."linkerd\.io/inject"=enabled

现在我想使用 ArgoCD Manifest 来安装它。

project: default
source:
  repoURL: 'https://charts.bitnami.com/bitnami'
  targetRevision: 14.1.1
  helm:
    valueFiles:
      - values.yaml
    parameters:
      - name: metrics.enabled
        value: 'true'
      - name: metrics.podAnnotations.release
        value: 'prom'
      - name: master.podAnnotations.linkerd.io/inject
        value: enabled
      - name: replica.podAnnotations.linkerd.io/inject
        value: enabled
      - name: auth.existingSecret
        value: redis-key
  chart: redis
destination:
  server: 'https://kubernetes.default.svc'
  namespace: default
syncPolicy: {}

但由于 master.podAnnotations.linkerd.io/injectreplica.podAnnotations.linkerd.io/inject

,我收到验证错误
error validating data: ValidationError(StatefulSet.spec.template.metadata.annotations."linkerd): invalid type for io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.annotations: got "map", expected "string"

error validating data: ValidationError(StatefulSet.spec.template.metadata.annotations."linkerd): invalid type for io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.annotations: got "map", expected "string"


如果我删除这两个注释设置,则可以安装该应用程序。 我已经尝试 master.podAnnotations."linkerd.io\/inject",但它不起作用。我想这与“。”有关。要么 ”/”。谁能帮我解决这个问题?

查看this example,包含点的参数需要转义