Skip to main content
Version: v0.8.0

Installing Helm Charts

Overview

This guide demonstrates how to install Helm charts via the Nova Control Plane using an actual example—installing the nginx chart from Bitnami. Note that this is merely an example. In a real-world setup, you would customize the SchedulePolicy, chart, and values according to your specific requirements.

Steps to Install Helm Charts

1. Define Your SchedulePolicy

Create a SchedulePolicy YAML file tailored to your workload clusters and namespaces. For this example, we'll use a cluster named workload-1 and the default namespace.

apiVersion: policy.elotl.co/v1alpha1
kind: SchedulePolicy
metadata:
name: example-helm-policy
spec:
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: default
clusterSelector:
matchLabels:
kubernetes.io/metadata.name: workload-1
resourceSelectors:
labelSelectors:
- matchLabels:
nova.elotl.co/policy: example-helm-policy

Apply this policy:

kubectl apply -f example-helm-policy.yaml

2. Prepare to Install the nginx Chart

For our example, we're using the nginx chart from Bitnami, which can be installed from oci://registry-1.docker.io/bitnamicharts/nginx.

3. Add Labels to Your Chart Resources

The Bitnami nginx chart allows you to add custom labels to the resources it installs via the commonLabels map in the values.yaml file. Add your SchedulePolicy label like so:

commonLabels:
nova.elotl.co/policy: example-helm-policy

4. Install Your Helm Chart

Install the nginx chart using the custom values. For this example:

helm install nginx oci://registry-1.docker.io/bitnamicharts/nginx -f my-values.yaml

In case you don't want to edit the values.yaml file, you can directly add the label using the --set flag:

helm install nginx oci://registry-1.docker.io/bitnamicharts/nginx --set commonLabels."nova\.elotl\.co/policy"=example-helm-policy

5. You're up and running!

kubectl get deploy
NAME    READY   UP-TO-DATE   AVAILABLE   AGE
nginx 1/1 1 1 2m8s

Reminder: Customize According to Your Needs

This guide uses the Bitnami nginx chart and a workload-1 cluster merely as examples. In your production environment, you'll need to customize the SchedulePolicy, Helm chart, and values to fit your unique requirements.