summaryrefslogtreecommitdiffstats
path: root/kud/hosting_providers
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2021-06-17 17:10:38 -0700
committerTodd Malsbary <todd.malsbary@intel.com>2021-06-21 12:14:48 -0700
commit2cfc1f2d67103726140b32b5a5c555f7a66636be (patch)
tree268feaaf39d4d2cda0750790ec45d32e139f3ad0 /kud/hosting_providers
parentdc925231a978d1ae4dce969cb4c386d4a1b0bb87 (diff)
Move topology-manager configuration to kubespray
The steps performed by the existing ansible playbook can be performed directly by kubespray. In addtion, fix and enable the topology-manager.sh test. Issue-ID: MULTICLOUD-1324 Signed-off-by: Todd Malsbary <todd.malsbary@intel.com> Change-Id: Iee2197c1fc3e35288796399cccff0d3ae0925a6c
Diffstat (limited to 'kud/hosting_providers')
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh2
-rw-r--r--kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml5
-rwxr-xr-xkud/hosting_providers/vagrant/installer.sh6
-rw-r--r--kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml5
4 files changed, 15 insertions, 3 deletions
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index 427850ab..7365a14f 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -230,7 +230,7 @@ function install_host_artifacts {
done
mkdir -p ${host_addons_dir}/tests
- for test in _common _common_test _functions multus ovn4nfv nfd sriov-network qat cmk; do
+ for test in _common _common_test _functions topology-manager-sriov multus ovn4nfv nfd sriov-network qat cmk; do
cp ${kud_tests}/${test}.sh ${host_addons_dir}/tests
done
diff --git a/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml b/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
index 7d0404a5..a13d8412 100644
--- a/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
+++ b/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
@@ -124,3 +124,8 @@ podsecuritypolicy_restricted_spec:
# This will fail if allowed-unsafe-sysctls is not set accordingly in kubelet flags
allowedUnsafeSysctls:
- '*'
+
+# Customize kubelet config of CPU and topology manager
+kubelet_node_config_extra_args:
+ cpuManagerPolicy: "static" # Options: none (disabled), static (default)
+ topologyManagerPolicy: "best-effort" # Options: none (disabled), best-effort (default), restricted, single-numa-node
diff --git a/kud/hosting_providers/vagrant/installer.sh b/kud/hosting_providers/vagrant/installer.sh
index c88dc9e6..39da50e7 100755
--- a/kud/hosting_providers/vagrant/installer.sh
+++ b/kud/hosting_providers/vagrant/installer.sh
@@ -186,7 +186,7 @@ function install_addons {
# The order of KUD_ADDONS is important: some plugins (sriov, qat)
# require nfd to be enabled. Some addons are not currently supported with containerd
if [ "${container_runtime}" == "docker" ]; then
- kud_addons=${KUD_ADDONS:-topology-manager virtlet ovn4nfv nfd sriov \
+ kud_addons=${KUD_ADDONS:-virtlet ovn4nfv nfd sriov \
qat optane cmk}
elif [ "${container_runtime}" == "containerd" ]; then
kud_addons=${KUD_ADDONS:-ovn4nfv nfd}
@@ -216,7 +216,9 @@ function install_addons {
popd
fi
# Run other plugin tests
- for addon in ${kud_addons}; do
+ # The topology-manager is added to the tests here as it is
+ # enabled via kubelet config, not an addon
+ for addon in topology-manager ${kud_addons}; do
pushd $kud_tests
bash ${addon}.sh || failed_kud_tests="${failed_kud_tests} ${addon}"
popd
diff --git a/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml b/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
index 7803f27a..bf6f8c84 100644
--- a/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
+++ b/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
@@ -121,3 +121,8 @@ podsecuritypolicy_restricted_spec:
# This will fail if allowed-unsafe-sysctls is not set accordingly in kubelet flags
allowedUnsafeSysctls:
- '*'
+
+# Customize kubelet config of CPU and topology manager
+kubelet_node_config_extra_args:
+ cpuManagerPolicy: "static" # Options: none (disabled), static (default)
+ topologyManagerPolicy: "best-effort" # Options: none (disabled), best-effort (default), restricted, single-numa-node