Skip to content

Commit

Permalink
Bump kubevirtci
Browse files Browse the repository at this point in the history
[997cbff k8s-provider: Remove KUBEVIRT_CPU_MANAGER_POLICY](kubevirt/kubevirtci#1289)
[c2e547b fix: gocli startup in s390x architecture](kubevirt/kubevirtci#1354)
[1e31064 cluster-up, kind, common: Enable TopologyManager for kind-sriov](kubevirt/kubevirtci#1347)
[00a9d12 Kubelet drop in](kubevirt/kubevirtci#1299)
[6b7d14b build(deps): bump golang.org/x/net in /cluster-provision/gocli](kubevirt/kubevirtci#1364)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
  • Loading branch information
kubevirt-bot committed Feb 1, 2025
1 parent 138f4cd commit 4a82307
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion hack/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cdi_namespace=cdi
image_pull_policy=${IMAGE_PULL_POLICY:-IfNotPresent}
verbosity=${VERBOSITY:-2}
package_name=${PACKAGE_NAME:-kubevirt-dev}
kubevirtci_git_hash="2501300744-36f1f622"
kubevirtci_git_hash="2502010622-997cbff0"
conn_check_ipv4_address=${CONN_CHECK_IPV4_ADDRESS:-""}
conn_check_ipv6_address=${CONN_CHECK_IPV6_ADDRESS:-""}
conn_check_dns=${CONN_CHECK_DNS:-""}
Expand Down
2 changes: 1 addition & 1 deletion kubevirtci/cluster-up-sha.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a2a91c453e1e5fb2df90b2733de80c9b9c8a308a
0d3e90f5acf79b90876b0fee49ad9112455deaac
3 changes: 2 additions & 1 deletion kubevirtci/cluster-up/cluster/ephemeral-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function _add_common_params() {
params=" --container-suffix=:$KUBEVIRTCI_CONTAINER_SUFFIX $params"
fi

if [[ ${KUBEVIRT_SLIM} == "true" ]]; then
# Currently, the s390x architecture supports only KUBEVIRT_SLIM.
if [[ ${KUBEVIRT_SLIM} == "true" || $(uname -m) == "s390x" ]]; then
params=" --slim $params"
fi
fi
Expand Down
18 changes: 0 additions & 18 deletions kubevirtci/cluster-up/cluster/k8s-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@ function wait_for_kwok_ready() {
fi
}

function configure_cpu_manager() {
if [ ${KUBEVIRT_CPU_MANAGER_POLICY} == "static" ]; then
for node in $($kubectl get nodes -l "node-role.kubernetes.io/worker" --no-headers -o custom-columns=":metadata.name" | tr -d '\r'); do
# FIXME Replace with kubelet config drop ins once all providers are using k8s >= 1.28
# https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/#kubelet-conf-d
$kubectl drain ${node}
$ssh ${node} -- sudo systemctl stop kubelet
# FIXME ${ssh} is broken when using HereDocs, fix and replace this mess if possible.
# https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#configuration
$ssh ${node} -- "sudo rm -f /var/lib/kubelet/cpu_manager_state && sudo echo -e 'cpuManagerPolicy: static\nkubeReserved:\n cpu: \"1\"\n memory: \"1Gi\"\ncpuManagerPolicyOptions:\n full-pcpus-only: \"true\"' | sudo tee -a /var/lib/kubelet/config.yaml && sudo sed -i 's/cpuManagerReconcilePeriod\:\ 0s/cpuManagerReconcilePeriod\:\ 5s/g' /var/lib/kubelet/config.yaml"
$ssh ${node} -- sudo systemctl start kubelet
$kubectl label --overwrite node/${node} cpumanager=true
$kubectl uncordon ${node}
done
fi
}

function up() {
params=$(_add_common_params)
if echo "$params" | grep -q ERROR; then
Expand Down Expand Up @@ -90,7 +73,6 @@ function up() {
$kubectl label node -l $label node-role.kubernetes.io/worker=''

configure_prometheus
configure_cpu_manager

deploy_kwok

Expand Down
1 change: 1 addition & 0 deletions kubevirtci/cluster-up/cluster/kind-sriov/provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function deploy_sriov() {
function up() {
cp $KIND_MANIFESTS_DIR/kind.yaml ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
export CONFIG_WORKER_CPU_MANAGER=true
export CONFIG_TOPOLOGY_MANAGER_POLICY="single-numa-node"
kind_up

configure_registry_proxy
Expand Down
29 changes: 22 additions & 7 deletions kubevirtci/cluster-up/cluster/kind/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ function _add_kubeadm_cpu_manager_config_patch() {
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
"feature-gates": "CPUManager=true"
"cpu-manager-policy": "static"
"kube-reserved": "cpu=500m"
"system-reserved": "cpu=500m"
Expand All @@ -311,20 +310,34 @@ EOF
done
}

function _add_kubeadm_config_patches() {
if [ $KUBEVIRT_WITH_KIND_ETCD_IN_MEMORY == "true" ]; then
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
function _add_kubeadm_config_patches_header() {
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
kubeadmConfigPatches:
- |
EOF
}

function _add_kubeadm_config_patches() {
_add_kubeadm_config_patches_header
if [ $KUBEVIRT_WITH_KIND_ETCD_IN_MEMORY == "true" ]; then
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
kind: ClusterConfiguration
metadata:
name: config
etcd:
local:
dataDir: $ETCD_IN_MEMORY_DATA_DIR
EOF
echo "KIND cluster etcd data will be mounted to RAM on kind nodes: $ETCD_IN_MEMORY_DATA_DIR"
fi
echo "KIND cluster etcd data will be mounted to RAM on kind nodes: $ETCD_IN_MEMORY_DATA_DIR"
fi
if [[ -n "$CONFIG_TOPOLOGY_MANAGER_POLICY" ]]; then
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
---
kind: KubeletConfiguration
topologyManagerPolicy: ${CONFIG_TOPOLOGY_MANAGER_POLICY}
---
EOF
fi
}

function _setup_ipfamily() {
Expand All @@ -339,7 +352,9 @@ EOF

function _prepare_kind_config() {
_add_workers
_add_kubeadm_config_patches
if [[ "$KUBEVIRT_WITH_KIND_ETCD_IN_MEMORY" == "true" || -n "$CONFIG_TOPOLOGY_MANAGER_POLICY" ]]; then
_add_kubeadm_config_patches
fi
_setup_ipfamily
echo "Final KIND config:"
cat ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
Expand Down
3 changes: 1 addition & 2 deletions kubevirtci/cluster-up/hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ KUBEVIRT_CUSTOM_CDI_VERSION=${KUBEVIRT_CUSTOM_CDI_VERSION}
KUBEVIRT_SWAP_ON=${KUBEVIRT_SWAP_ON:-false}
KUBEVIRT_KSM_ON=${KUBEVIRT_KSM_ON:-false}
KUBEVIRT_UNLIMITEDSWAP=${KUBEVIRT_UNLIMITEDSWAP:-false}
KUBEVIRT_CPU_MANAGER_POLICY=${KUBEVIRT_CPU_MANAGER_POLICY:-none}
KUBVIRT_WITH_CNAO_SKIP_CONFIG=${KUBVIRT_WITH_CNAO_SKIP_CONFIG:-false}

# If on a developer setup, expose ocp on 8443, so that the openshift web console can be used (the port is important because of auth redirects)
Expand All @@ -55,4 +54,4 @@ provider_prefix=${JOB_NAME:-${KUBEVIRT_PROVIDER}}${EXECUTOR_NUMBER}
job_prefix=${JOB_NAME:-kubevirt}${EXECUTOR_NUMBER}

mkdir -p $KUBEVIRTCI_CONFIG_PATH/$KUBEVIRT_PROVIDER
KUBEVIRTCI_TAG=2501300744-36f1f622
KUBEVIRTCI_TAG=2502010622-997cbff0
2 changes: 1 addition & 1 deletion kubevirtci/cluster-up/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2501300744-36f1f622
2502010622-997cbff0

0 comments on commit 4a82307

Please sign in to comment.