helm-1.7.0
3 minute read
KOSI Plugin Helm Version 1.7.0
Summary
The Helm Plugin allows users to manage Helm packages. It enables the installation, upgrade, and deletion of Helm charts via KOSI package.
The Key Features are:
- Install Helm charts with custom values and additional flags.
- Upgrade existing Helm deployments.
- Delete Helm deployments.
- Supports namespace customization.
- Allows the use of multiple values files for configuration.
Keys
| Key | Required | Description |
|---|---|---|
command |
Yes | Defines the operation to perform. Possible values: install, upgrade or delete. |
tgz |
Yes (only for install and upgrade) |
The filename of the Helm chart archive (.tgz). |
values |
Optional | A list of YAML files containing configuration values for the Helm chart. |
flags |
Optional | Additional Helm command flags. |
namespace |
Optional, Default: default |
The Kubernetes namespace in which to deploy the chart. |
deploymentName |
Yes (only for upgrade and delete) |
Specifies the name of the Helm release. If omitted during installation, a random name will be generated. |
Important Notes:
- A
helmvalues.yamlfile must be present in the execution directory when running KOSI install commands.- The Helm
.tgzpackage (Helm chart) must be included in the files tree inside the includes tree.- KOSI’s
--dnameargument is not related to Helm’sdeploymentNameparameter.--dnamein KOSI is used to define a KOSI deployment name, whereasdeploymentNamein the Helm plugin specifies the Helm release name.- Helm charts and values files (
.tgzand.yaml) can be obtained from sources like ArtifactHub, or you can package your own Helm chart usinghelm package. Knowledge of Helm is required here.
Examples
Example 1 - Helm Install
This command deploys a Helm chart to a Kubernetes cluster.
languageversion = "1.0.0";
apiversion = "kubernative/kubeops/sina/user/v4";
name = "kosi-example-package";
description = "helm-installation-example";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";
files =
{
guestbook = "guestbook.tgz";
values1 = "gbValues.yaml";
values2 = "values2.yaml";
}
install
{
cmd(command="echo Installing Helm chart...");
helm
(
command = "install";
tgz = "guestbook.tgz";
values = "['gbValues.yaml','values2.yaml']";
deploymentName = "guestbook";
namespace = "dev";
);
}
Explanation
- The
guestbook.tgzHelm chart is installed. - Values files (
gbValues.yamlandvalues2.yaml) customize the deployment. - The Helm release is named
guestbookin thedevnamespace. - The
cmdplugin ensures a status message is displayed before execution.
Example 2 - Helm Upgrade
Upgrades an existing Helm release to a new version or updates its values.
languageversion = "1.0.0";
apiversion = "kubernative/kubeops/sina/user/v4";
name = "kosi-example-package";
description = "helm-upgrade-example";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";
files =
{
guestbook = "guestbook.tgz";
values1 = "gbValues.yaml";
values2 = "values2.yaml";
}
update
{
cmd(command = "echo Upgrading Helm chart...");
helm
(
command = "upgrade";
tgz = "guestbook.tgz";
values = "['gbValues.yaml','values2.yaml']";
deploymentName = "guestbook";
namespace = "dev";
);
}
Explanation
- Upgrades the existing
guestbookHelm release using an updatedguestbook.tgzchart. - New configuration values are applied from
gbValues.yamlandvalues2.yaml.
Example 3 - Helm Delete
Deletes a Helm release from the Kubernetes cluster.
languageversion = "1.0.0";
apiversion = "kubernative/kubeops/sina/user/v4";
name = "kosi-example-package";
description = "helm-delete-example";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";
files =
{
guestbook = "guestbook.tgz";
values1 = "gbValues.yaml";
values2 = "values2.yaml";
}
delete
{
cmd(command = "echo Deleting Helm chart...");
helm
(
command = "delete";
deploymentName = "guestbook";
namespace = "dev";
flags = "['--wait']";
);
}
Explanation
- Deletes the guestbook release from the
devnamespace. - The
--waitflag ensures the command waits for all resources to be fully removed.