helmfile: Selector break repository/chart syntax with OCI

Operating system

Ubuntu 20.04

Helmfile Version

0.145.3

Helm Version

3.9.3

Bug description

Sync, Diff, template fonction is break with OCI chart when using --selector.

Helm version : 3.8.0 Helmfile version : 0.144.0 Repository : Azure Container Registry

Here the templating without selector


Logging in to registry
Login Succeeded

Pulled: xxx.azurecr.io/helm/cfg-shared-configs:1.0.0
Digest: sha256:f19d9413523a99b0a1a351999e0b1c6ab8f3729623077a8fee65a2b629ddac1b

Exporting xxx.azurecr.io/helm/cfg-shared-configs:1.0.0
Pulled: xxx.azurecr.io/helm/cfg-shared-configs:1.0.0
Digest: sha256:f19d9413523a99b0a1a351999e0b1c6ab8f3729623077a8fee65a2b629ddac1b

Templating release=cfg-shared-configs, **chart=/tmp/helmfile636816509/cfg-shared-configs/cfg-shared-configs/1.0.0/cfg-shared-configs**
---
# Source: cfg-shared-configs/templates/configmaps.yaml
apiVersion: v1
kind: ConfigMap

...

Here the template with --selector (chart=cfg-shared-configs)

Logging in to registry
Login Succeeded

Pulling xxx.azurecr.io/helm/cfg-shared-configs:1.0.0
Exporting xxx.azurecr.io/helm/cfg-shared-configs:1.0.0
Pulled: xxx.azurecr.io/helm/cfg-shared-configs:1.0.0
Digest: sha256:f19d9413523a99b0a1a351999e0b1c6ab8f3729623077a8fee65a2b629ddac1b

Exporting npd03cacnacrgen.azurecr.io/helm/cfg-shared-configs:1.0.0
Pulled: npd03cacnacrgen.azurecr.io/helm/cfg-shared-configs:1.0.0
Digest: sha256:f19d9413523a99b0a1a351999e0b1c6ab8f3729623077a8fee65a2b629ddac1b

Templating release=cfg-shared-configs, chart=acr/cfg-shared-configs
in ./helmfile.yaml: command "/usr/local/helm/helm" exited with non-zero status:

PATH:
  /usr/local/helm/helm

ARGS:
  0: helm (4 bytes)
  1: template (8 bytes)
  2: cfg-shared-configs (18 bytes)
  3: acr/cfg-shared-configs (22 bytes)
  4: --version (9 bytes)
  5: 1.0.0 (5 bytes)
  6: --namespace (11 bytes)
  7: perf3 (5 bytes)
  8: --values (8 bytes)
  9: /tmp/helmfile639927867/perf3-cfg-shared-configs-values-b68dc94b7 (64 bytes)
  10: --timeout=30m0s (15 bytes)

ERROR:
  exit status 1

EXIT STATUS
  1

STDERR:
  Error: failed to download "acr/cfg-shared-configs" at version "1.0.0"

COMBINED OUTPUT:
  Error: failed to download "acr/cfg-shared-configs" at version "1.0.0"

Example helmfile.yaml

Helmfile.yaml:

repositories:
  - name: acr
    oci: true
    url: {{ requiredEnv "ACR_URL" | quote }}
    username: {{ requiredEnv "ACR_USER" | quote }}
    password: {{ requiredEnv "ACR_PASSWORD" | quote }}

bases:
  # Tools releases template
  - releases/tool-release.gotmpl

tool-release.gotmpl:

# configmap Release Templating

releases:
{{- if hasKey .Environment.Values "configmap" }}

# Loop on configmap dictionary to prepare release for each of the configmap-* charts
{{ range $chart, $params := .Environment.Values.configmap }}

  - name: {{ $chart }}
  
    chart: acr/{{ $chart }}

    labels:
      chart: {{ $chart }}
{{- end }}
{{- end }}

Error message you’ve seen (if any)

STDERR: Error: failed to download “acr/cfg-shared-configs” at version “1.0.0”

COMBINED OUTPUT: Error: failed to download “acr/cfg-shared-configs” at version “1.0.0”

Steps to reproduce

Private repository

Working Helmfile Version

No one

Relevant discussion

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 24 (11 by maintainers)

Most upvoted comments

@retraut @tgaudillat02 ok. I will do it. Thanks very much.