Add sriov-fec-system namespace to the platform infra list in kubelet

Currently the pods installed in the sriov-fec-operator namespace run
on application cores. The sriov-fec-operator App is seen
as a platform app and therefore its pods need to run on platform
cores.

Accordingly, add the sriov-fec-system namespace to the list of
platform namespaces in kubelet.

Test Plan:
PASS - Verify if the pods are running at the platform cores

Story: 2010826
Task: 48628

Change-Id: I521deeef06a4073516c3a7d06ff8dd4308f7b6bb
Signed-off-by: Marcos Paulo Oliveira Silva <Marcos.PauloOliveiraSilva@windriver.com>
This commit is contained in:
Marcos Paulo Oliveira Silva 2023-08-15 23:06:24 -03:00
parent a140a14ee4
commit 5bf031d65c
3 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,6 @@
From d4515b56b7b0e625de279b7094123199004b23be Mon Sep 17 00:00:00 2001
From 42ecf1cfaee7f9a5f16643465a964cfda25efaec Mon Sep 17 00:00:00 2001
From: Gleb Aronsky <gleb.aronsky@windriver.com>
Date: Thu, 20 Jul 2023 11:56:02 -0300
Date: Tue, 15 Aug 2023 22:13:29 -0300
Subject: [PATCH] kubelet cpumanager infra pods use system reserved CPUs
This assigns system infrastructure pods to the "reserved" cpuset
@ -9,7 +9,7 @@ to isolate them from the shared pool of CPUs.
Infrastructure pods include any pods that belong to the kube-system,
armada, cert-manager, vault, platform-deployment-manager, portieris,
notification, flux-helm, metrics-server, node-feature-discovery,
intel-power or power-metrics namespaces.
intel-power, power-metrics or sriov-fec-system namespaces.
The implementation is a bit simplistic, it is assumed that the
"reserved" cpuset is large enough to handle all infrastructure pods
@ -23,6 +23,7 @@ Signed-off-by: Thiago Miranda <ThiagoOliveira.Miranda@windriver.com>
Signed-off-by: Kaustubh Dhokte <kaustubh.dhokte@windriver.com>
Signed-off-by: Marcos Silva <Marcos.PauloOliveiraSilva@windriver.com>
Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
Signed-off-by: Marcos Silva <Marcos.PauloOliveiraSilva@windriver.com>
---
pkg/kubelet/cm/cpumanager/policy_static.go | 47 +++++++++++++++++--
@ -30,7 +31,7 @@ Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
2 files changed, 61 insertions(+), 5 deletions(-)
diff --git a/pkg/kubelet/cm/cpumanager/policy_static.go b/pkg/kubelet/cm/cpumanager/policy_static.go
index 09e0fc0ea0e..7324c336bd3 100644
index 09e0fc0ea0e..216b6ce9bf8 100644
--- a/pkg/kubelet/cm/cpumanager/policy_static.go
+++ b/pkg/kubelet/cm/cpumanager/policy_static.go
@@ -53,6 +53,11 @@ func (e SMTAlignmentError) Type() string {
@ -39,7 +40,7 @@ index 09e0fc0ea0e..7324c336bd3 100644
+// Define namespaces used by platform infrastructure pods
+var infraNamespaces = [...]string{
+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", "intel-power", "power-metrics",
+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", "intel-power", "power-metrics", "sriov-fec-system",
+}
+
// staticPolicy is a CPU manager policy that does not change CPU

View File

@ -1,6 +1,6 @@
From caca0eeed178fbde75d8b99db611f9c63af6b904 Mon Sep 17 00:00:00 2001
From 727313d6272fe7905a88fc403b27f4a6febd1369 Mon Sep 17 00:00:00 2001
From: Ramesh Kumar Sivanandam <rameshkumar.sivanandam@windriver.com>
Date: Thu, 20 Jul 2023 19:04:07 -0300
Date: Tue, 15 Aug 2023 22:57:13 -0300
Subject: [PATCH] kubelet cpumanager infra pods use system reserved CPUs
This assigns system infrastructure pods to the "reserved" cpuset
@ -9,7 +9,7 @@ to isolate them from the shared pool of CPUs.
Infrastructure pods include any pods that belong to the kube-system,
armada, cert-manager, vault, platform-deployment-manager, portieris,
notification, flux-helm, metrics-server, node-feature-discovery,
intel-power or power-metrics namespaces.
intel-power, power-metrics or sriov-fec-system namespaces.
The implementation is a bit simplistic, it is assumed that the
"reserved" cpuset is large enough to handle all infrastructure pods
@ -24,6 +24,7 @@ Signed-off-by: Kaustubh Dhokte <kaustubh.dhokte@windriver.com>
Signed-off-by: Ramesh Kumar Sivanandam <rameshkumar.sivanandam@windriver.com>
Signed-off-by: Marcos Silva <Marcos.PauloOliveiraSilva@windriver.com>
Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
Signed-off-by: Marcos Silva <Marcos.PauloOliveiraSilva@windriver.com>
---
pkg/kubelet/cm/cpumanager/policy_static.go | 38 +++++++++++++++++++
@ -31,7 +32,7 @@ Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/pkg/kubelet/cm/cpumanager/policy_static.go b/pkg/kubelet/cm/cpumanager/policy_static.go
index 14a6e7af9be..64bf2832bf3 100644
index 14a6e7af9be..4fc96303622 100644
--- a/pkg/kubelet/cm/cpumanager/policy_static.go
+++ b/pkg/kubelet/cm/cpumanager/policy_static.go
@@ -53,6 +53,11 @@ func (e SMTAlignmentError) Type() string {
@ -40,7 +41,7 @@ index 14a6e7af9be..64bf2832bf3 100644
+// Define namespaces used by platform infrastructure pods
+var infraNamespaces = [...]string{
+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", "intel-power", "power-metrics",
+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", "intel-power", "power-metrics", "sriov-fec-system",
+}
+
// staticPolicy is a CPU manager policy that does not change CPU

View File

@ -1,6 +1,6 @@
From 32a8a49d7cd66262d6fc88337b5ee828f8f51af8 Mon Sep 17 00:00:00 2001
From b6a88b7063cdf3384e3fe37474a7388847a9cf43 Mon Sep 17 00:00:00 2001
From: Ramesh Kumar Sivanandam <rameshkumar.sivanandam@windriver.com>
Date: Thu, 20 Jul 2023 19:54:11 -0300
Date: Tue, 15 Aug 2023 23:03:53 -0300
Subject: [PATCH 07/10] kubelet cpumanager infra pods use system reserved CPUs
This assigns system infrastructure pods to the "reserved" cpuset
@ -9,7 +9,7 @@ to isolate them from the shared pool of CPUs.
Infrastructure pods include any pods that belong to the kube-system,
armada, cert-manager, vault, platform-deployment-manager, portieris,
notification, flux-helm, metrics-server, node-feature-discovery,
intel-power or power-metrics namespaces.
intel-power, power-metrics or sriov-fec-system namespaces.
The implementation is a bit simplistic, it is assumed that the
"reserved" cpuset is large enough to handle all infrastructure pods
@ -25,13 +25,15 @@ Signed-off-by: Ramesh Kumar Sivanandam <rameshkumar.sivanandam@windriver.com>
Signed-off-by: Sachin Gopala Krishna <saching.krishna@windriver.com>
Signed-off-by: Marcos Silva <Marcos.PauloOliveiraSilva@windriver.com>
Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
Signed-off-by: Marcos Silva <Marcos.PauloOliveiraSilva@windriver.com>
---
pkg/kubelet/cm/cpumanager/policy_static.go | 50 ++++++++++++++++---
.../cm/cpumanager/policy_static_test.go | 19 ++++++-
2 files changed, 62 insertions(+), 7 deletions(-)
diff --git a/pkg/kubelet/cm/cpumanager/policy_static.go b/pkg/kubelet/cm/cpumanager/policy_static.go
index 4c4164a9099..f685a9a4d2b 100644
index 4c4164a9099..26eb400cee6 100644
--- a/pkg/kubelet/cm/cpumanager/policy_static.go
+++ b/pkg/kubelet/cm/cpumanager/policy_static.go
@@ -56,6 +56,11 @@ func (e SMTAlignmentError) Type() string {
@ -40,7 +42,7 @@ index 4c4164a9099..f685a9a4d2b 100644
+// Define namespaces used by platform infrastructure pods
+var infraNamespaces = [...]string{
+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", "intel-power", "power-metrics",
+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", "intel-power", "power-metrics", "sriov-fec-system",
+}
+
// staticPolicy is a CPU manager policy that does not change CPU