From 6a22b3adfee6292d1313971634a1232b9e51b757 Mon Sep 17 00:00:00 2001 From: Boovan Rajendran Date: Thu, 12 Sep 2024 07:54:57 -0400 Subject: [PATCH] Set CoreDNS memory request to zero. This update modifies the Kubernetes patch kubeadm-create-platform-pods-with-zero-CPU-resources.patch to set the CoreDNS memory request to zero. Test Plan: PASS: Run all Kubelet, kubeadm, kubectl make tests for affected code. PASS: All affected versions of kubernetes package build successfully. PASS: Verify the CoreDNS pod by describing it and ensure that the memory request is set to zero. Story: 2011047 Task: 51024 Change-Id: If1ed7346817cc0de01589afb5add15c2f1621d54 Signed-off-by: Boovan Rajendran --- ...latform-pods-with-zero-CPU-resources.patch | 62 ++++++++++-------- ...latform-pods-with-zero-CPU-resources.patch | 64 +++++++++++-------- ...latform-pods-with-zero-CPU-resources.patch | 54 +++++++++------- ...latform-pods-with-zero-CPU-resources.patch | 51 +++++++++------ ...latform-pods-with-zero-CPU-resources.patch | 52 +++++++++------ ...latform-pods-with-zero-CPU-resources.patch | 51 +++++++++------ 6 files changed, 196 insertions(+), 138 deletions(-) diff --git a/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch b/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch index c66a4e40c..997475096 100644 --- a/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch +++ b/kubernetes/kubernetes-1.24.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch @@ -1,4 +1,4 @@ -From de653bd0823b248d623a39c17a3872e85ce952b0 Mon Sep 17 00:00:00 2001 +From 38a9c61d87efb1385c8cf372bf013465d52632a1 Mon Sep 17 00:00:00 2001 From: Chris Friesen Date: Fri, 3 Sep 2021 18:05:15 -0400 Subject: [PATCH] kubeadm: create platform pods with zero CPU resources @@ -7,76 +7,86 @@ We want to specify zero CPU resources when creating the manifests for the static platform pods, as a workaround for the lack of separate resource tracking for platform resources. -We also specify zero CPU resources for the coredns deployment. -manifests.go appears to be the main file for this, not sure if the -others are used but I changed them just in case. +We also specify zero CPU and Memory resources for the +coredns deployment. +manifests.go appears to be the main file for this, not +sure if the others are used but I changed them just in case. Signed-off-by: Daniel Safta +Signed-off-by: Boovan Rajendran --- - cluster/addons/dns/coredns/coredns.yaml.base | 2 +- - cluster/addons/dns/coredns/coredns.yaml.in | 2 +- - cluster/addons/dns/coredns/coredns.yaml.sed | 2 +- - cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- + cluster/addons/dns/coredns/coredns.yaml.base | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.in | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.sed | 4 ++-- + cmd/kubeadm/app/phases/addons/dns/manifests.go | 4 ++-- cmd/kubeadm/app/phases/controlplane/manifests.go | 6 +++--- - 5 files changed, 7 insertions(+), 7 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base -index 4ee054f8ba5..d2b58f4af0e 100644 +index dea3749f217..908fd2b246a 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base -@@ -138,7 +138,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: __DNS__MEMORY__LIMIT__ requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in -index 1f791e447c9..ff03a801646 100644 +index 808dd54b545..1bc9c632a3a 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in -@@ -138,7 +138,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: 'dns_memory_limit' requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed -index 4d64278aaa4..38fc9196b28 100644 +index 8788f41d31c..5be046ad844 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed -@@ -138,7 +138,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: $DNS_MEMORY_LIMIT requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go -index 3ac6856bfc6..0763b4c63db 100644 +index 97c7f8b3e60..87df378cfc0 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go -@@ -95,7 +95,7 @@ spec: +@@ -95,8 +95,8 @@ spec: limits: memory: 170Mi requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go -index 8181bea63a4..4c4b4448dd4 100644 +index 8cd0bf577cd..b024263d8d1 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go +++ b/cmd/kubeadm/app/phases/controlplane/manifests.go -@@ -60,7 +60,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap +@@ -63,7 +63,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap LivenessProbe: staticpodutil.LivenessProbe(staticpodutil.GetAPIServerProbeAddress(endpoint), "/livez", int(endpoint.BindPort), v1.URISchemeHTTPS), ReadinessProbe: staticpodutil.ReadinessProbe(staticpodutil.GetAPIServerProbeAddress(endpoint), "/readyz", int(endpoint.BindPort), v1.URISchemeHTTPS), StartupProbe: staticpodutil.StartupProbe(staticpodutil.GetAPIServerProbeAddress(endpoint), "/livez", int(endpoint.BindPort), v1.URISchemeHTTPS, cfg.APIServer.TimeoutForControlPlane), @@ -85,7 +95,7 @@ index 8181bea63a4..4c4b4448dd4 100644 Env: kubeadmutil.GetProxyEnvVars(), }, mounts.GetVolumes(kubeadmconstants.KubeAPIServer), map[string]string{kubeadmconstants.KubeAPIServerAdvertiseAddressEndpointAnnotationKey: endpoint.String()}), -@@ -72,7 +72,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap +@@ -75,7 +75,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeControllerManager)), LivenessProbe: staticpodutil.LivenessProbe(staticpodutil.GetControllerManagerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeControllerManagerPort, v1.URISchemeHTTPS), StartupProbe: staticpodutil.StartupProbe(staticpodutil.GetControllerManagerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeControllerManagerPort, v1.URISchemeHTTPS, cfg.APIServer.TimeoutForControlPlane), @@ -94,7 +104,7 @@ index 8181bea63a4..4c4b4448dd4 100644 Env: kubeadmutil.GetProxyEnvVars(), }, mounts.GetVolumes(kubeadmconstants.KubeControllerManager), nil), kubeadmconstants.KubeScheduler: staticpodutil.ComponentPod(v1.Container{ -@@ -83,7 +83,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap +@@ -86,7 +86,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeScheduler)), LivenessProbe: staticpodutil.LivenessProbe(staticpodutil.GetSchedulerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeSchedulerPort, v1.URISchemeHTTPS), StartupProbe: staticpodutil.StartupProbe(staticpodutil.GetSchedulerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeSchedulerPort, v1.URISchemeHTTPS, cfg.APIServer.TimeoutForControlPlane), @@ -104,5 +114,5 @@ index 8181bea63a4..4c4b4448dd4 100644 }, mounts.GetVolumes(kubeadmconstants.KubeScheduler), nil), } -- -2.17.1 +2.25.1 diff --git a/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch b/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch index 14e530c73..449e3dea8 100644 --- a/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch +++ b/kubernetes/kubernetes-1.25.3/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch @@ -1,82 +1,92 @@ -From de653bd0823b248d623a39c17a3872e85ce952b0 Mon Sep 17 00:00:00 2001 +From 1b5417b7c443c94ebce52df7d4b373242ba800c6 Mon Sep 17 00:00:00 2001 From: Chris Friesen Date: Fri, 3 Sep 2021 18:05:15 -0400 -Subject: [PATCH 5/7] kubeadm: create platform pods with zero CPU resources +Subject: [PATCH] kubeadm: create platform pods with zero CPU resources We want to specify zero CPU resources when creating the manifests for the static platform pods, as a workaround for the lack of separate resource tracking for platform resources. -We also specify zero CPU resources for the coredns deployment. -manifests.go appears to be the main file for this, not sure if the -others are used but I changed them just in case. +We also specify zero CPU and Memory resources for the +coredns deployment. +manifests.go appears to be the main file for this, not +sure if the others are used but I changed them just in case. Signed-off-by: Daniel Safta +Signed-off-by: Boovan Rajendran --- - cluster/addons/dns/coredns/coredns.yaml.base | 2 +- - cluster/addons/dns/coredns/coredns.yaml.in | 2 +- - cluster/addons/dns/coredns/coredns.yaml.sed | 2 +- - cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- + cluster/addons/dns/coredns/coredns.yaml.base | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.in | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.sed | 4 ++-- + cmd/kubeadm/app/phases/addons/dns/manifests.go | 4 ++-- cmd/kubeadm/app/phases/controlplane/manifests.go | 6 +++--- - 5 files changed, 7 insertions(+), 7 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base -index 4ee054f8ba5..d2b58f4af0e 100644 +index e03559423e6..49e88afc976 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base -@@ -138,7 +138,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: __DNS__MEMORY__LIMIT__ requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in -index 1f791e447c9..ff03a801646 100644 +index 9b241370bea..78a23317b56 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in -@@ -138,7 +138,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: 'dns_memory_limit' requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed -index 4d64278aaa4..38fc9196b28 100644 +index 561fdf9aea8..536513d1e9d 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed -@@ -138,7 +138,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: $DNS_MEMORY_LIMIT requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go -index 3ac6856bfc6..0763b4c63db 100644 +index bb5455a15ff..24b7112ae81 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go -@@ -95,7 +95,7 @@ spec: +@@ -106,8 +106,8 @@ spec: limits: memory: 170Mi requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go -index 8181bea63a4..4c4b4448dd4 100644 +index 8cd0bf577cd..b024263d8d1 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go +++ b/cmd/kubeadm/app/phases/controlplane/manifests.go -@@ -60,7 +60,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap +@@ -63,7 +63,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap LivenessProbe: staticpodutil.LivenessProbe(staticpodutil.GetAPIServerProbeAddress(endpoint), "/livez", int(endpoint.BindPort), v1.URISchemeHTTPS), ReadinessProbe: staticpodutil.ReadinessProbe(staticpodutil.GetAPIServerProbeAddress(endpoint), "/readyz", int(endpoint.BindPort), v1.URISchemeHTTPS), StartupProbe: staticpodutil.StartupProbe(staticpodutil.GetAPIServerProbeAddress(endpoint), "/livez", int(endpoint.BindPort), v1.URISchemeHTTPS, cfg.APIServer.TimeoutForControlPlane), @@ -85,7 +95,7 @@ index 8181bea63a4..4c4b4448dd4 100644 Env: kubeadmutil.GetProxyEnvVars(), }, mounts.GetVolumes(kubeadmconstants.KubeAPIServer), map[string]string{kubeadmconstants.KubeAPIServerAdvertiseAddressEndpointAnnotationKey: endpoint.String()}), -@@ -72,7 +72,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap +@@ -75,7 +75,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeControllerManager)), LivenessProbe: staticpodutil.LivenessProbe(staticpodutil.GetControllerManagerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeControllerManagerPort, v1.URISchemeHTTPS), StartupProbe: staticpodutil.StartupProbe(staticpodutil.GetControllerManagerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeControllerManagerPort, v1.URISchemeHTTPS, cfg.APIServer.TimeoutForControlPlane), @@ -94,7 +104,7 @@ index 8181bea63a4..4c4b4448dd4 100644 Env: kubeadmutil.GetProxyEnvVars(), }, mounts.GetVolumes(kubeadmconstants.KubeControllerManager), nil), kubeadmconstants.KubeScheduler: staticpodutil.ComponentPod(v1.Container{ -@@ -83,7 +83,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap +@@ -86,7 +86,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmap VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeScheduler)), LivenessProbe: staticpodutil.LivenessProbe(staticpodutil.GetSchedulerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeSchedulerPort, v1.URISchemeHTTPS), StartupProbe: staticpodutil.StartupProbe(staticpodutil.GetSchedulerProbeAddress(cfg), "/healthz", kubeadmconstants.KubeSchedulerPort, v1.URISchemeHTTPS, cfg.APIServer.TimeoutForControlPlane), @@ -104,5 +114,5 @@ index 8181bea63a4..4c4b4448dd4 100644 }, mounts.GetVolumes(kubeadmconstants.KubeScheduler), nil), } -- -2.17.1 +2.25.1 diff --git a/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch b/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch index 6c7a09164..fa55d0315 100644 --- a/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch +++ b/kubernetes/kubernetes-1.26.1/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch @@ -1,77 +1,87 @@ -From 721ddbe3f2d5a83eaa4982dde371f9ab4cc48cf6 Mon Sep 17 00:00:00 2001 +From 7113cf5c9133a9da26002b6f02cc3b84ba0b55b8 Mon Sep 17 00:00:00 2001 From: Chris Friesen Date: Fri, 3 Sep 2021 18:05:15 -0400 -Subject: [PATCH 01/10] kubeadm: create platform pods with zero CPU resources +Subject: [PATCH] kubeadm: create platform pods with zero CPU resources We want to specify zero CPU resources when creating the manifests for the static platform pods, as a workaround for the lack of separate resource tracking for platform resources. -We also specify zero CPU resources for the coredns deployment. -manifests.go appears to be the main file for this, not sure if the -others are used but I changed them just in case. +We also specify zero CPU and Memory resources for the +coredns deployment. +manifests.go appears to be the main file for this, not +sure if the others are used but I changed them just in case. Signed-off-by: Daniel Safta +Signed-off-by: Boovan Rajendran --- - cluster/addons/dns/coredns/coredns.yaml.base | 2 +- - cluster/addons/dns/coredns/coredns.yaml.in | 2 +- - cluster/addons/dns/coredns/coredns.yaml.sed | 2 +- - cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- + cluster/addons/dns/coredns/coredns.yaml.base | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.in | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.sed | 4 ++-- + cmd/kubeadm/app/phases/addons/dns/manifests.go | 4 ++-- cmd/kubeadm/app/phases/controlplane/manifests.go | 6 +++--- - 5 files changed, 7 insertions(+), 7 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base -index e03559423e6..bda0ff6059f 100644 +index e03559423e6..49e88afc976 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base -@@ -145,7 +145,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: __DNS__MEMORY__LIMIT__ requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in -index 9b241370bea..e39d37e9e03 100644 +index 9b241370bea..78a23317b56 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in -@@ -145,7 +145,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: 'dns_memory_limit' requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed -index 561fdf9aea8..186cce37950 100644 +index 561fdf9aea8..536513d1e9d 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed -@@ -145,7 +145,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: $DNS_MEMORY_LIMIT requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go -index 0e3c6c98c29..97c5ff96d43 100644 +index 0e3c6c98c29..0aa23679caa 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go -@@ -104,7 +104,7 @@ spec: +@@ -104,8 +104,8 @@ spec: limits: memory: 170Mi requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go index 73f4fa56270..da52342a6f6 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go diff --git a/kubernetes/kubernetes-1.27.5/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch b/kubernetes/kubernetes-1.27.5/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch index f56e33ea9..8bf92be51 100644 --- a/kubernetes/kubernetes-1.27.5/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch +++ b/kubernetes/kubernetes-1.27.5/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch @@ -1,4 +1,4 @@ -From 029d26fe15a99b9dffa124efae1c4614be48fd5b Mon Sep 17 00:00:00 2001 +From 3c9fe997ea55a6d0ead592f796c24b77ebb6f0c6 Mon Sep 17 00:00:00 2001 From: Chris Friesen Date: Fri, 3 Sep 2021 18:05:15 -0400 Subject: [PATCH] kubeadm: create platform pods with zero CPU resources @@ -7,72 +7,81 @@ We want to specify zero CPU resources when creating the manifests for the static platform pods, as a workaround for the lack of separate resource tracking for platform resources. -We also specify zero CPU resources for the coredns deployment. -manifests.go appears to be the main file for this, not sure if the -others are used but I changed them just in case. +We also specify zero CPU and Memory resources for the +coredns deployment. +manifests.go appears to be the main file for this, not +sure if the others are used but I changed them just in case. Signed-off-by: Daniel Safta Signed-off-by: Boovan Rajendran --- - cluster/addons/dns/coredns/coredns.yaml.base | 2 +- - cluster/addons/dns/coredns/coredns.yaml.in | 2 +- - cluster/addons/dns/coredns/coredns.yaml.sed | 2 +- - cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- + cluster/addons/dns/coredns/coredns.yaml.base | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.in | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.sed | 4 ++-- + cmd/kubeadm/app/phases/addons/dns/manifests.go | 4 ++-- cmd/kubeadm/app/phases/controlplane/manifests.go | 6 +++--- - 5 files changed, 7 insertions(+), 7 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base -index 8b6b2ab999c..4de5590dd81 100644 +index 8b6b2ab999c..58bd12ce5f2 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base -@@ -145,7 +145,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: __DNS__MEMORY__LIMIT__ requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in -index f35fe8cfe8d..44f1820b0a9 100644 +index f35fe8cfe8d..fcd455c44b7 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in -@@ -145,7 +145,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: 'dns_memory_limit' requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed -index 5ee04f2880f..13d4c7f745b 100644 +index 5ee04f2880f..88a83466a82 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed -@@ -145,7 +145,7 @@ spec: +@@ -145,8 +145,8 @@ spec: limits: memory: $DNS_MEMORY_LIMIT requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go -index 0e3c6c98c29..97c5ff96d43 100644 +index 0e3c6c98c29..0aa23679caa 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go -@@ -104,7 +104,7 @@ spec: +@@ -104,8 +104,8 @@ spec: limits: memory: 170Mi requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go index 73f4fa56270..da52342a6f6 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go diff --git a/kubernetes/kubernetes-1.28.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch b/kubernetes/kubernetes-1.28.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch index 193b6e303..50a748033 100644 --- a/kubernetes/kubernetes-1.28.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch +++ b/kubernetes/kubernetes-1.28.4/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch @@ -1,4 +1,4 @@ -From 570a2290ff1a1ef4a0c93fd0ebca0aba7054f394 Mon Sep 17 00:00:00 2001 +From a04cda2d8623678fad18f4326af7deb649527a1f Mon Sep 17 00:00:00 2001 From: Saba Touheed Mujawar Date: Tue, 28 Nov 2023 09:16:45 -0500 Subject: [PATCH] kubeadm: create platform pods with zero CPU resources @@ -7,72 +7,82 @@ We want to specify zero CPU resources when creating the manifests for the static platform pods, as a workaround for the lack of separate resource tracking for platform resources. -We also specify zero CPU resources for the coredns deployment. -manifests.go appears to be the main file for this, not sure if the -others are used but I changed them just in case. +We also specify zero CPU and Memory resources for the +coredns deployment. +manifests.go appears to be the main file for this, not +sure if the others are used but I changed them just in case. Signed-off-by: Daniel Safta Signed-off-by: Saba Touheed Mujawar +Signed-off-by: Boovan Rajendran --- - cluster/addons/dns/coredns/coredns.yaml.base | 2 +- - cluster/addons/dns/coredns/coredns.yaml.in | 2 +- - cluster/addons/dns/coredns/coredns.yaml.sed | 2 +- - cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- + cluster/addons/dns/coredns/coredns.yaml.base | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.in | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.sed | 4 ++-- + cmd/kubeadm/app/phases/addons/dns/manifests.go | 4 ++-- cmd/kubeadm/app/phases/controlplane/manifests.go | 6 +++--- - 5 files changed, 7 insertions(+), 7 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base -index 69c0f456591..29e181e186b 100644 +index 69c0f456591..ae65353534e 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base -@@ -139,7 +139,7 @@ spec: +@@ -139,8 +139,8 @@ spec: limits: memory: __DNS__MEMORY__LIMIT__ requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in -index 98edc4e1a54..d01df09835c 100644 +index 98edc4e1a54..4289e3828b3 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in -@@ -139,7 +139,7 @@ spec: +@@ -139,8 +139,8 @@ spec: limits: memory: 'dns_memory_limit' requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed -index 021b35d0ba4..04971150617 100644 +index 021b35d0ba4..ce7ae4e2730 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed -@@ -139,7 +139,7 @@ spec: +@@ -139,8 +139,8 @@ spec: limits: memory: $DNS_MEMORY_LIMIT requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go -index 931897b16e2..e6f92f31127 100644 +index 931897b16e2..5c2b3c0daac 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go -@@ -104,7 +104,7 @@ spec: +@@ -104,8 +104,8 @@ spec: limits: memory: 170Mi requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go index baa8ab6a965..e2c469a6e2f 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go diff --git a/kubernetes/kubernetes-1.29.2/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch b/kubernetes/kubernetes-1.29.2/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch index ff61e18c6..2ae43c70b 100644 --- a/kubernetes/kubernetes-1.29.2/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch +++ b/kubernetes/kubernetes-1.29.2/debian/deb_folder/patches/kubeadm-create-platform-pods-with-zero-CPU-resources.patch @@ -1,4 +1,4 @@ -From 87984bdbd1a9c067cfee4d878e8784260fd0b8c0 Mon Sep 17 00:00:00 2001 +From 759c2ad28ee3a23c0a4098ec711aaeb716c23f18 Mon Sep 17 00:00:00 2001 From: Boovan Rajendran Date: Mon, 26 Feb 2024 04:40:48 -0500 Subject: [PATCH] kubeadm: create platform pods with zero CPU resources @@ -7,73 +7,82 @@ We want to specify zero CPU resources when creating the manifests for the static platform pods, as a workaround for the lack of separate resource tracking for platform resources. -We also specify zero CPU resources for the coredns deployment. -manifests.go appears to be the main file for this, not sure if the -others are used but I changed them just in case. +We also specify zero CPU and Memory resources for the +coredns deployment. +manifests.go appears to be the main file for this, not +sure if the others are used but I changed them just in case. Signed-off-by: Daniel Safta Signed-off-by: Saba Touheed Mujawar Signed-off-by: Boovan Rajendran --- - cluster/addons/dns/coredns/coredns.yaml.base | 2 +- - cluster/addons/dns/coredns/coredns.yaml.in | 2 +- - cluster/addons/dns/coredns/coredns.yaml.sed | 2 +- - cmd/kubeadm/app/phases/addons/dns/manifests.go | 2 +- + cluster/addons/dns/coredns/coredns.yaml.base | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.in | 4 ++-- + cluster/addons/dns/coredns/coredns.yaml.sed | 4 ++-- + cmd/kubeadm/app/phases/addons/dns/manifests.go | 4 ++-- cmd/kubeadm/app/phases/controlplane/manifests.go | 6 +++--- - 5 files changed, 7 insertions(+), 7 deletions(-) + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base -index dd4570adb65..8a1918be2fe 100644 +index dd4570adb65..3a0fd7adb72 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base -@@ -139,7 +139,7 @@ spec: +@@ -139,8 +139,8 @@ spec: limits: memory: __DNS__MEMORY__LIMIT__ requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in -index 6939faec3f9..3a2d0909383 100644 +index 6939faec3f9..74b59584bc7 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in -@@ -139,7 +139,7 @@ spec: +@@ -139,8 +139,8 @@ spec: limits: memory: 'dns_memory_limit' requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed -index a90f2b7674a..567e2fadb75 100644 +index a90f2b7674a..61afbecd9da 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed -@@ -139,7 +139,7 @@ spec: +@@ -139,8 +139,8 @@ spec: limits: memory: $DNS_MEMORY_LIMIT requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go -index 905a2e050e6..9a8b9b26961 100644 +index 905a2e050e6..2a2212d5d37 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go -@@ -104,7 +104,7 @@ spec: +@@ -104,8 +104,8 @@ spec: limits: memory: 170Mi requests: - cpu: 100m +- memory: 70Mi + cpu: 0 - memory: 70Mi ++ memory: 0 args: [ "-conf", "/etc/coredns/Corefile" ] volumeMounts: + - name: config-volume diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go index 998ca2e3456..f0879d41983 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go