From b0f1141ac55f7d1dbe5e389cebde67e2648a5ffc Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Thu, 3 Feb 2022 12:46:38 +0100
Subject: [PATCH] fix(longhorn): Reduce excessive resource allowcation

By default longhorn deploys with 12% cpu allocated node, that's quite a
lot and takes up 1/3 of the current cluster's CPU. Given how little of
the requested CPU is actually used, this patch reduces the CPU
allocation from 12% to 2%.

IMPORTANT: You should not apply this patch while any of your volumes are
still attached. Therefore scale down all deployments that use volumes,
update the setting, then scale up again.

References:
https://longhorn.io/docs/1.2.3/references/settings/#guaranteed-engine-manager-cpu
https://longhorn.io/docs/1.2.3/references/settings/#guaranteed-replica-manager-cpu
---
 infrastructure/longhorn/release.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/infrastructure/longhorn/release.yaml b/infrastructure/longhorn/release.yaml
index f7e06aa7a..0043e93ca 100644
--- a/infrastructure/longhorn/release.yaml
+++ b/infrastructure/longhorn/release.yaml
@@ -25,6 +25,8 @@ spec:
       defaultClassReplicaCount: 2
     defaultSettings:
       concurrentAutomaticEngineUpgradePerNodeLimit: 1
+      guaranteedEngineManagerCPU: 2
+      guaranteedReplicaManagerCPU: 2
     longhornManager:
       priorityClass: system-cluster-critical
     longhornDriver:
-- 
GitLab