Managing Helm releases · Codefresh | Docs

Manage Helm deployments from the Codefresh user interface

Codefresh has a built-in integration for Helm that provides a single view of your production Kubernetes cluster. In Helm Releases, you can view the current status of your cluster, including currently deployed versions, your previous revisions, including change tracking, and even roll back to a previous version.

Codefresh also offers an environment view for Helm versions, as well as a promotion panel.

View Helm versions and version information

View

all versions of Helm in your cluster and

drill down into a specific version to see its services, deployed versions, manifests, and more

.

Ensure that you have connected your Kubernetes cluster to

Codefresh.

  1. In the Codefresh user interface, under DevOps Insights in the sidebar, select Helm Releases.

Helm Releases Helm Releases

  1. To view the details for a specific version, click the version name.

<img src="https://codefresh.io/docs/images/deployments/helm/services.png" alt="Kubernetes Services

” />

Kubernetes

Services The History tab displays all previous versions.

Helm History Helm History

You can further expand a version revision to see exactly which files were changed in this release.

<img src="https://codefresh.io/docs/images/deployments/helm/diff.png" alt="Helm diff

” /> Helm

diff

There are other tabs that show the chart used, the values, and the final manifests that were actually implemented.

Rendered End Manifests Rendered End Manifests

Add tags to Kubernetes services For

better visibility into services, add recommended tags to your Kubernetes service. To

use the instance tag for

something different, you can also use a version label instead:

Adding an update message

Codefresh allows you to display a meaningful description for each version in the version history.

This message can

help show the main reason behind each version, or any other message that is convenient for you.

<img src="https://codefresh.io/docs/images/deployments/helm/helm-commit-message.png" alt="Helm release message

” />

Helm

release

message You can configure this message for your version of Helm in

three ways:

  1. When you manually install a version of Helm from the Helm graphics screen, there is a field for this message
  2. .

  3. Set the commit_message property within your chart’.txt notes file.
  4. By providing an environment variable named COMMIT_MESSAGE within the Helm pipeline step.

Revert a version of Helm You can revert to a previous revision of a version on the History tab. Click the version

  1. of Helm for which you want to rollback, and then click the History tab. To revert to a specific version
  2. , click Revert in the row.

<img src

=”https://codefresh.io/docs/images/deployments/helm/rollback.png” alt=”Revert to previous version” />

Revert

to a previous version

It takes time to complete the rollback of a version, and the change to the cluster is not instantly updated in the Codefresh user interface. If you also use a custom rollback pipeline, the delay between the cluster upgrade and the UI upgrade is even longer.

Helm UI

Actions

From the main version screen, you have some additional actions

.

Select the row with the desired chart and:

Issue a Helm test by clicking the ‘

    Run Test’ button. Delete

  • a version by clicking the
  • Delete’ button. For removal options, see the Helm removal documentation. For example, purging removes the version history review.

Helm deployment badge Similar to a build badge, you can also get a deployment

badge

for a version of Helm. In the Codefresh user interface, in the

  1. DevOps Insights section of the sidebar, select Helm Releases. In
  2. the

  3. row with the version of Helm for which you want to add a deployment badge, click the Settings (gear) icon.

<img src

=”https://codefresh.io/docs/images/deployments/helm/helm-badge.png” alt=”Helm Deployment Badge” /> Helm Deployment Badge

  1. For deployment information, click Badge. Codefresh provides the Markdown/HTML/Link segment that you can embed in README or other documents to display deployment information.

Override

default Helm actions for versions

By default, when an action is performed in the UI, Codefresh executes the native Helm command corresponding to that action:

  • rudder test to test a Helm chart
  • rollback for reverts
  • Helm delete or Helm uninstall –

  • keep-history for
  • delete Helm

  • delete -purge or helm uninstall to purge a version

You can override these actions for a specific version of Helm by defining custom pipelines for each action. This way, you can add your additional logic in addition to these actions. For example, your own Helm uninstall pipeline might also have a notification step that posts a message to a Slack channel after a version is removed.

Only Codefresh admin users can override default pipelines defined for a version of Helm.

In the

  1. Codefresh user interface, in the DevOps Insights section of the sidebar, select Helm Releases. In
  2. the

  3. row with the version of Helm for which you want to override the default actions, click the Settings (gear) icon.

<img src="https://codefresh.io/docs/images/deployments/helm/override-helm-actions.png" alt="Changing Helm Default Actions

” /> Changing

Helm Default Actions
  1. Select the pipeline you want to use for the respective actions.

Environment variables for custom Helm

commands

If you override any of these actions, the following environment variables are available in the appropriate pipeline, so that you can use your own custom Helm command.

Helm Test Pipeline CF_HELM_RELEASE

: Version Name

  • CF_HELM_KUBE_CONTEXT: Kubectl context Target cluster name (dashboard cluster name)
  • CF_HELM_NAMESPACE: Namespace where version is stored
  • CF_HELM_TIMEOUT:

  • Time in seconds to wait for any individual Kubernetes operation
  • CF_HELM_CLEANUP: Delete test pods at the end of

Helm

Rollback pipeline

CF_HELM_VERSION: Helm version, e.g.

  • 3.0.1, 2.7.0
  • CF_HELM_RELEASE: Name of the version in the cluster
  • CF_HELM_REVISION: Hotfix to use for rollback
  • CF_HELM_KUBE_CONTEXT: Kubectl context name of the target cluster (dashboard cluster name)
  • CF_HELM_NAMESPACE: Namespace where
  • the Helm version is stored

Delete pipeline

  • CF_HELM_PURGE: Boolean, delete
  • store version CF_HELM_RELEASE:

  • Version
  • name CF_HELM_TIMEOUT: Time in seconds to wait for any individual Kubernetes operation
  • CF_HELM_HOOKS: Prevent bindings from running during installation
  • CF_HELM_KUBE_CONTEXT: Kubectl context name of the target cluster (dashboard cluster name)
  • CF_HELM_VERSION: Helm version,

  • for example: 3.0.1, 2.7.0
  • CF_HELM_NAMESPACE: Namespace where the version is stored

Related Articles

Using Helm

in a Codefresh pipelineHelm charts and repositoriesUsing a managed Helm repositoryPromoting Helm environments