Skip to content

Commit

Permalink
Bump kubevirtci
Browse files Browse the repository at this point in the history
[6c7e367 cluster-up, kind: all to exec command via ssh.sh and add port mapping for kind cluster](kubevirt/kubevirtci#1344)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <[email protected]>
  • Loading branch information
kubevirt-bot committed Jan 10, 2025
1 parent a74baa2 commit aad0cd3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 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="2412171619-fbd31717"
kubevirtci_git_hash="2501090845-6c7e367a"
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 @@
c8e41b0449bf6b53024d0f1b6eb4f07a7795e9ee
95404330afc90d67241ff6b714b1cd77db3120b7
1 change: 1 addition & 0 deletions kubevirtci/cluster-up/cluster/kind-1.28/provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function up() {
cp $KIND_MANIFESTS_DIR/kind.yaml ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
_add_kubeadm_cpu_manager_config_patch
_add_extra_mounts
_add_extra_portmapping
export CONFIG_WORKER_CPU_MANAGER=true
kind_up

Expand Down
1 change: 1 addition & 0 deletions kubevirtci/cluster-up/cluster/kind-1.31/provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function up() {
cp $KIND_MANIFESTS_DIR/kind.yaml ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
_add_kubeadm_cpu_manager_config_patch
_add_extra_mounts
_add_extra_portmapping
export CONFIG_WORKER_CPU_MANAGER=true
kind_up

Expand Down
27 changes: 26 additions & 1 deletion kubevirtci/cluster-up/cluster/kind/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ CONFIG_WORKER_CPU_MANAGER=${CONFIG_WORKER_CPU_MANAGER:-false}
# avaliable value: ipv4, ipv6, dual
IPFAMILY=${IPFAMILY}

# setup the port mapping for kind cluster, this is needed for some e2e tests
# KIND_PORT_MAPPING=cluster_port:host_port e.g. KIND_PORT_MAPPING=30001:30002
# only one port mapping allowed
KIND_PORT_MAPPING=${KIND_PORT_MAPPING}

# check CPU arch
PLATFORM=$(uname -m)
case ${PLATFORM} in
Expand Down Expand Up @@ -93,7 +98,11 @@ function _insecure-registry-config-cmd() {

# this works since the nodes use the same names as containers
function _ssh_into_node() {
${CRI_BIN} exec -it "$1" bash
if [[ $2 != "" ]]; then
${CRI_BIN} exec "$@"
else
${CRI_BIN} exec -it "$1" bash
fi
}

function _run_registry() {
Expand Down Expand Up @@ -259,6 +268,22 @@ EOF
fi
}

function _add_extra_portmapping() {
if [[ "$KIND_PORT_MAPPING" != "" ]]; then
container_port=$(echo "$KIND_PORT_MAPPING" | awk -F: '{print $1}')
host_port=$(echo "$KIND_PORT_MAPPING" | awk -F: '{print $2}')
if [[ -z "$container_port" || -z "$host_port" ]]; then
echo "Invalid KIND_PORT_MAPPING format. Expected 'container_port:host_port'."
exit 1
fi
cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
extraPortMappings:
- containerPort: $container_port
hostPort: $host_port
EOF
fi
}

function _add_kubeadm_cpu_manager_config_patch() {
cat << EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
kubeadmConfigPatches:
Expand Down
2 changes: 1 addition & 1 deletion kubevirtci/cluster-up/hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,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=2412171619-fbd31717
KUBEVIRTCI_TAG=2501090845-6c7e367a
2 changes: 1 addition & 1 deletion kubevirtci/cluster-up/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2412171619-fbd31717
2501090845-6c7e367a

0 comments on commit aad0cd3

Please sign in to comment.