From 500adad67ee2da00b94767c9eb284127f752cd7f Mon Sep 17 00:00:00 2001 From: Kaustubh Dhokte Date: Fri, 8 Jul 2022 23:20:13 +0000 Subject: [PATCH] Debian: Add metrics-server to platform namespaces This change https://review.opendev.org/c/starlingx/integ/+/834215 adds metrics-server to the list of platform namespaces for k8s 1.23.1. Apparently, Debian package for k8s 1.23.1 was not added when above change was created. Note: The patch was copied from centos/files. Test Plan: Pass: Package builds successfully PASS: Image built and deployed successfully. PASS: Apply metrics-server and verify that metrics-server is running on platform CPUs. Closes-Bug: 1964503 Signed-off-by: Kaustubh Dhokte Change-Id: I989be27416f388dc0ff46a820b8fa3a276600737 --- ...ger-infra-pods-use-system-reserved-CP.patch} | 17 +++++++++-------- .../debian/deb_folder/patches/series | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) rename kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/{kubelet-cpumanager-infrastructure-pods-use-system-re.patch => kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch} (92%) diff --git a/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/kubelet-cpumanager-infrastructure-pods-use-system-re.patch b/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch similarity index 92% rename from kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/kubelet-cpumanager-infrastructure-pods-use-system-re.patch rename to kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch index 623c2a6e5..6715693a1 100644 --- a/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/kubelet-cpumanager-infrastructure-pods-use-system-re.patch +++ b/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch @@ -1,15 +1,14 @@ -From 2f16a9e2c8dc5995aad9a04636ff4f20cb7b51c7 Mon Sep 17 00:00:00 2001 +From c143985b9f9390c59ebdccfdbe160f63008abebb Mon Sep 17 00:00:00 2001 From: Gleb Aronsky -Date: Tue, 25 Jan 2022 12:35:48 -0500 -Subject: [PATCH] kubelet cpumanager infrastructure pods use system reserved - CPUs +Date: Mon, 21 Mar 2022 17:25:07 -0300 +Subject: [PATCH] kubelet cpumanager infra pods use system reserved CPUs This assigns system infrastructure pods to the "reserved" cpuset 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 or flux-helm namespaces. +notification, flux-helm or metrics-server namespaces. The implementation is a bit simplistic, it is assumed that the "reserved" cpuset is large enough to handle all infrastructure pods @@ -19,13 +18,15 @@ This also prevents infrastucture pods from using Guaranteed resources. Co-authored-by: Jim Gauld Signed-off-by: Gleb Aronsky +Signed-off-by: Thiago Miranda +Signed-off-by: Kaustubh Dhokte --- 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 9697f4d4bb0..aeac7fdc8cb 100644 +index 9697f4d4bb0..f603daf4c88 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 { @@ -34,7 +35,7 @@ index 9697f4d4bb0..aeac7fdc8cb 100644 +// Define namespaces used by platform infrastructure pods +var infraNamespaces = [...]string{ -+ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", ++ "kube-system", "armada", "cert-manager", "platform-deployment-manager", "portieris", "vault", "notification", "flux-helm", "metrics-server", +} + // staticPolicy is a CPU manager policy that does not change CPU @@ -145,5 +146,5 @@ index 80bd04a1f92..34c5a23c553 100644 testExcl := true -- -2.25.1 +2.30.2 diff --git a/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/series b/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/series index a00bce212..bd147f251 100644 --- a/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/series +++ b/kubernetes/kubernetes-1.23.1/debian/deb_folder/patches/series @@ -1,6 +1,6 @@ kubelet-cpumanager-disable-CFS-quota-throttling-for-.patch kubelet-cpumanager-keep-normal-containers-off-reserv.patch -kubelet-cpumanager-infrastructure-pods-use-system-re.patch +kubelet-cpumanager-infra-pods-use-system-reserved-CP.patch kubelet-cpumanager-introduce-concept-of-isolated-CPU.patch kubeadm-create-platform-pods-with-zero-CPU-resources.patch enable-support-for-kubernetes-to-ignore-isolcpus.patch