Skip to main content
Version: v1.4 (dev)

Add-on Development Guide

Harvester add-ons allow you to enable and disable specific Harvester and third-party components based on your requirements. Add-ons function as a wrapper for the RKE2 HelmChart resource definition (CRD).

Prerequisites

  • An existing Harvester cluster

Add-on Specifications

The Addon CRD supports the following fields:

apiVersion: harvesterhci.io/v1beta1
kind: Addon
metadata:
name: example-add-on # Name of add-on
namespace: example-namespace # Namespace where the add-on CRD is deployed and where the associated Kubernetes components will be deployed
labels: # Optional add-on labels
Add-on.harvesterhci.io/experimental: "true" # Predefined label used on the Harvester UI to identify add-ons with the "experimental" maturity level
spec:
enabled: false # Boolean indicating if an add-on should be enabled or disabled on definition
repo: https://chartsrepo.com # Helm chart repository containing the Helm chart managed by the add-on
version: "v0.19.0" # Version of the Helm chart to be installed
chart: mychart # Name of the Helm chart in the Helm chart repository
valuesContent: |- # File (values.yaml) that must be passed to the Helm chart
contents of values.yaml
that need to be passed
to the chart
note

Experimental add-ons are not directly packaged in Harvester. An example is the rancher-vcluster add-on.

Installation

kubectl apply -f /path/to/add-on.yaml

Usage

After creating an Addon CRD, you can can toggle the enabled field to enable and disable the associated Helm chart.

Upgrade

Changes to the repo, version, chart or valueContent fields will trigger a helm upgrade, which forces an upgrade of the existing Helm chart.

Uninstallation

kubectl delete -f /path/to/Add-on.yaml