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

Kapp deploy with helm chart fetch throws "helm chart pull" error #1584

Open
troll-warlord opened this issue Jul 1, 2024 · 5 comments
Open
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution

Comments

@troll-warlord
Copy link

I am getting helm error on running the command kapp deploy -a metrics-collection -f pasx/package-install-metrics-collection.yaml -y
Here is my package CRD

apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
  name: metrics.azure.io.1.2.0
spec:
  refName: metrics.azure.io
  version: 1.2.0
  releaseNotes: |
    Initial release of the metrics package
  valuesSchema:
    openAPIv3:
      nullable: true
      default: null
  template:
    spec:
      fetch:
      - helmChart:
          name: metrics
          version: 1.2.0
          repository:
            url: oci://<registry-host-name>/apps/
            secretRef:
              name: carvel-pull-secret
        path: metrics
      template:
      - helmTemplate:
          path: metrics/
          name: metrics
          namespace: metrics
      - kbld:
          paths:
          - metrics/.imgpkg/images.yml
          - '-'
      deploy:
      - kapp: {}

Error:

kapp: Error: waiting on reconcile packageinstall/metrics (packaging.carvel.dev/v1alpha1) namespace: default:
  Finished unsuccessfully (Reconcile failed:  (message: vendir: Error: Syncing directory '0':
  Syncing directory '.' with helm chart contents:
    Helm chart pull: exit status 1 (stderr: Error: unknown command "chart" for "helm"
Run 'helm --help' for usage.
)
))

The error is because helm chart pull command was deprecated in helm version 3.7.0 and replaced it with helm pull as per https://github.com/helm/helm/releases/tag/v3.7.0
image

Application versions:

troll-warlord:carvel-demo$ kapp version
kapp version 0.62.1

Succeeded
troll-warlord:carvel-demo$ vendir version
vendir version 0.40.2

Succeeded
troll-warlord:carvel-demo$ kctrl version
kctrl version 0.52.0

Succeeded
troll-warlord:carvel-demo$ ytt version
ytt version 0.49.1
troll-warlord:carvel-demo$ helm version
version.BuildInfo{Version:"v3.14.4", GitCommit:"81c902a123462fd4052bc5e9aa9c513c4c8fc142", GitTreeState:"clean", GoVersion:"go1.21.9"}
@troll-warlord troll-warlord added bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Jul 1, 2024
@carvel-bot carvel-bot added this to Carvel Jul 1, 2024
@praveenrewar
Copy link
Member

You are facing this issue because you are using helm oci chart. The oci feature graduated in v3.8.0 and was experimental before that and we don't support it yet.
You should be able to use imgpkg to fetch it.
cc @joaopapereira

@praveenrewar praveenrewar added discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution and removed bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Jul 5, 2024
@joaopapereira
Copy link
Member

That is true unless the chart retrieves other charts.
Vendir itself will execute helm pull, so I am not 100% sure where this error is coming from.

@praveenrewar
Copy link
Member

Ah, my bad, I didn't notice that we support oci sources as well.

That is true unless the chart retrieves other charts.

@troll-warlord Could you check this?

@troll-warlord
Copy link
Author

I didn't face this issue using vendir sync command for the same chart

@joaopapereira
Copy link
Member

What version of kapp-controller are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution
Projects
Status: No status
Development

No branches or pull requests

3 participants