SUSE Support

Here When You Need Us

Customize Helm Chart values for RKE2 default addons

This document (000020750) is provided subject to the disclaimer at the end of this document.

Environment

Rancher 2.6/2.7/2.8
RKE2 downstream cluster

Situation

By default, RKE2 installs multiple addons, including CoreDNS, Local-Storage, Nginx-Ingress, etc.:
kubectl -n kube-system get addons
Many of these addons are deployed from a Helm chart and represented within the cluster via a HelmChart custom resource:
kubectl -n kube-system get helmchart
These built-in addons deployed from a Helm chart can be customized with the use of a HelmChartConfig custom resource:
kubectl -n kube-system get helmchartconfig
This is where you can use the Helm chart values to change an addon's default installation.

Resolution

To edit the values of a Helm chart, you must find the currently installed version. To do this navigate to the RKE2 GitHub repository releases page to find the Packaged Component Versions (https://github.com/rancher/rke2/releases/) for the specific RKE release.

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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.