From 6b8651295b0560dca80204a24a9685e9660e8594 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 29 May 2024 22:47:30 +0530 Subject: [PATCH] doc : documentation for helm-dependency-update feature Signed-off-by: Rohan Kumar --- CHANGELOG.md | 1 + .../main/asciidoc/inc/tasks/build/_index.adoc | 2 + .../main/asciidoc/inc/helm/_jkube_helm.adoc | 6 +++ .../helm/_jkube_helm_dependency_update.adoc | 43 +++++++++++++++++++ ...example_helm_dependency_update_config.adoc | 15 +++++++ .../_gradle_helm_dependency_update.adoc | 10 +++++ ...example_helm_dependency_update_config.adoc | 20 +++++++++ .../maven/_mvn_helm_dependency_update.adoc | 11 +++++ .../main/asciidoc/inc/goals/build/_goals.adoc | 1 + 9 files changed, 109 insertions(+) create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_dependency_update.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_dependency_update_config.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_dependency_update.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_dependency_update_config.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_dependency_update.adoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 075c687ee5..7c302178be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/gradle-plugin/doc/src/main/asciidoc/inc/tasks/build/_index.adoc b/gradle-plugin/doc/src/main/asciidoc/inc/tasks/build/_index.adoc index a74050e798..0671ee5ca7 100644 --- a/gradle-plugin/doc/src/main/asciidoc/inc/tasks/build/_index.adoc +++ b/gradle-plugin/doc/src/main/asciidoc/inc/tasks/build/_index.adoc @@ -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[] diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm.adoc index dc1186f0cb..0a2e3858f7 100644 --- a/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm.adoc +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm.adoc @@ -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"] diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_dependency_update.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_dependency_update.adoc new file mode 100644 index 0000000000..a5137e74da --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_dependency_update.adoc @@ -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::[] \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_dependency_update_config.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_dependency_update_config.adoc new file mode 100644 index 0000000000..07582b25f6 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_dependency_update_config.adoc @@ -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" + }] + } +} +---- \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_dependency_update.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_dependency_update.adoc new file mode 100644 index 0000000000..39214c9405 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_dependency_update.adoc @@ -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. diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_dependency_update_config.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_dependency_update_config.adoc new file mode 100644 index 0000000000..841b07db44 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_dependency_update_config.adoc @@ -0,0 +1,20 @@ +[source,xml,indent=0,subs="verbatim,quotes,attributes"] +---- + + + + + + foo + 0.0.1 + https://charts.example.com/test-chart + + + + true + true + true + + + +---- \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_dependency_update.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_dependency_update.adoc new file mode 100644 index 0000000000..f3ad0fe5c7 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_dependency_update.adoc @@ -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. + diff --git a/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_goals.adoc b/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_goals.adoc index a379c8f004..350532fa0d 100644 --- a/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_goals.adoc +++ b/kubernetes-maven-plugin/doc/src/main/asciidoc/inc/goals/build/_goals.adoc @@ -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[]