ArgoCD Helm 图表 - 无法访问存储库

ArgoCD Helm chart - Repository not accessible

我正在尝试将 helm chart (https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) 添加到 ArgoCD。

当我这样做时,出现以下错误:

Unable to save changes: application spec is invalid: InvalidSpecError: repository not accessible: repository not found

你们能帮帮我吗?我觉得我做的一切都是对的,但似乎有些地方不对...

这是项目 yaml。

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: prom-oper
  namespace: argocd
spec:
  project: prom-oper

  source:
    repoURL: https://prometheus-community.github.io/helm-charts
    targetRevision: "13.2.1"
    path: prometheus-community/kube-prometheus-stack

    helm:
      # Release name override (defaults to application name)
      releaseName: prom-oper
      version: v3
      values: |
        ... redacted

    directory:
      recurse: false


  destination:
    server: https://kubernetes.default.svc
    namespace: prom-oper

  syncPolicy:
    automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field.
      prune: false # Specifies if resources should be pruned during auto-syncing ( false by default ).
      selfHeal: false # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ).
      allowEmpty: false # Allows deleting all application resources during automatic syncing ( false by default ).
    syncOptions:     # Sync options which modifies sync behavior
    - CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.
    # The retry feature is available since v1.7
    retry:
      limit: 5 # number of failed sync attempt retries; unlimited number of attempts if less than 0
      backoff:
        duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")
        factor: 2 # a factor to multiply the base duration after each failed retry
        maxDuration: 3m # the maximum amount of time allowed for the backoff strategy

还有我添加 helm 存储库的 configmap

apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
  name: argocd-cm
  namespace: argocd
data:
  admin.enabled: "false"
  repositories: |
    - type: helm
      url: https://prometheus-community.github.io/helm-charts
      name: prometheus-community

您收到此错误的原因是应用程序的定义方式,Argo 认为它是 Git 存储库而不是 Helm。

用“图表”定义源对象 属性 而不是像这样的“路径”:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: prom-oper
  namespace: argocd
spec:
  project: prom-oper

  source:
    repoURL: https://prometheus-community.github.io/helm-charts
    targetRevision: "13.2.1"
    chart: kube-prometheus-stack

你可以在Argo的应用中看到它在line 128上的定义-crd.yaml