Helm is a popular package manager for Kubernetes, an open-source container orchestration platform. It simplifies the deployment and management of applications in Kubernetes clusters by providing a templating system and a standardized way to package, distribute, and deploy software. With Helm, developers can define their application's configuration and dependencies using "charts," which are essentially packages that contain all the necessary files, templates, and metadata. These charts can be versioned and shared, allowing for easy collaboration and reuse across different projects.
env0 supports using Helm with 3 chart sources:
local- Use charts that are defined in your code and are not hosted in a Helm Repo.
Helm Repo- Use charts which are hosted in a chart repository, this can be a public repository or it could be your own private repository.
S3- Hosted directly on S3, similar to
Helm Repothese charts are hosted remotely but they follow a different protocol.
In order to use a chart that is defined directly in your
git select the appropriate VCS provider and provide the path to your Helm chart code:
In order to use a chart hosted in a
Helm Repo /
S3 select the Helm Repo option in your template:
Custom Flow For Helm Repo Deployments
Helm Repo deployments do not require git clone since the chart is not stored in git, therefore there is no custom flow for a Helm Repo template.
In order to use custom flows (for cluster authentication or other usages) in Helm Repo you must configure a Project-level Custom Flow.
Cluster authentication varies from one provider to another. Please refer to the Connect Your Kubernetes Cluster guide to learn more.
env0 supports a more customized usage by providing unique environment variables which will be passed to Helm:
ENV0_HELM_SET_<YOUR_VARIABLE_NAME>- set an environment variable with the
ENV0_HELM_SETprefix and the variable name as the suffix will be passed to Helm using the
--set server.port=0to helm command.
ENV0_HELM_VALUES_FILES- set this environment variable in order to provide Helm with your configuration which is stored in a values file(s), and will be passed to Helm using the
ENV0_HELM_CLI_ARGS- this variable's value will be added as a suffix to every Helm command execution, it can be used to pass additional custom arguments to Helm. For example it can be set to
Beyond the common steps such as Clone, Loading variables, etc. Deploy/Destroy Helm deployments contain the following steps:
Helm Diff -
helm diff upgrade <release-name> <chart-name/path> --install --allow-unreleased --color --detailed-exitcode
Helm Upgrade -
helm upgrade <release-name> . --install --atomic --timeout 4h
Helm Uninstall -
helm uninstall <release-name> --wait --timeout 4h
What Counts as a "diff"
env0 calculates diff between deployments using
helmand the helm diff plugin.
The Helm diff plugin finds the exact difference between Helm executions, changes to your Kubernetes resources which were not done by helm are left unnoticed.
For example, A Drift Detection run would result as successful (meaning no drift was found) if a change was done manually inside the cluster without using Helm (such as increasing the
replicasfrom 1 to 2).
Updated about 1 month ago