> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/helm

An orb for working with helm for Kubernetes deployments. Currently supports helm3 versions.


## Commands

### delete_helm_release

Deletes a helm release.
Requirements: helm should be installed on the cluster
and kubeconfig should be configured to connect to the cluster.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `helm_version` | string | v3.8.2 | the helm client version to install. e.g. v3.0.0. |
| `keep_history` | boolean | false | Effective for helm 3 commands only.
Retains release history.
 |
| `namespace` | string |  | The kubernetes namespace that should be used.
 |
| `no_output_timeout` | string | 30m | Elapsed time that the helm command can run on CircleCI without output.
The string is a decimal with unit suffix, such as “20m”, “1.25h”, “5s”
 |
| `purge` | boolean | false | Effective for helm 2 commands only (purging is the default in helm 3)
Whether to remove the release from the store and make its name free for
later use
 |
| `release_name` | string |  | Specify the release to be deleted.
 |
| `tiller_namespace` | string |  | Specify the namespace of Tiller
 |
| `timeout` | string |  | Specify a timeout value that will be passed as a --timeout argument
to the helm command. For helm 3, the unit of the duration must
be specified e.g. '300s'.
 |
| `tls` | boolean | false | Enable TLS for the request
 |
| `tls_ca_cert` | string |  | Path to TLS CA certificate file
 |
| `tls_cert` | string |  | Path to TLS certificate file
 |
| `tls_hostname` | string |  | The server name used to verify the hostname on the returned
certificates from the server
 |
| `tls_key` | string |  | Path to TLS key file
 |
| `tls_verify` | boolean | false | Enable TLS for request and verify remote
 |

### install_helm_chart

Installs a helm chart.
Requirements: helm should be installed on the cluster
and kubeconfig should be configured to connect to the cluster.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `add_repo` | string |  | The url for the helm chart repository used as part of helm repo add
command. Required when update_repositories is true.
 |
| `chart` | string |  | Specify for installation a chart reference (e.g. stable/mariadb),
or a path to a packaged chart (e.g. ./nginx-1.2.3.tgz),
or a path to an unpacked chart directory (e.g. ./nginx)
or an absolute URL (e.g. https://example.com/charts/nginx-1.2.3.tgz)
 |
| `create_namespace` | boolean | false | This parameter creates the kubernetes namespace if the one provided does not exist.
 |
| `debug` | boolean | false | Enable debug mode by adding --debug to helm command. Defaults to false.
 |
| `helm_version` | string | v3.8.2 | the helm client version to install. e.g. v3.0.0 |
| `namespace` | string |  | The kubernetes namespace that should be used.
 |
| `no_output_timeout` | string | 30m | Elapsed time that the helm command can run on CircleCI without output.
The string is a decimal with unit suffix, such as “20m”, “1.25h”, “5s”
 |
| `release_name` | string |  | Specify a name for the release.
 |
| `update_repositories` | boolean | true | Choose to update repositories by running helm repo update.
 |
| `values_to_override` | string |  | Override values in a chart using the --set flag of the helm install
command. Format: key1=val1,key2=val2
 |
| `wait` | boolean | false | Whether to wait for the installation or upgrade to be complete
 |
| `wait_for_jobs` | boolean | false | Whether to wait for all jobs associated with deployment to be complete before marking the release as successful.
 |

### install_helm_client

Install the helm client.
Defaults to the latest version of Helm 3. You can specify a specific version e.g v3.0.0.
Requirements: curl


| Parameter | Type | Default | Description |
|---|---|---|---|
| `retries` | integer | 2 | The amount of retries when downloading the helm client, in case it fails. |
| `version` | string | v3.8.2 | the helm client version to install. e.g. v3.8.0 |

### install_helm_plugin

Installs a helm plugin.
Requirements: helm should be installed on the cluster


| Parameter | Type | Default | Description |
|---|---|---|---|
| `helm_plugin_url` | string |  | absolute URL to helm plugin to install
(e.g. https://example.com/helm-plugin/helm-plugin-1.2.3.tgz)
 |
| `helm_version` | string | v3.8.2 | the helm client version to install. e.g. v3.0.0 |
| `install_helm_client` | boolean | true | Whether or not to install the helm client. Defaults to true. |
| `no_output_timeout` | string | 30m | Elapsed time that the helm command can run on CircleCI without output.
The string is a decimal with unit suffix, such as “20m”, “1.25h”, “5s”
 |
| `plugin_version` | string |  | Version of the plugin to install. e.g. v4.6.5
If empty latest will be installed.
 |

### upgrade_helm_chart

Upgrades an existing helm chart
Requirements: helm should be installed on the cluster
and kubeconfig should be configured to connect to the cluster.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `add_repo` | string |  | The url for the helm chart repository used as part of helm repo add
command
 |
| `atomic` | boolean | false | if set, upgrade process rolls back changes made in case of failed upgrade.
The --wait flag will be set automatically if --atomic is used
 |
| `chart` | string |  | Specify for upgrade a chart reference (e.g. stable/mariadb),
or a path to a packaged chart (e.g. ./nginx-1.2.3.tgz),
or a path to an unpacked chart directory (e.g. ./nginx)
or an absolute URL (e.g. https://example.com/charts/nginx-1.2.3.tgz)
 |
| `create_namespace` | boolean | false | This parameter creates the kubernetes namespace if the one provided does not exist.
 |
| `debug` | boolean | false | Enable debug mode by adding --debug to helm command. Defaults to false.
 |
| `devel` | string |  | Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.
 |
| `dry_run` | boolean | false | simulate an upgrade
 |
| `force` | boolean | false | Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.
 |
| `helm_version` | string | v3.8.2 | the helm client version to install. e.g. v3.0.0 |
| `history_max` | integer | 10 | limit the maximum number of revisions saved per release. Use 0 for no limit (default 10)
 |
| `namespace` | string |  | The kubernetes namespace that should be used.
 |
| `no_hooks` | boolean | false | This skips running hooks for the command
 |
| `no_output_timeout` | string | 30m | Elapsed time that the helm command can run on CircleCI without output.
The string is a decimal with unit suffix, such as “20m”, “1.25h”, “5s”
 |
| `recreate_pods` | boolean | false | performs pods restart for the resource if applicable
 |
| `release_name` | string |  | Specify a name for the release.
 |
| `reset_values` | boolean | false | when upgrading, reset the values to the ones built into the chart
 |
| `reuse_values` | boolean | false | when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset_values' is specified, this is ignored.
 |
| `timeout` | string |  | If timeout is reached, the release will be marked as FAILED.
 |
| `values` | string |  | specify values in a YAML file or a URL
 |
| `values_to_override` | string |  | Override values in a chart using the --set flag of the helm upgrade
command. Format: key1=val1,key2=val2
 |
| `version` | string |  | specify the exact chart version to use. If this is not specified, the latest version is used
 |
| `wait` | boolean | false | Whether to wait for the installation to be complete.
 |
| `wait_for_jobs` | boolean | false | Whether to wait for all jobs associated with deployment to be complete before marking the release as successful.
 |

## Examples

### install_helm_chart_with_helm3

Demonstrate installing a helm chart on a Kubernetes cluster, with
helm 3.


```yaml
version: '2.1'
orbs:
  aws-eks: circleci/aws-eks@2.1.2
  helm: circleci/helm@1.0
jobs:
  delete_helm_release:
    executor: aws-eks/python
    parameters:
      cluster-name:
        description: Cluster name
        type: string
    steps:
      - aws-eks/update-kubeconfig-with-authenticator:
          cluster-name: << parameters.cluster-name >>
      - helm/delete_helm_release:
          helm_version: v3.2.4
          release_name: grafana-release
          timeout: 600s
  install_helm_chart:
    executor: aws-eks/python
    parameters:
      cluster-name:
        description: Cluster name
        type: string
    steps:
      - aws-eks/update-kubeconfig-with-authenticator:
          cluster-name: << parameters.cluster-name >>
      - helm/install_helm_chart:
          chart: stable/grafana
          helm_version: v3.2.4
          release_name: grafana-release
workflows:
  deployment:
    jobs:
      - aws-eks/create-cluster:
          cluster-name: test-cluster
      - install_helm_chart:
          cluster-name: test-cluster
          requires:
            - aws-eks/create-cluster
      - delete_helm_release:
          cluster-name: test-cluster
          requires:
            - install_helm_chart
      - aws-eks/delete-cluster:
          cluster-name: test-cluster
          requires:
            - delete_helm_release
          wait: true
```