Helm Chart Source
env zero supports using Helm with different chart sources:git/local- Use charts that are defined in your code and are not hosted in a Helm Repo.Helm Repo- both regular chart repositories and OCI-based registries. If the repository requires authentication you can provide the username and password inENV0_HELM_REPO_USERNAMEandENV0_HELM_REPO_PASSWORDenvironment variables.S3- Hosted directly on S3, similar toHelm Repothese charts are hosted remotely but they follow a different protocol.
git select the appropriate VCS provider and provide the path to your Helm chart code:

Helm Repo / S3 select the Helm Repo option in your template:

Custom Flow For Helm Repo DeploymentsHelm 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.
Environment Deployment
- Create a Helm Template.
- Follow our guide to Connect Your Kubernetes Cluster.
- Create an Environment
- The provided namespace is automatically injected with HELM_NAMESPACE env var
- If the provided namespace does not exist, make sure to add
--create-namespaceflag in theupgradestep. (See the section below for the instructions)
Cluster AuthenticationCluster authentication varies from one provider to another. Please refer to the Connect Your Kubernetes Cluster guide to learn more.
Environment Variables For Enhanced Customization
env zero 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 theENV0_HELM_SETprefix and the variable name as the suffix will be passed to Helm using the--setflag. E.g.ENV0_HELM_SET_servers[0].port=80will pass--set server[0].port=80to helm command. (see below for additional examples for inputting more complex types)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--values (-f)flag.ENV0_HELM_CLI_ARGS- this variable’s value will be added to every Helm command execution, it can be used to pass additional custom arguments to Helm. For example it can be set to--create-namespace --no-hooks.ENV0_HELM_CLI_ARGS_diff,ENV0_HELM_CLI_ARGS_upgrade, andENV0_HELM_CLI_ARGS_uninstallare similar, but only added to corresponding helm commands.
Execution Steps
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”env zero calculates diff between deployments using
helm and the helm diff plugin.The Helm diff plugin finds the exact difference between Helm executions, changes to your Kubernetes resources that 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 replicas from 1 to 2).Complex Input Value Examples
| Desired Helm Value | env zero HELM SET Input | Examples |
|---|---|---|
| annotations | general rule: - use quotes to encapsulate the “key” of annotation. - escape . (period) and / (slashes) with a (backslash) | ENV0_HELM_SET_annotations ."nginx\.ingress\.kubernets\.io\/backend-protocol"=HTTPSENV0_HELM_SET_server.ingress.annotations."cert-manager\.io\/cluster-issuer"=letsencrypt |
| labels | general rule: - use quotes to encapsulate the “key” of label. - escape . (period) and / (slashes) with a (backslash) | ENV0_HELM_SET_labels."app\.kubernetes\.io\/name"=my-deployment |
| complex values | general rule: - escape spaces with a (backslash) | ENV0_HELM_SET_map={"foo:\ bar"} |