Helm

Introduction

Helm is a package management tool for Kubernetes, enabling users to define, install, and upgrade complex Kubernetes applications. A Helm Chart is a templated configuration package containing Kubernetes resource definitions (YAML files).

Core Concepts of Helm

  • Chart: A Helm Chart is a templated configuration package containing Kubernetes resource definitions (YAML files).
  • Release: A Helm Release is an instance of a deployed Helm Chart, representing a specific configuration of Kubernetes resources.
  • Values: Helm Values are parameterized configurations for a Helm Chart, allowing users to customize Kubernetes resource definitions.

Argo CD's integration with Helm enhances GitOps practices by enabling declarative continuous delivery through web console, Argo CD dashboard, or CLI. Example:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: sealed-secrets
  namespace: argocd
spec:
  project: default
  source:
    chart: sealed-secrets
    repoURL: https://bitnami-labs.github.io/sealed-secrets
    targetRevision: 1.16.1
    helm:
      releaseName: sealed-secrets
  destination:
    server: "https://kubernetes.default.svc"
    namespace: kubeseal

OCI Helm Chart Example:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: nginx
spec:
  project: default
  source:
    chart: nginx
    repoURL: registry-1.docker.io/bitnamicharts  # note: the oci:// syntax is not included.
    targetRevision: 15.9.0
  destination:
    name: "in-cluster"
    namespace: nginx
INFO

** The Application's lifecycle is managed by Argo CD, not Helm. ** When multiple value sources are provided, the priority order is: parameters > valuesObject > values > valueFiles > helm repository values.yaml.

Advantages

  • Templating: Helm uses the Go template engine (gotpl) to dynamically generate Kubernetes resource files.

  • Package Management: Helm packages applications as Charts (including templates, default values, and dependencies), simplifying distribution and version control.

  • Dependency Management: Supports dependencies between Charts.

  • Lifecycle Management: Provides commands like install, upgrade, and rollback for full lifecycle management.

Use Cases

  • Complex Application Deployment: Ideal for scenarios requiring dynamic configuration generation (e.g., environment variables or user input).

  • Multi-Environment Deployments: Supports environment-specific configurations via values.yaml files.

  • Application Distribution: Enables packaging Charts for distribution to Helm repositories or OCI registries.

References

For more detailed information, please refer to: Helm