From 2e21b87d620afcec6bd8bf403941bb1fd82739be Mon Sep 17 00:00:00 2001 From: Marcos Paulo Oliveira Silva Date: Wed, 5 Jul 2023 15:46:54 -0300 Subject: [PATCH] Add the NFD namespace to the platform infrastructure list in kubelet Actually, the pods installed in the node-feature-discovery namespace run on application cores. Although, the Node Feature Discovery App is seen as a platform app, and therefore, its pods need to run on platform cores. So, in this change, the node-feature-discovery namespace will be added in the platform infrastructure list via kubelet patch. Test Plan: PASS - Verify if the pods are running at the platform cores Story: 2010769 Task: 48327 Change-Id: If3fa8cb25050eb70c45bee54d7cf8fbfe9695d2d Signed-off-by: Marcos Paulo Oliveira Silva --- ...anager-infra-pods-use-system-reserved-CP.patch | 15 +++++++++------ ...anager-infra-pods-use-system-reserved-CP.patch | 13 ++++++++----- ...anager-infra-pods-use-system-reserved-CP.patch | 13 ++++++++----- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch b/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch index 9b3082bb2..6d4575939 100644 --- a/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch +++ b/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch @@ -1,6 +1,6 @@ -From 70399c6eebe5216332e77b0f56ace7028168c726 Mon Sep 17 00:00:00 2001 +From 225ee21e2925a9f0a4495c1257dd9f4ccb9306f2 Mon Sep 17 00:00:00 2001 From: Gleb Aronsky -Date: Mon, 21 Mar 2022 17:25:07 -0300 +Date: Thu, 20 Jul 2023 11:56:02 -0300 Subject: [PATCH] kubelet cpumanager infra pods use system reserved CPUs This assigns system infrastructure pods to the "reserved" cpuset @@ -8,7 +8,8 @@ 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 or metrics-server namespaces. +notification, flux-helm, metrics-server or node-feature-discovery +namespaces. The implementation is a bit simplistic, it is assumed that the "reserved" cpuset is large enough to handle all infrastructure pods @@ -20,13 +21,15 @@ Co-authored-by: Jim Gauld Signed-off-by: Gleb Aronsky Signed-off-by: Thiago Miranda Signed-off-by: Kaustubh Dhokte +Signed-off-by: Marcos Silva + --- pkg/kubelet/cm/cpumanager/policy_static.go | 47 +++++++++++++++++-- .../cm/cpumanager/policy_static_test.go | 19 +++++++- 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..a3c93a896df 100644 +index 09e0fc0ea0e..8f7ffd136f2 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 { @@ -35,7 +38,7 @@ index 09e0fc0ea0e..a3c93a896df 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", ++ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", +} + // staticPolicy is a CPU manager policy that does not change CPU @@ -109,7 +112,7 @@ index 09e0fc0ea0e..a3c93a896df 100644 + return false +} diff --git a/pkg/kubelet/cm/cpumanager/policy_static_test.go b/pkg/kubelet/cm/cpumanager/policy_static_test.go -index 81251e576fd..d4b4b790210 100644 +index edfb40d880e..7938f787a57 100644 --- a/pkg/kubelet/cm/cpumanager/policy_static_test.go +++ b/pkg/kubelet/cm/cpumanager/policy_static_test.go @@ -886,7 +886,8 @@ func TestStaticPolicyStartWithResvList(t *testing.T) { diff --git a/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch b/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch index 0926010a2..a7fff61a2 100644 --- a/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch +++ b/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch @@ -1,6 +1,6 @@ -From 17a648868f4e0c09d7dda5b157dc2286ff20383c Mon Sep 17 00:00:00 2001 +From 0b816203bf49236c9e5393a540af22da42130be2 Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Sivanandam -Date: Mon, 7 Nov 2022 09:48:01 -0500 +Date: Thu, 20 Jul 2023 19:04:07 -0300 Subject: [PATCH] kubelet cpumanager infra pods use system reserved CPUs This assigns system infrastructure pods to the "reserved" cpuset @@ -8,7 +8,8 @@ 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 or metrics-server namespaces. +notification, flux-helm, metrics-server or node-feature-discovery +namespaces. The implementation is a bit simplistic, it is assumed that the "reserved" cpuset is large enough to handle all infrastructure pods @@ -21,13 +22,15 @@ Signed-off-by: Gleb Aronsky Signed-off-by: Thiago Miranda Signed-off-by: Kaustubh Dhokte Signed-off-by: Ramesh Kumar Sivanandam +Signed-off-by: Marcos Silva + --- pkg/kubelet/cm/cpumanager/policy_static.go | 38 +++++++++++++++++++ .../cm/cpumanager/policy_static_test.go | 19 +++++++++- 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..341e9f3dffe 100644 +index 14a6e7af9be..a7df20bc704 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 { @@ -36,7 +39,7 @@ index 14a6e7af9be..341e9f3dffe 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", ++ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", +} + // staticPolicy is a CPU manager policy that does not change CPU diff --git a/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch b/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch index 2f60d6604..65927c50a 100644 --- a/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch +++ b/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch @@ -1,6 +1,6 @@ -From 6c9e22271647302c86578243de6d124ede78d829 Mon Sep 17 00:00:00 2001 +From 318e3760511a6cba2a8233ba29173ad6b00f9d1e Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Sivanandam -Date: Mon, 7 Nov 2022 09:48:01 -0500 +Date: Thu, 20 Jul 2023 19:54:11 -0300 Subject: [PATCH 07/10] kubelet cpumanager infra pods use system reserved CPUs This assigns system infrastructure pods to the "reserved" cpuset @@ -8,7 +8,8 @@ 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 or metrics-server namespaces. +notification, flux-helm, metrics-server or node-feature-discovery +namespaces. The implementation is a bit simplistic, it is assumed that the "reserved" cpuset is large enough to handle all infrastructure pods @@ -22,13 +23,15 @@ Signed-off-by: Thiago Miranda Signed-off-by: Kaustubh Dhokte Signed-off-by: Ramesh Kumar Sivanandam Signed-off-by: Sachin Gopala Krishna +Signed-off-by: Marcos Silva + --- 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..180d018565c 100644 +index 4c4164a9099..c1066913bd9 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 { @@ -37,7 +40,7 @@ index 4c4164a9099..180d018565c 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", ++ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", "node-feature-discovery", +} + // staticPolicy is a CPU manager policy that does not change CPU