Skip to content

Commit

Permalink
doc : documentation for helm-dependency-update feature
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed May 30, 2024
1 parent 94f2303 commit a3e0642
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Usage:
* Fix #2904: `docker.buildArg.*` properties not taken into account in OpenShift plugins
* Fix #3007: Kubernetes Maven Plugin generating resource manifests with line feeds on Windows
* Fix #3067: Helm Push uses configured docker global and push registries instead of pull
* Fix #2110: Add new helm dependency update goal task (`k8s:helm-dependency-update` for maven and `k8sHelmDependencyUpdate` for gradle)

### 1.16.2 (2024-03-27)
* Fix #2461: `k8s:watch`/`k8sWatch` should throw error in `buildpacks` build strategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ include::{kitdoc-path}/inc/helm/_jkube_helm.adoc[]
include::{kitdoc-path}/inc/helm/_jkube_helm_push.adoc[]

include::{kitdoc-path}/inc/helm/_jkube_helm_lint.adoc[]

include::{kitdoc-path}/inc/helm/_jkube_helm_dependency_update.adoc[]
6 changes: 6 additions & 0 deletions jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ Defaults to `${project.version}`.
endif::[]
| `jkube.helm.version`
| *debug*
| enable verbose output for helm operations
Defaults to `false`
| `jkube.helm.debug`
| *description*
| The Chart single-sentence description.
ifeval::["{plugin-type}" == "maven"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ifeval::["{plugin-type}" == "maven"]
[[jkube:helm-dependency-update]]
== *{goal-prefix}:helm-dependency-update*
endif::[]
ifeval::["{plugin-type}" == "gradle"]
[[jkubeHelmDependencyUpdate]]
=== *{task-prefix}HelmDependencyUpdate*
endif::[]

This feature allows you to update dependencies of your Eclipse JKube-generated
https://helm.sh/docs/topics/charts[Helm charts]

It provides the same output as the https://helm.sh/docs/helm/helm_dependency_update/[`helm dependency update`] command.

ifeval::["{plugin-type}" == "maven"]
include::maven/_mvn_helm_dependency_update.adoc[]
endif::[]
ifeval::["{plugin-type}" == "gradle"]
include::gradle/_gradle_helm_dependency_update.adoc[]
endif::[]

.Helm Dependency Update configuration
[cols="1,5,1"]
|===
| Element | Description | Property

| *dependencyVerify*
| verify the packages against signatures
| `jkube.helm.dependencyVerify`

| *dependencySkipRefresh*
| do not refresh the local repository cache
| `jkube.helm.dependencySkipRefresh`

|===

.Example Helm Dependency Update configuration
ifeval::["{plugin-type}" == "maven"]
include::maven/_example_helm_dependency_update_config.adoc[]
endif::[]
ifeval::["{plugin-type}" == "gradle"]
include::gradle/_example_helm_dependency_update_config.adoc[]
endif::[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
----
kubernetes {
helm {
dependencyVerify = false
debug = true
dependencySkipRefresh = false
dependencies = [{
name = "foo"
version = "0.0.1"
repository = "https://charts.example.com/test"
}]
}
}
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To update on-disk dependencies of a Helm chart you need to invoke the `{task-prefix}HelmDependencyUpdate` Gradle task on the command line:

[source, sh, subs="+attributes"]
----
gradle {task-prefix}Resource {task-prefix}Helm {task-prefix}HelmDependencyUpdate
----

[NOTE]
The `{task-prefix}Resource` and the `{task-prefix}Helm` tasks are required to create the resource descriptors which are included in the Helm chart and the Helm chart itself.
If you have already built the resource and created the chart, then you can omit these tasks.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
----
<plugin>
<configuration>
<helm>
<dependencies>
<dependency>
<name>foo</name>
<version>0.0.1</version>
<repository>https://charts.example.com/test-chart</repository>
</dependency>
</dependencies>
<debug>true</debug>
<dependencySkipRefresh>true</dependencySkipRefresh>
<dependencyVerify>true</dependencyVerify>
</helm>
</configuration>
</plugin>
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To update on-disk dependencies of a Helm chart you need to invoke the `{goal-prefix}:helm-dependency-update` Maven goal on the command line:

[source, sh, subs="+attributes"]
----
mvn {goal-prefix}:resource {goal-prefix}:helm {goal-prefix}:helm-dependency-update
----

[NOTE]
The `{goal-prefix}:resource` and the `{goal-prefix}:helm` goals are required to create the resource descriptors which are included in the Helm chart and the Helm chart itself.
If you have already built the resource and created the chart, then you can omit these goals.

Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ include::_jkube-apply.adoc[]
include::{kitdoc-path}/inc/helm/_jkube_helm.adoc[]
include::{kitdoc-path}/inc/helm/_jkube_helm_push.adoc[]
include::{kitdoc-path}/inc/helm/_jkube_helm_lint.adoc[]
include::{kitdoc-path}/inc/helm/_jkube_helm_dependency_update.adoc[]

0 comments on commit a3e0642

Please sign in to comment.