Stop platform pods from requesting CPU resources

While running tests in the lab, calico-node and
kube-sriov-device-plugin pods are requesting CPU resources.
All platform pods are supposed to have no CPU resource requests
as it messes up the reported CPU allocations and reduces the
amount of CPU available to the customer applications

The CPU request allocation for calico-node and
kube-sriov-device-plugin containers have been changed
to "0". This will implement no CPU requests for pods
in the platform namespaces

The kube-sriov-device-plugin pod CPU requests was modified in
a SR-IOV enabled lab, to help verify that the code
change was successful

Test Plan:

PASS: set calico-node requests to 0 local build VM
      the following command was executed:
      "kubectl describe node controller-0"
      --> command response:
          Non-terminated Pods:
          .......
          calico-node-kxbpl             CPU requests: 0 (0%)

PASS: set sriovdp-node requests to 0 on SR-IOV enabled lab
      the following command was executed:
      "kubectl describe node controller-0"
      --> command response:
          Non-terminated Pods:
          .......
          kube-sriov-device-plugin-amd64-p5s4g   CPU requests: 0 (0%)

Closes-Bug: 1976300

Signed-off-by: Mohammad Issa <mohammad.issa@windriver.com>
Change-Id: I591886e3dd14cbbef0e0743707eb4cb44dff70a3
This commit is contained in:
Mohammad Issa
2022-06-01 14:43:35 -04:00
parent 8408dea1bd
commit 7876bbea76
2 changed files with 6 additions and 4 deletions

View File

@@ -14,8 +14,9 @@
# - Set the calico-node iptables backend to 'auto' for compatibility with
# iptables >= 1.8
# - Do not use default ippools. Create them explicitly for ipv4 / ipv6
# - Set CPU requests to 0
#
# Copyright (c) 2021 Wind River Systems, Inc.
# Copyright (c) 2021-2022 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -3787,7 +3788,7 @@ spec:
privileged: true
resources:
requests:
cpu: 250m
cpu: 0
livenessProbe:
exec:
command:

View File

@@ -18,8 +18,9 @@
# is used, as resources are populated and based on datanetwork names.
# - For k8s 1.19, the matchLabels are the same as the k8s 1.18 labels to
# allow a rolling update to succeed.
# - Set CPU requests to 0
#
# Copyright (c) 2021 Wind River Systems, Inc.
# Copyright (c) 2021-2022 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -75,7 +76,7 @@ spec:
privileged: true
resources:
requests:
cpu: "250m"
cpu: "0"
memory: "40Mi"
limits:
cpu: 1