From 12023b7f02070987b465fb6cd45dd021fd3978f8 Mon Sep 17 00:00:00 2001 From: Nikita <166552198+nbykov0@users.noreply.github.com> Date: Tue, 30 Dec 2025 13:55:05 +0300 Subject: [PATCH] [multus] Increase memory limit (#1773) ## What this PR does Increases multus memory limit. Based on multiple community reports stating that multus tend to consume a lot of memory during startup after a node reboot. ### Release note ```release-note Multus memory limit increased. ``` --- packages/system/multus/Makefile | 5 +- .../multus/patches/customize-deployment.patch | 49 +++++++++++++++++++ .../templates/multus-daemonset-thick.yml | 2 +- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 packages/system/multus/patches/customize-deployment.patch diff --git a/packages/system/multus/Makefile b/packages/system/multus/Makefile index 7825bd5e..b7ae5bfc 100644 --- a/packages/system/multus/Makefile +++ b/packages/system/multus/Makefile @@ -9,6 +9,5 @@ update: mkdir templates $(eval RELEASE := $(shell curl -s https://api.github.com/repos/k8snetworkplumbingwg/multus-cni/releases/latest?per_page=1 | jq -r '.name')) wget -q https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/refs/tags/$(RELEASE)/deployments/multus-daemonset-thick.yml -O templates/multus-daemonset-thick.yml - sed -i 's/namespace: kube-system/namespace: $(NAMESPACE)/;/multus-cni/s/snapshot-thick/$(RELEASE)-thick/' templates/multus-daemonset-thick.yml && \ - sed -i '/name:/s/kube-multus-ds/cozy-multus/;/memory:/s/"50Mi"/"100Mi"/' templates/multus-daemonset-thick.yml - + sed -i '/multus-cni/s/snapshot-thick/$(RELEASE)-thick/' templates/multus-daemonset-thick.yml && \ + patch --no-backup-if-mismatch -p4 < patches/customize-deployment.patch diff --git a/packages/system/multus/patches/customize-deployment.patch b/packages/system/multus/patches/customize-deployment.patch new file mode 100644 index 00000000..7ea3aeeb --- /dev/null +++ b/packages/system/multus/patches/customize-deployment.patch @@ -0,0 +1,49 @@ +--- a/packages/system/multus/templates/multus-daemonset-thick.yml ++++ b/packages/system/multus/templates/multus-daemonset-thick.yml +@@ -93,19 +93,19 @@ roleRef: + subjects: + - kind: ServiceAccount + name: multus +- namespace: kube-system ++ namespace: cozy-multus + --- + apiVersion: v1 + kind: ServiceAccount + metadata: + name: multus +- namespace: kube-system ++ namespace: cozy-multus + --- + kind: ConfigMap + apiVersion: v1 + metadata: + name: multus-daemon-config +- namespace: kube-system ++ namespace: cozy-multus + labels: + tier: node + app: multus +@@ -125,8 +125,8 @@ data: + apiVersion: apps/v1 + kind: DaemonSet + metadata: +- name: kube-multus-ds +- namespace: kube-system ++ name: cozy-multus ++ namespace: cozy-multus + labels: + tier: node + app: multus +@@ -159,10 +159,10 @@ spec: + resources: + requests: + cpu: "100m" +- memory: "50Mi" ++ memory: "100Mi" + limits: + cpu: "100m" +- memory: "50Mi" ++ memory: "900Mi" + securityContext: + privileged: true + terminationMessagePolicy: FallbackToLogsOnError diff --git a/packages/system/multus/templates/multus-daemonset-thick.yml b/packages/system/multus/templates/multus-daemonset-thick.yml index 7d99ab98..ba7eedfb 100644 --- a/packages/system/multus/templates/multus-daemonset-thick.yml +++ b/packages/system/multus/templates/multus-daemonset-thick.yml @@ -162,7 +162,7 @@ spec: memory: "100Mi" limits: cpu: "100m" - memory: "300Mi" + memory: "900Mi" securityContext: privileged: true terminationMessagePolicy: FallbackToLogsOnError