Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an OCI repo to repositories breaks if helmfile.lock is present #2075

Open
denist-huma opened this issue Feb 2, 2022 · 4 comments
Open

Comments

@denist-huma
Copy link

denist-huma commented Feb 2, 2022

Reproduce

Start with a hemlfile.yaml

repositories:
  - name: jetstack
    url: https://charts.jetstack.io

releases:
  - name: cert-manager
    namespace: cert-manager
    chart: jetstack/cert-manager
    version: v1.6.1
    wait: true
    timeout: 300
    atomic: true
    cleanupOnFail: true
    createNamespace: true
    set:
      # for GKE also need a firewall rule https://cert-manager.io/docs/installation/compatibility/
      - name: webhook.securePort
        value: 8443
      - name: installCRDs
        value: true

run helmfile deps, helmfile.lock would be like:

version: v0.143.0
dependencies:
- name: cert-manager
  repository: https://charts.jetstack.io
  version: v1.6.1
digest: sha256:42efdf240ca1f4a8d19e8566204dcd50af1532e1e6b0fc9985ba59a00eee2593
generated: "2022-02-02T17:04:31.604181725+03:00"

Adding an OCI repo to repositories

repositories:
  - name: huma
    url: ghcr.io/huma-engineering/helm-charts
    oci: true
  - name: jetstack
    url: https://charts.jetstack.io

releases:
  - name: cert-manager
    namespace: cert-manager
    chart: jetstack/cert-manager
    version: v1.6.1
    wait: true
    timeout: 300
    atomic: true
    cleanupOnFail: true
    createNamespace: true
    set:
      # for GKE also need a firewall rule https://cert-manager.io/docs/installation/compatibility/
      - name: webhook.securePort
        value: 8443
      - name: installCRDs
        value: true

  - name: compose-operator
    namespace: compose-operator
    # chart: ../charts/compose-operator
    chart: huma/compose-operator
    version: 0.39.0

Try to get template:

$ helmfile template
Adding repo jetstack https://charts.jetstack.io
"jetstack" has been added to your repositories

in ./helmfile.yaml: [no resolved dependency found for "compose-operator", running "helmfile deps" may resolve the issue]

run helmfile deps, helmfile.lock would not change.

$ helmfile deps
Adding repo jetstack https://charts.jetstack.io
"jetstack" has been added to your repositories

Pulling ghcr.io/huma-engineering/helm-charts/compose-operator:0.39.0
Exporting ghcr.io/huma-engineering/helm-charts/compose-operator:0.39.0
Pulled: ghcr.io/huma-engineering/helm-charts/compose-operator:0.39.0
Digest: sha256:59632103db46727136a1cd08388cced3ee802e596f1d119a2b2bd6318b93fa06

Exporting ghcr.io/huma-engineering/helm-charts/compose-operator:0.39.0
Pulled: ghcr.io/huma-engineering/helm-charts/compose-operator:0.39.0
Digest: sha256:59632103db46727136a1cd08388cced3ee802e596f1d119a2b2bd6318b93fa06

Updating dependency /tmp/helmfile2282725958/compose-operator/compose-operator/compose-operator/0.39.0/compose-operator
Updating dependency /tmp/2481716747
Hang tight while we grab the latest from your chart repositories...

...Successfully got an update from the "jetstack" chart repository

Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading cert-manager from repo https://charts.jetstack.io
Deleting outdated charts

End result is like in this gist

I am stuck in a loop.
helmfile deps don't change the .lock, template is asking to read from lock.

@denist-huma
Copy link
Author

I got problem with the OCI repo only, and I got a workaround for my case: to delete the existing helmfile.lock.

@day1118
Copy link

day1118 commented Dec 12, 2022

Are there plans to resolve this and improve the OCI support so the lock file does not have to be removed manually?

@yxxhero
Copy link
Contributor

yxxhero commented Dec 12, 2022

@day1118 please see: #2148

@day1118
Copy link

day1118 commented Dec 13, 2022

@day1118 please see: #2148

I don't know how I missed that, thanks @yxxhero !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants