来自 Azure ACR 的 FluXCD Helm 部署 - 未找到图表名称错误

FluXCD Helm deployment from Azure ACR - no chart name found error

我正在尝试使用 FluxCD 将 Helm 图表部署到 AKS。该图表已使用 Helm cli - “helm push ...”推送到 Azure ACR。该图表在 ACR 中声明为 helm/release-services:0.1.0

我在 Flux 协调后收到以下错误:

'chart pull error: failed to get chart version for remote reference: no chart name found'

helm-controller 日志如下

{"level":"info","ts":"2022-02-07T12:40:18.121Z","logger":"controller.helmrelease","msg":"HelmChart 'flux-system/release-services-test-release-services' is not ready","reconciler group":"helm.toolkit.fluxcd.io","reconciler kind":"HelmRelease","name":"release-services","namespace":"release-services-test"} {"level":"info","ts":"2022-02-07T12:40:18.135Z","logger":"controller.helmrelease","msg":"reconcilation finished in 15.458307ms, next run in 5m0s","reconciler group":"helm.toolkit.fluxcd.io","reconciler kind":"HelmRelease","name":"release-services","namespace":"release-services-test"}

下面是 AKS 中的 HelmChart 资源:

apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmChart
metadata:
  creationTimestamp: "2022-02-07T07:30:16Z"
  finalizers:
  - finalizers.fluxcd.io
  generation: 1
  name: release-services-test-release-services
  namespace: flux-system
  resourceVersion: "105266699"
  selfLink: /apis/source.toolkit.fluxcd.io/v1beta1/namespaces/flux-system/helmcharts/release-services-test-release-services
  uid: e4820a70-8885-44a1-8dfd-0e2bf7256915
spec:
  chart: release-services
  interval: 5m0s
  reconcileStrategy: ChartVersion
  sourceRef:
    kind: HelmRepository
    name: psbombb-helm-acr-dev
  version: '>=0.1.0'
status:
  conditions:
  - lastTransitionTime: "2022-02-07T11:02:49Z"
    message: 'chart pull error: failed to get chart version for remote reference:
      no chart name found'
    reason: ChartPullFailed
    status: "False"
    type: Ready
  observedGeneration: 1

HelmRelease如下

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  creationTimestamp: "2022-02-07T04:34:14Z"
  finalizers:
  - finalizers.fluxcd.io
  generation: 9
  labels:
    kustomize.toolkit.fluxcd.io/name: apps
    kustomize.toolkit.fluxcd.io/namespace: flux-system
  name: release-services
  namespace: release-services-test
  resourceVersion: "105341484"
  selfLink: /apis/helm.toolkit.fluxcd.io/v2beta1/namespaces/release-services-test/helmreleases/release-services
  uid: 6a6e5f5c-951d-4655-9c15-fa9fe7421a04
spec:
  chart:
    spec:
      chart: release-services
      reconcileStrategy: ChartVersion
      sourceRef:
        kind: HelmRepository
        name: psbombb-helm-acr-dev
        namespace: flux-system
      version: '>=0.1.0'
  install:
    remediation:
      retries: 3
  interval: 5m
  releaseName: release-services
  timeout: 12m
  values:
    image:
      name: release-services
      pullPolicy: IfNotPresent
      registry: <repository>.azurecr.io
      repository: <repository>.azurecr.io/helm/release-services
      tag: 0.1.0
    postgres:
      secret:
        create: false
        existingName: release-services-secrets
status:
  conditions:
  - lastTransitionTime: "2022-02-07T08:27:13Z"
    message: HelmChart 'flux-system/release-services-test-release-services' is not
      ready
    reason: ArtifactFailed
    status: "False"
    type: Ready
  failures: 50
  helmChart: flux-system/release-services-test-release-services
  observedGeneration: 9

有没有我遗漏的任何人可以帮我找到的东西?

谢谢你

我认为您的问题是 Azure 容器注册表将 Helm Charts 存储为 OCI 工件。

Flux 源控制器将从 HTTP Helm Chart 存储库中提取 index.yaml 以查找标签,这不适用于 OCI 注册表。

Here 是 GitHub 的问题,你可以看到 Flux 人员将致力于解决这个问题 OCI 功能在 Helm 3.8.0 中是稳定的。