Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump kubevirtci #6961

Merged
merged 1 commit into from
Dec 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster-up-sha.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dd3d9c70579eeb7bf0d5348018e17e9423e00d03
5884cbdd8505ba5d3e0dbfd43871ed7858f1db75
9 changes: 9 additions & 0 deletions cluster-up/cluster/k8s-1.22-ipv6/provider.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e

if [ "${KUBEVIRT_CGROUPV2}" == "true" ]; then
export KUBEVIRT_PROVIDER_EXTRA_ARGS="${KUBEVIRT_PROVIDER_EXTRA_ARGS} --kernel-args='systemd.unified_cgroup_hierarchy=1'"
fi

# shellcheck disable=SC1090
source "${KUBEVIRTCI_PATH}/cluster/k8s-provider-common.sh"
38 changes: 36 additions & 2 deletions cluster-up/cluster/k8s-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ set -e
# shellcheck source=cluster-up/cluster/ephemeral-provider-common.sh
source "${KUBEVIRTCI_PATH}/cluster/ephemeral-provider-common.sh"


#if UNLIMITEDSWAP is set to true - Kubernetes workloads can use as much swap memory as they request, up to the system limit.
#otherwise Kubernetes workloads can use as much swap memory as they request, up to the system limit by default
function configure_swap_memory () {
if [ "$KUBEVIRT_SWAP_ON" == "true" ] && [[ ($KUBEVIRT_PROVIDER =~ k8s-1\.1.*) || ($KUBEVIRT_PROVIDER =~ k8s-1.20) || ($KUBEVIRT_PROVIDER =~ k8s-1.21) ]]; then
echo "ERROR: swap is not supported on kubevirtci version < 1.22"
exit 1

elif [ "$KUBEVIRT_SWAP_ON" == "true" ] ;then

for nodeNum in $(seq -f "%02g" 1 $KUBEVIRT_NUM_NODES); do
if [ ! -z $KUBEVIRT_SWAP_SIZE_IN_GB ]; then
$ssh node${nodeNum} -- sudo dd if=/dev/zero of=/swapfile count=$KUBEVIRT_SWAP_SIZE_IN_GB bs=1G
$ssh node${nodeNum} -- sudo mkswap /swapfile
fi

$ssh node${nodeNum} -- sudo swapon -a

if [ ! -z $KUBEVIRT_SWAPPINESS ]; then
$ssh node${nodeNum} -- "sudo /bin/su -c \"echo vm.swappiness = $KUBEVIRT_SWAPPINESS >> /etc/sysctl.conf\""
$ssh node${nodeNum} -- sudo sysctl vm.swappiness=$KUBEVIRT_SWAPPINESS
fi

if [ $KUBEVIRT_UNLIMITEDSWAP == "true" ]; then
$ssh node${nodeNum} -- "sudo sed -i ':a;N;\$!ba;s/memorySwap: {}/memorySwap:\n swapBehavior: UnlimitedSwap/g' /var/lib/kubelet/config.yaml"
$ssh node${nodeNum} -- sudo systemctl restart kubelet
fi
done
fi

}

function deploy_cnao() {
if [ "$KUBEVIRT_WITH_CNAO" == "true" ] || [ "$KUBVIRT_WITH_CNAO_SKIP_CONFIG" == "true" ]; then
$kubectl create -f /opt/cnao/namespace.yaml
Expand Down Expand Up @@ -101,8 +133,8 @@ function up() {

# Make sure that local config is correct
prepare_config

kubectl="${_cli} --prefix $provider_prefix ssh node01 -- sudo kubectl --kubeconfig=/etc/kubernetes/admin.conf"
ssh="${_cli} --prefix $provider_prefix ssh"
kubectl="$ssh node01 -- sudo kubectl --kubeconfig=/etc/kubernetes/admin.conf"

# For multinode cluster Label all the non control-plane nodes as workers,
# for one node cluster label control-plane with 'control-plane,worker' roles
Expand All @@ -113,6 +145,8 @@ function up() {
fi
$kubectl label node -l $label node-role.kubernetes.io/worker=''

configure_swap_memory

deploy_cnao
deploy_istio
deploy_cdi
Expand Down
8 changes: 7 additions & 1 deletion cluster-up/cluster/kind/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,15 @@ function setup_kind() {
}

function _add_worker_extra_mounts() {
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
extraMounts:
- containerPath: /var/log/audit
hostPath: /var/log/audit
readOnly: true
EOF

if [[ "$KUBEVIRT_PROVIDER" =~ sriov.* || "$KUBEVIRT_PROVIDER" =~ vgpu.* ]]; then
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
extraMounts:
- containerPath: /dev/vfio/
hostPath: /dev/vfio/
EOF
Expand Down
4 changes: 3 additions & 1 deletion cluster-up/hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ KUBEVIRT_DEPLOY_PROMETHEUS_ALERTMANAGER=${KUBEVIRT_DEPLOY_PROMETHEUS_ALERTMANAGE
KUBEVIRT_DEPLOY_GRAFANA=${KUBEVIRT_DEPLOY_GRAFANA:-false}
KUBEVIRT_CGROUPV2=${KUBEVIRT_CGROUPV2:-false}
KUBEVIRT_DEPLOY_CDI=${KUBEVIRT_DEPLOY_CDI:-false}
KUBEVIRT_SWAP_ON=${KUBEVIRT_SWAP_ON:-false}
KUBEVIRT_UNLIMITEDSWAP=${KUBEVIRT_UNLIMITEDSWAP:-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)
# http and https ports are accessed by testing framework and should not be randomized
Expand All @@ -40,4 +42,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=2112141646-d737b1b
KUBEVIRTCI_TAG=2112161230-d2edfe6
2 changes: 1 addition & 1 deletion cluster-up/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2112141646-d737b1b
2112161230-d2edfe6
2 changes: 1 addition & 1 deletion hack/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cdi_namespace=cdi
image_pull_policy=${IMAGE_PULL_POLICY:-IfNotPresent}
verbosity=${VERBOSITY:-2}
package_name=${PACKAGE_NAME:-kubevirt-dev}
kubevirtci_git_hash="2112141646-d737b1b"
kubevirtci_git_hash="2112161230-d2edfe6"
conn_check_ipv4_address=${CONN_CHECK_IPV4_ADDRESS:-""}
conn_check_ipv6_address=${CONN_CHECK_IPV6_ADDRESS:-""}
conn_check_dns=${CONN_CHECK_DNS:-""}
Expand Down