Add intel-power and power-metrics to list of platform namespace

The intel-power and power-metrics namespace are used by
Kubernetes Power Manager [1] and  Power Metrics [2] StarlingX
platform applications. Therefore, their pods have to run at platform
cores.

[1] https://opendev.org/starlingx/app-kubernetes-power-manager
[2] https://opendev.org/starlingx/app-power-metrics

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

Story: 2010773
Task: 48414

Depends-On: https://review.opendev.org/c/starlingx/integ/+/887743

Change-Id: I3d4487bdd09157f687329a61cc069816965372e1
Signed-off-by: Marcos Paulo Oliveira Silva <Marcos.PauloOliveiraSilva@windriver.com>
Co-Authored-By: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
This commit is contained in:
Marcos Paulo Oliveira Silva 2023-07-18 16:08:14 -03:00 committed by Alyson Deives Pereira
parent 2e21b87d62
commit c22bd63e65
3 changed files with 40 additions and 38 deletions

View File

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

View File

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

View File

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