From d8db3e644cbb2609711125e7046ba4714bde994c Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Wed, 17 Jul 2024 13:54:33 +0530 Subject: [PATCH] doc(helm): documentation for Helm Install feature Signed-off-by: Rohan Kumar --- CHANGELOG.md | 1 + .../main/asciidoc/inc/tasks/build/_index.adoc | 2 + .../inc/helm/_jkube_helm_install.adoc | 45 +++++++++++++++++++ .../gradle/_example_helm_install_config.adoc | 10 +++++ .../inc/helm/gradle/_gradle_helm_install.adoc | 10 +++++ .../maven/_example_helm_install_config.adoc | 12 +++++ .../inc/helm/maven/_mvn_helm_install.adoc | 10 +++++ .../main/asciidoc/inc/goals/build/_goals.adoc | 1 + 8 files changed, 91 insertions(+) create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_install.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_install_config.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_install.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_install_config.adoc create mode 100644 jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_install.adoc diff --git a/CHANGELOG.md b/CHANGELOG.md index 00fc16a3ce..fe0c45885d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Usage: * Fix #2463: Buildpacks should clear build cache when `nocache` option is enabled * Fix #2470: Add configuration option for overriding buildpack builder image * Fix #2662: Sanitize VCS remote URL used in `jkube.eclipse.org/git-url` annotation +* Fix #2663: Add new helm install goal task (`k8s:helm-install` for maven and `k8sHelmInstall` for gradle) * Fix #2665: Added support for explicit path for readiness and liveness probes in SpringBootHealthCheckEnricher * Fix #2860: Correctly pass Docker build-arg from the build configuration to the Openshift build strategy * Fix #2885: Provide a way to set labels on images defined by Generators 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 0671ee5ca7..8cafd72d76 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 @@ -16,3 +16,5 @@ 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[] + +include::{kitdoc-path}/inc/helm/_jkube_helm_install.adoc[] diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_install.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_install.adoc new file mode 100644 index 0000000000..01971e5f72 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/_jkube_helm_install.adoc @@ -0,0 +1,45 @@ +ifeval::["{plugin-type}" == "maven"] +[[jkube:helm-install]] +== *{goal-prefix}:helm-install* +endif::[] +ifeval::["{plugin-type}" == "gradle"] +[[jkubeHelmInstall]] +=== *{task-prefix}HelmInstall* +endif::[] + +This feature allows you to install your Eclipse JKube-generated +https://helm.sh/docs/topics/charts[Helm charts] + +ifeval::["{plugin-type}" == "maven"] +include::maven/_mvn_helm_install.adoc[] +endif::[] +ifeval::["{plugin-type}" == "gradle"] +include::gradle/_gradle_helm_install.adoc[] +endif::[] + +.Helm Install configuration +[cols="1,5,1"] +|=== +| Element | Description | Property + +| *releaseName* +| Name of Helm Release (instance of a chart running in a Kubernetes cluster). +| `jkube.helm.release.name` + +| *installDependencyUpdate* +| update dependencies if they are missing before installing the chart +| `jkube.helm.install.dependencyUpdate` + +| *installWaitReady* +| if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. +| `jkube.helm.install.waitReady` + +|=== + +.Example Helm Install configuration +ifeval::["{plugin-type}" == "maven"] +include::maven/_example_helm_install_config.adoc[] +endif::[] +ifeval::["{plugin-type}" == "gradle"] +include::gradle/_example_helm_install_config.adoc[] +endif::[] \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_install_config.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_install_config.adoc new file mode 100644 index 0000000000..ff07a32da6 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_example_helm_install_config.adoc @@ -0,0 +1,10 @@ +[source,groovy,indent=0,subs="verbatim,quotes,attributes"] +---- +kubernetes { + helm { + releaseName = "test-release" + installWaitReady = false + installDependencyUpdate = false + } +} +---- \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_install.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_install.adoc new file mode 100644 index 0000000000..909dd4c8ea --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/gradle/_gradle_helm_install.adoc @@ -0,0 +1,10 @@ +To install Helm chart you need to invoke the `{task-prefix}HelmInstall` Gradle task on the command line: + +[source, sh, subs="+attributes"] +---- +gradle {task-prefix}Resource {task-prefix}Helm {task-prefix}HelmInstall +---- + +[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. \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_install_config.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_install_config.adoc new file mode 100644 index 0000000000..0cd3fac93d --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_example_helm_install_config.adoc @@ -0,0 +1,12 @@ +[source,xml,indent=0,subs="verbatim,quotes,attributes"] +---- + + + + test-release + false + false + + + +---- \ No newline at end of file diff --git a/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_install.adoc b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_install.adoc new file mode 100644 index 0000000000..2bdf2c1ef7 --- /dev/null +++ b/jkube-kit/doc/src/main/asciidoc/inc/helm/maven/_mvn_helm_install.adoc @@ -0,0 +1,10 @@ +To install a Helm chart you need to invoke the `{goal-prefix}:helm-install` Maven goal on the command line: + +[source, sh, subs="+attributes"] +---- +mvn {goal-prefix}:resource {goal-prefix}:helm {goal-prefix}:helm-install +---- + +[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. \ No newline at end of file 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 350532fa0d..3df289aa27 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 @@ -10,3 +10,4 @@ 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[] +include::{kitdoc-path}/inc/helm/_jkube_helm_install.adoc[]