nri-memory-qos

by containers

Helm chartv0.15.2App v0.15.2Verified publisher

The memory-qos NRI plugin adds two methods for controlling cgroups v2 memory.* parameters: QoS class and direct memory annotations.

About this chart

Memory-QoS Plugin

This chart deploys memory-qos Node Resource Interface (NRI) plugin. The memory-qos NRI plugin adds two methods for controlling cgroups v2 memory.* parameters: QoS class and direct memory annotations.

Prerequisites

  • Kubernetes 1.24+
  • Helm 3.0.0+
  • Container runtime:
    • containerD:

      • At least containerd 1.7.0 release version to use the NRI feature.

      • Enable NRI feature by following these detailed instructions. You can optionally enable the NRI in containerd using the Helm chart during the chart installation simply by setting the nri.runtime.patchConfig parameter. For instance,

        helm install my-memory-qos nri-plugins/nri-memory-qos --set nri.runtime.patchConfig=true --namespace kube-system
        

        Enabling nri.runtime.patchConfig creates an init container to turn on NRI feature in containerd and only after that proceed the plugin installation.

    • CRI-O

      • At least v1.26.0 release version to use the NRI feature

      • Enable NRI feature by following these detailed instructions. You can optionally enable the NRI in CRI-O using the Helm chart during the chart installation simply by setting the nri.runtime.patchConfig parameter. For instance,

        helm install my-memory-qos nri-plugins/nri-memory-qos --namespace kube-system --set nri.runtime.patchConfig=true
        

Installing the Chart

Path to the chart: nri-memory-qos.

helm repo add nri-plugins https://containers.github.io/nri-plugins
helm install my-memory-qos nri-plugins/nri-memory-qos --namespace kube-system

The command above deploys memory-qos NRI plugin on the Kubernetes cluster within the kube-system namespace with default configuration. To customize the available parameters as described in the Configuration options below, you have two options: you can use the --set flag or create a custom values.yaml file and provide it using the -f flag. For example:

# Install the memory-qos plugin with custom values provided using the --set option
helm install my-memory-qos nri-plugins/nri-memory-qos --namespace kube-system --set nri.runtime.patchConfig=true
# Install the memory-qos plugin with custom values specified in a custom values.yaml file
cat <<EOF > myPath/values.yaml
nri:
  runtime:
    patchConfig: true
  plugin:
    index: 10

tolerations:
- key: "node-role.kubernetes.io/control-plane"
  operator: "Exists"
  effect: "NoSchedule"
EOF

helm install my-memory-qos nri-plugins/nri-memory-qos --namespace kube-system -f myPath/values.yaml

Uninstalling the Chart

To uninstall the memory-qos plugin run the following command:

helm delete my-memory-qos --namespace kube-system

Configuration options

The tables below present an overview of the parameters available for users to customize with their own values, along with the default values.

NameDefaultDescription
image.nameghcr.io/containers/nri-plugins/nri-memory-qoscontainer image name
image.tagunstablecontainer image tag
image.pullPolicyAlwaysimage pull policy
config.classesbronze (0.5), silver (0.2)Memory QoS classes selectable via class.memory-qos.nri.io. Each entry has a name and a swaplimitratio from 0 to 1. A custom list replaces the defaults.
config.unifiedAnnotations[memory.swap.max, memory.high]memory.* parameters that pods may set directly via <parameter>.memory-qos.nri.io annotations
resources.cpu10mcpu resources for the Pod
resources.memory100Mimemory qouta for the Pod
nri.runtime.config.pluginRegistrationTimeout""set NRI plugin registration timeout in NRI config of containerd or CRI-O
nri.runtime.config.pluginRequestTimeout""set NRI plugin request timeout in NRI config of containerd or CRI-O
nri.runtime.patchConfigfalsepatch NRI configuration in containerd or CRI-O
nri.plugin.index90NRI plugin index to register with
initImage.nameghcr.io/containers/nri-plugins/config-managerinit container image name
initImage.tagunstableinit container image tag
initImage.pullPolicyAlwaysinit container image pull policy
tolerations[]specify taint toleration key, operator and effect
affinity[]specify node affinity
nodeSelector[]specify node selector labels
podPriorityClassNodeCriticaltrueenable marking Pod as node critical

Deploy nri-memory-qos with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nri-memory-qos on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnri-memory-qos is pinned at v0.15.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply