Configuring Add-on Resource Requests and Limits

PMK allows the users to set the request and limits of an add-on. This guide walks through the steps involved in setting these resources, as well as, describes the available resource fields per add-on.

How to use this feature

  • On the workload cluster, list the add-ons to ensure that the add-on you are looking to modify is available.

  • Pick the add-on you wish to add resource specifications to. In this example, we will use metalLB. Edit the metalLB add-on object, and add the following fields to it under the override.params section:

  • Save and exit.

kubectl get addons -n pf9-addons
NAME AGE
700213ef-3a4b-4777-8d42-ca4017494b52-coredns 20d
700213ef-3a4b-4777-8d42-ca4017494b52-kubernetes-dashboard 20d
700213ef-3a4b-4777-8d42-ca4017494b52-metallb 20d
700213ef-3a4b-4777-8d42-ca4017494b52-metrics-server 20d
700213ef-3a4b-4777-8d42-ca4017494b52-monitoring 20d
apiVersion: agent.pf9.io/v1
kind: Addon
metadata:
creationTimestamp: "2024-04-15T20:46:04Z"
finalizers:
- addons.pf9.io
generation: 2
name: 700213ef-3a4b-4777-8d42-ca4017494b52-metallb
namespace: pf9-addons
resourceVersion: "2657929"
uid: 5aa4a33f-1869-4ae2-a606-c04143272988
spec:
clusterID: 700213ef-3a4b-4777-8d42-ca4017494b52
override:
params:
- name: MetallbIpRange
value: 192.168.78.79-192.168.78.99
- name: controllerCPULimit #<----------
value: 534m #<----------
- name: controllerMemoryLimit #<----------
value: 525Mi #<----------
- name: speakerCPULimit #<----------
value: 546m #<----------
- name: speakerMemoryLimit #<----------
Important

It is important to set the localOverride field in the addon object. Without this set, the default behavior of sunpike being the source of truth will continue.

If there is a key in the override list that the addon operator does not recognize, it will simply ignore it.

  • Once these fields are set, you will see the values showing up on the actual addon objects.

kubectl get ds -n metallb-system speaker -o yaml | yq .spec.template.spec.containers[0].resources
limits:
cpu: 546m
memory: 533Mi
requests:
cpu: 46m
memory: 33Mi
kubectl get deploy -n metallb-system controller -o yaml | yq .spec.template.spec.containers[0].resources
limits:
cpu: 534m
memory: 525Mi
requests:
cpu: 34m
memory: 25Mi

Reference

The list of supported resource field names per addon is as follows:

Cluster Autoscaler (AWS)

limit:
cpuLimit | default "200m"
memoryLimit | default "600Mi"
requests:
cpuRequest | default "100m"
memoryRequest | default "300Mi"

CoreDNS

limits:
dnsCPULimit | default "1"
dnsMemoryLimit (this is a required field; left as is to maintain backward compatibility)
dnsAutoscalerCPULimit | default "200m"
dnsAutoscalerMemoryLimit | default "600Mi"
requests:
dnsCPURequest | default "100m"
dnsMemoryRequest | default "70Mi"
dnsAutoscalerCPURequest | default "20m"
dnsAutoscalerMemoryRequest | default "10Mi"

Kubernetes Dashboard

limits:
metricsScraperCPULimit | default "100m"
metricsScraperMemoryLimit | default "300Mi"
dashboardCPULimit | default "2000m"
dashboardMemoryLimit | default "2Gi"
requests:
metricsScraperCPURequest | default "10m"
metricsScraperMemoryRequest | default "50Mi"
dashboardCPURequest | default "200m"
dashboardMemoryRequest | default "100Mi"

Kubevirt

limits:
CDIOperatorCPULimit | default "100m"
CDIOperatorMemoryLimit | default "300Mi"
virtOperatorCPULimit | default "100m"
virtOperatorMemoryLimit | default "1Gi"
vncCPULimit | default "500m"
vncMemoryLimit | default "500Mi"
requests:
CDIOperatorCPURequest | default "10m"
CDIOperatorMemoryRequest | default "150Mi"
virtOperatorCPURequest | default "10m"
virtOperatorMemoryRequest | default "450Mi"
vncCPURequest | default "10m"
vncMemoryRequest | default "10Mi"

Luigi (Advanced Networking Operator)

limits:
luigiCPULimit | default "100m"
luigiMemoryLimit | default "128Mi"
requests:
luigiCPURequest | default "50m"
luigiMemoryRequest | default "64Mi"

MetalLB

limits:
controllerCPULimit | default "500m"
controllerMemoryLimit | default "500Mi"
speakerCPULimit | default "500m"
speakerMemoryLimit | default "500Mi"
requests:
controllerCPURequest | default "100m"
controllerMemoryRequest | default "100Mi"
speakerCPURequest | default "100m"
speakerMemoryRequest | default "100Mi"

Metrics Server

limits:
metricsCpuLimit | default "100m"
metricsMemoryLimit | default "300Mi"
requests:
metricsCpuRequest | default "5m"
metricsMemoryRequest | default "50Mi"

Monitoring

limits:
grafanaCPULimit | default "1000m"
grafanaMemoryLimit | default "512Mi"
ksmCPULimit | default "300m"
ksmMemoryLimit | default "300Mi"
monhelperCPULimit | default "200m"
monhelperMemoryLimit | default "100Mi
nodeExporterCPULimit | default "250m"
nodeExporterMemoryLimit | default "180Mi"
prometheusOperatorCPULimit | default "200m"
prometheusOperatorMemoryLimit | default "200Mi"
requests:
grafanaCPURequest | default "100m"
grafanaMemoryRequest | default "256Mi"
ksmCPURequest | default "100m"
ksmMemoryRequest | default "150Mi"
monhelperCPURequest | default "25m"
monhelperMemoryRequest | default "25Mi"
nodeExporterCPURequest | default "100m"


  Last updated