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

Helm packaging problem #12992

Open
djjudas21 opened this issue Apr 29, 2024 · 6 comments
Open

Helm packaging problem #12992

djjudas21 opened this issue Apr 29, 2024 · 6 comments

Comments

@djjudas21
Copy link

I am working on a Helm chart, and I have added some repositories so I can specify dependencies. helm dep build does the right thing but helm package fails.

My chart.yaml

apiVersion: v2
name: authelia
version: 0.9.0-beta3
kubeVersion: ">= 1.13.0-0"
description: Authelia is a Single Sign-On Multi-Factor portal for web apps
type: application
keywords:
  - SSO
  - Authentication
  - Security
  - Two-Factor
  - YubiKey
  - Webauthn
  - Duo
  - TOTP
  - Time-based One Time Password
  - Push Notifications
  - LDAP
home: https://www.authelia.com
sources:
  - https://github.com/authelia/chartrepo/tree/master/charts/authelia
  - https://www.github.com/authelia/authelia
dependencies:
  - name: postgresql
    version: ~15
    repository: https://charts.bitnami.com/bitnami
    condition: postgresql.enabled
  - name: redis
    version: ~19
    repository: https://charts.bitnami.com/bitnami
    condition: redis.enabled
  - name: mariadb
    condition: mariadb.enabled
    version: ~18
    repository: "https://charts.bitnami.com/bitnami"
maintainers:
  - name: james-d-elliott
    email: [email protected]
    url: https://github.com/james-d-elliott
icon: https://avatars2.githubusercontent.com/u/59122411?s=200&v=4
appVersion: 4.38.8
deprecated: false
annotations: {}

My steps to reproduce:

[jonathan@latitude authelia]$ helm dep build
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "tx-smtp-relay-helm" chart repository
...Successfully got an update from the "immich" chart repository
...Unable to get an update from the "openebs" chart repository (https://openebs.github.io/charts):
	failed to fetch https://openebs.github.io/charts/index.yaml : 404 Not Found
...Successfully got an update from the "awx-operator" chart repository
...Successfully got an update from the "democratic-csi" chart repository
...Successfully got an update from the "camerahub" chart repository
...Successfully got an update from the "node-feature-discovery" chart repository
...Successfully got an update from the "portainer" chart repository
...Successfully got an update from the "actions-runner-controller" chart repository
...Successfully got an update from the "intel" chart repository
...Successfully got an update from the "k8s-home-lab" chart repository
...Successfully got an update from the "beluga-cloud" chart repository
...Successfully got an update from the "runix" chart repository
...Successfully got an update from the "oauth2-proxy" chart repository
...Successfully got an update from the "t3n" chart repository
...Successfully got an update from the "nextcloud" chart repository
...Successfully got an update from the "vmware-tanzu" chart repository
...Successfully got an update from the "rook-release" chart repository
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "vikunja" chart repository
...Successfully got an update from the "authelia" chart repository
...Successfully got an update from the "harbor" chart repository
...Successfully got an update from the "djjudas21" chart repository
...Successfully got an update from the "mattermost" chart repository
...Successfully got an update from the "influxdata" chart repository
...Successfully got an update from the "kasten" chart repository
...Successfully got an update from the "deliveryhero" chart repository
...Successfully got an update from the "sosivio" chart repository
...Successfully got an update from the "ananace-charts" chart repository
...Successfully got an update from the "adfinis" chart repository
...Successfully got an update from the "gabe565" chart repository
...Successfully got an update from the "gitlab" chart repository
...Successfully got an update from the "secureCodeBox" chart repository
...Successfully got an update from the "fairwinds-stable" chart repository
...Successfully got an update from the "grafana" chart repository
...Successfully got an update from the "bitnami" chart repository
...Successfully got an update from the "prometheus-community" chart repository
...Successfully got an update from the "k8s-at-home" chart repository
...Successfully got an update from the "truecharts" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 3 charts
Downloading postgresql from repo https://charts.bitnami.com/bitnami
Downloading redis from repo https://charts.bitnami.com/bitnami
Downloading mariadb from repo https://charts.bitnami.com/bitnami
Deleting outdated charts

[jonathan@latitude authelia]$ ls charts/
mariadb-18.0.2.tgz  postgresql-15.2.5.tgz  redis-19.1.3.tgz

[jonathan@latitude authelia]$ helm package .
Error: found in Chart.yaml, but missing in charts/ directory: postgresql, redis, mariadb

Output of helm version:

version.BuildInfo{Version:"v3.14.4", GitCommit:"81c902a123462fd4052bc5e9aa9c513c4c8fc142", GitTreeState:"clean", GoVersion:"go1.22.2"}

Has also been observed with Helm v3.13.3 and chart-releaser via GitHub Actions, not sure which version.

Output of kubectl version:

Client Version: v1.29.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
MicroK8s

@banjoh
Copy link

banjoh commented May 1, 2024

@djjudas21 I just tried using your Chart.yaml to reproduce this issue but I couldn't. Also, could you please link the github action you saw this behaviour in? There might be some more information there to help reproduce this issue.

@djjudas21
Copy link
Author

Thanks @banjoh. I ran into this when contributing to someone else's chart, and here is the failed pipeline: https://buildkite.com/authelia/charts/builds/529#018ef5e1-c9e9-4073-89f1-4f4cf9bb8ca2

This is the pipeline code in their chart repo: https://github.com/authelia/chartrepo/blob/master/.buildkite/pipeline.yaml

And here's the issue thread where we've been talking about it: authelia/chartrepo#223

@banjoh
Copy link

banjoh commented May 2, 2024

I've only managed to reproduce this issue after cloning https://github.com/authelia/chartrepo and adding your dependencies to the Chart.yaml. It's a valid issue.

[evans] $ helm version
version.BuildInfo{Version:"v3.14.4", GitCommit:"81c902a123462fd4052bc5e9aa9c513c4c8fc142", GitTreeState:"clean", GoVersion:"go1.22.2"}
[evans] $ helm package . --debug
Error: found in Chart.yaml, but missing in charts/ directory: postgresql, redis, mariadb
helm.go:84: [debug] found in Chart.yaml, but missing in charts/ directory: postgresql, redis, mariadb
helm.sh/helm/v3/pkg/action.CheckDependencies
        helm.sh/helm/v3/pkg/action/install.go:709
helm.sh/helm/v3/pkg/action.(*Package).Run
        helm.sh/helm/v3/pkg/action/package.go:77
main.newPackageCmd.func1
        helm.sh/helm/v3/cmd/helm/package.go:103
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/[email protected]/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/[email protected]/command.go:1115
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/[email protected]/command.go:1039
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
        runtime/proc.go:271
runtime.goexit
        runtime/asm_arm64.s:1222

Copying the same Chart.yaml to a different chart e.g one created using helm create foo does not fail as above.

@djjudas21
Copy link
Author

That's so weird. So it somehow depends on something else in the repo?

@banjoh
Copy link

banjoh commented May 3, 2024

That's so weird. So it somehow depends on something else in the repo?

That's how it looks like, though I cannot see what that could be

@scottrigby
Copy link
Member

@djjudas21 it may be worth trying to find the offending file(s) either additively (start with only Chart.yaml which does work, add back one file at a time locally till you see the error again), or through subtraction (test removing files one at a time, see how far you can get still breaking before you only have the Chart.yaml). If you can find that, we'll have a better chance of helping to track down the issue in your chart.

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

No branches or pull requests

3 participants