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

templating is slower when using dependencies with tagged version #13108

Open
Diliz opened this issue Jun 14, 2024 · 2 comments
Open

templating is slower when using dependencies with tagged version #13108

Diliz opened this issue Jun 14, 2024 · 2 comments

Comments

@Diliz
Copy link

Diliz commented Jun 14, 2024

helm version: 3.15.2
kubectl version:

Client Version: v1.26.1
Kustomize Version: v4.5.7

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

Hello there!

Currently using tagged dependencies like the following:

  • mychart:1.0.0
  • mychart:1.0.0+mytag
  • mychart:1.0.0+0.0.0-mytag
  • mychart:1.0.0+0.0.1-mytag

my Chart.yaml have the following dependency:

dependencies:
- name: mychart
  repository: "@myhelmrepository"
  version: 1.0.0+0.0.0-mytag

When I use the helm dependency build command then helm template, it's really slow, I don't know the real reason yet.

My chart uses a lot of templated functions in my case, but here is the difference in templating time:

  • when using mychart:1.0.0: 4s
  • when using 1.0.0+0.0.1-mytag: 1m32.556s (more than 20x the original templating time)

Did you already encountered this one?

@idsulik
Copy link
Contributor

idsulik commented Jun 14, 2024

I couldn't reproduce it, could you please execute the slow command with "--debug" argument?

@Diliz
Copy link
Author

Diliz commented Jun 24, 2024

I found the issue!

I got a .cache folder when I release my helm chart, for unknown reasons, I don't have performances issues with oci packaged charts when I try to template it.

So I did this tests with my chart (which contains a lot of templated functions) as a subchart:

  • template with already builded chart from oci repository -> 1s
  • template with already builded chart from helm repository -> 1m20s
  • template with local chart -> 1s

The culprit was some cache folder present in the tgz from the helm repository only (dunno why, since it should be the exact same thing for the 3 cases I tried, I got a tgz file containing my chart in both of them at the end of the day), so I just added it to the helmignore, and it fixed the issue...

I don't really know how to reproduce this specific case.

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