Customize Helm Chart values for RKE2 default addons
This document (000020750) is provided subject to the disclaimer at the end of this document.
Environment
RKE2 downstream cluster
Situation
kubectl -n kube-system get addonsMany of these addons are deployed from a Helm chart and represented within the cluster via a HelmChart custom resource:
kubectl -n kube-system get helmchartThese built-in addons deployed from a Helm chart can be customized with the use of a HelmChartConfig custom resource:
kubectl -n kube-system get helmchartconfigThis is where you can use the Helm chart values to change an addon's default installation.
Resolution
For example, RKE2 1.23.10+rke2r1 uses ingress-nginx 4.1.0 (https://github.com/rancher/rke2/releases/tag/v1.23.10+rke2r1). Checking the values for this version of the ingress-nginx chart within the ingress-nginx GitHub repository you can determine the possible values
(https://github.com/kubernetes/ingress-nginx/blob/helm-chart-4.1.0/charts/ingress-nginx/values.yaml).
Thus, to add tolerations to the ingress-nginx controller, you can use the below manifest as an example. All of the values from the chart can be customised via this schema.
--- apiVersion: helm.cattle.io/v1 kind: HelmChartConfig metadata: name: rke2-ingress-nginx namespace: kube-system spec: valuesContent: |- controller: tolerations: - key: "key" operator: "Exists" effect: "NoSchedule"
After creating the HelmChartConfig manifest, you need to apply it via Rancher. To do so:
1. Navigate to Cluster Management.
2. On the selected cluster, click Edit Config.
3. Click on the Add-On Config tab and enter the manifest at the bottom in Additional Manifest.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020750
- Creation Date: 07-Sep-2022
- Modified Date:22-Jul-2024
-
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com