-
Notifications
You must be signed in to change notification settings - Fork 523
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: Update chart's on-disk dependencies (k8s:helm-dependency-update) #2110
Comments
Did you run |
No. As I mentioned, if I run it before I install from The doc at https://www.eclipse.org/jkube/docs/kubernetes-maven-plugin/#jkube:helm does not mention to run Additionally, the Helm archive generated by JKube is not correct and that one can not be updated (only unpacked charts can be updated) |
@jmesnil : I did not understand this comment correctly.
I tried doing
I'm using Helm v3.10.3 . Which version of helm are you using? |
@rohanKanojia Indeed, a Helm archive that contains dependencies can not be updated. The issue with the archive generated by JKube is that it does not contain the dependencies specified in the pom.xml and is not a valid Helm archive. The workaround is:
|
@jmesnil : I'm not sure if I understand correctly. Did you specify dependencies in plugin configuration |
ohk, you mean jkube doesn't include the dependent charts. At the moment we only include references to dependencies in generated |
Exactly. So the tgz provided by JKube is not installable if it contains dependencies. I'm not sure how you want to fix it (as it could require JKube to do something similar to |
We don't rely on helm CLI for generating charts. Need to check how Helm downloads and extracts these dependencies and see if we can emulate it in jkube. |
@jmesnil : Do you know if when we build a standard helm chart with dependencies using helm, it includes the dependencies already, or |
@rohanKanojia the dependencies are not included when you want to package a Helm archive, you have to run As an example, starting from a Helm chart that has dependencies specified in
|
This is being worked on. However, just a quick note. The The following command:
should work just fine. |
Helm: Update chart's on-disk dependencies (k8s:helm-dependency-update)DescriptionAs an Eclipse JKube user, I want to be able to update the chart's on-disk dependencies, so that I can properly install charts with dependencies. ProposalJKube KitJKube Kit exposes a new method The chart should have been previously generated using the
Maven pluginsThe Kubernetes Maven Plugin and OpenShift Maven Plugin expose a new The mojos are bound by default to the Tests should be added for each of the mojos and also for Gradle pluginsThe Kubernetes Gradle Plugin and OpenShift Gradle Plugin expose a new Individual tests should be added for the new tasks and also for the plugins to verify task precedence. An integration test proves that the task can be executed and required dependencies are downloaded. DocumentationThe documentation exposes for each of the Maven, Gradle, Kubernetes, and OpenShift plugins the new dependency update goal/task. |
Related to eclipse-jkube#2110 Add a new method in dependencyUpdate in HelmService that will use helm-java dependency for dependency update of helm chart Signed-off-by: Rohan Kumar <[email protected]>
Related to eclipse-jkube#2110 Add a new method in dependencyUpdate in HelmService that will use helm-java dependency for dependency update of helm chart Signed-off-by: Rohan Kumar <[email protected]>
Related to #2110 Add a new method in dependencyUpdate in HelmService that will use helm-java dependency for dependency update of helm chart Signed-off-by: Rohan Kumar <[email protected]>
Describe the bug
Requires/blocked by #2392
k8s:helm-dependency-update
https://helm.sh/docs/helm/helm_dependency_updateAs an user, I want to create a Helm chart with JKube that has a dependency.
Eclipse JKube version
1.11.0
Component
Kubernetes Maven Plugin
Apache Maven version
other (please specify in additional context)
Gradle version
None
Steps to reproduce
Use my fork of https://github.com/rohankanojia-forks/eclipse-jkube-helm-demo which uses the
kubernetes-maven-plugin
instead of theopenshift-maven-plugin
and has a dependency on thewildlfly
Helm chart.Installation of the Helm chart fails with the error:
Content of the
Chart.yaml
file is correct (with awildfly
dependency):Expected behavior
The Helm Chart is successfully installed.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3
Environment
macOS
Eclipse JKube Logs
Sample Reproducer Project
https://github.com/jmesnil/eclipse-jkube-helm-demo/tree/main/jkube-helm-maven
Additional context
The installation is failing as JKube does not update the dependencies in the Chart directory.
When the Helm chart is generated it contains:
To be able to install the chart with its wildfly dependency, I must run
helm dependency update
:The content of the Chart is then correct:
And I can finally install it:
(Don't pay attention to the
--set
values, they are required by thewildfly
Helm Chart to deploy on Kubernetes instead of OpenShift)At first glance, the code at https://github.com/eclipse/jkube/blob/1b6af6b4f49f25cd0db4df6554df6566a28bf174/jkube-kit/resource/helm/src/main/java/org/eclipse/jkube/kit/resource/helm/HelmService.java#L80 is missing the
helm dependency update
execution to provide an installable Helm Chart.The text was updated successfully, but these errors were encountered: