carvel-dev / carvel-dev/kapp-controller
Kapp deploy with helm chart fetch throws "helm chart pull" error
- Dominant language
- Go
- Stars
- 323
- Forks
- 127
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 6
Description
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
```yaml
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:///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

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"}
```
Contributor guide
Research direction
Start from the helmChart fetch path used during PackageInstall reconciliation and inspect how vendir invokes Helm for the reported OCI repository. Reproduce with Helm v3.14.4 and the versions listed in the issue; done means the chart fetch and kapp deploy succeed without the "unknown command chart" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100