diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index 4b752e77f1..66ac83575f 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -1701,6 +1701,7 @@ SRIOV_LABEL = 'sriov=enabled' SRIOVDP_LABEL = 'sriovdp=enabled' KUBE_TOPOLOGY_MANAGER_LABEL = 'kube-topology-mgr-policy' KUBE_CPU_MANAGER_LABEL = 'kube-cpu-mgr-policy' +KUBE_IGNORE_ISOL_CPU_LABEL = 'kube-ignore-isol-cpus' # Accepted label values KUBE_TOPOLOGY_MANAGER_VALUES = [ diff --git a/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py b/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py index 2c27f336a7..83c95c86d4 100644 --- a/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py +++ b/sysinv/sysinv/sysinv/sysinv/puppet/kubernetes.py @@ -322,9 +322,21 @@ class KubernetesPuppet(base.BasePuppet): # determine reserved sets of logical cpus in a string range set format # to pass as options to kubelet k8s_platform_cpuset = utils.format_range_set(platform_cpuset) - k8s_all_reserved_cpuset = utils.format_range_set(platform_cpuset | - vswitch_cpuset | - isol_cpuset) + + # determine whether to reserve isolated CPUs + reserve_isolcpus = True + labels = self.dbapi.label_get_by_host(host.uuid) + for label in labels: + if label.label_key == constants.KUBE_IGNORE_ISOL_CPU_LABEL: + reserve_isolcpus = False + break + if reserve_isolcpus: + k8s_all_reserved_cpuset = utils.format_range_set(platform_cpuset | + vswitch_cpuset | + isol_cpuset) + else: + k8s_all_reserved_cpuset = utils.format_range_set(platform_cpuset | + vswitch_cpuset) # determine platform reserved memory k8s_reserved_mem = 0