-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* addon development guide * include feedback from Kiefer * renamed addon to add-on to better reflect upcoming ui changes: harvester/dashboard#1110 * Apply suggestions from code review include feedback for PR review. Co-authored-by: Jillian <67180770+jillian-maroket@users.noreply.github.com> * Update docs/developer/addon-development.md Co-authored-by: Alexandra Settle <asettle@suse.com> --------- Co-authored-by: Jillian <67180770+jillian-maroket@users.noreply.github.com> Co-authored-by: Alexandra Settle <asettle@suse.com>
- Loading branch information
1 parent
cacc69b
commit 104a2fa
Showing
3 changed files
with
70 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
{ | ||
"position": 18, | ||
"label": "Developer", | ||
"collapsible": false, | ||
"collapsed": false, | ||
"link": { | ||
"type": "doc", | ||
"id": "developer-mode-installation" | ||
} | ||
"label": "Development Guides", | ||
"collapsible": true, | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
id: Add-on-development-guide | ||
title: "Add-on Development Guide" | ||
sidebar_position: 1 | ||
sidebar_label: Add-on Development Guide | ||
keywords: | ||
- Harvester | ||
- harvester | ||
- Add-on Development | ||
Description: How to write your own Harvester add-on | ||
--- | ||
|
||
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)](https://docs.rke2.io/helm#using-the-helm-crd). | ||
|
||
|
||
## Prerequisites | ||
|
||
- An existing Harvester cluster | ||
|
||
## Add-on Specifications | ||
|
||
The `Addon` CRD supports the following fields: | ||
|
||
```yaml | ||
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](https://github.com/harvester/experimental-addons/blob/main/rancher-vcluster/rancher-vcluster.yaml) add-on. | ||
::: | ||
## Installation | ||
```bash | ||
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 | ||
|
||
```bash | ||
kubectl delete -f /path/to/Add-on.yaml | ||
``` |
This file was deleted.
Oops, something went wrong.