Skip to content

Commit

Permalink
Allow specifying custom number of guest worker nodes (#127)
Browse files Browse the repository at this point in the history
This makes it easier to deploy the dev environment
with a custom number of workers.
In that case one should also adjust the KUBEVIRT_MEMORY_SIZE
to accommodate the extra node.

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
  • Loading branch information
akalenyu authored Jan 30, 2025
1 parent a783e55 commit 5a7c0ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kubevirtci
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e

export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.30}
export CAPK_GUEST_K8S_VERSION=${CAPK_GUEST_K8S_VERSION:-v1.30.1}
export CAPK_GUEST_NUM_WORKER_NODES=${CAPK_GUEST_NUM_WORKER_NODES:-1}
export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2405151527-09bcd71}
export KUBECONFIG=$(cluster-up/cluster-up/kubeconfig.sh)
export KUBEVIRT_DEPLOY_PROMETHEUS=false
Expand Down Expand Up @@ -177,7 +178,7 @@ function kubevirtci::create_cluster() {

echo "Using cluster template $template"

$CLUSTERCTL_PATH generate cluster ${TENANT_CLUSTER_NAME} --target-namespace ${TENANT_CLUSTER_NAMESPACE} --kubernetes-version ${CAPK_GUEST_K8S_VERSION} --control-plane-machine-count=1 --worker-machine-count=1 --from $template | ${_kubectl} apply -f -
$CLUSTERCTL_PATH generate cluster ${TENANT_CLUSTER_NAME} --target-namespace ${TENANT_CLUSTER_NAMESPACE} --kubernetes-version ${CAPK_GUEST_K8S_VERSION} --control-plane-machine-count=1 --worker-machine-count=${CAPK_GUEST_NUM_WORKER_NODES} --from $template | ${_kubectl} apply -f -

echo "Wait for tenant cluster to be ready"
${_kubectl} wait cluster -n ${TENANT_CLUSTER_NAMESPACE} kvcluster --for=condition=Ready --timeout=10m
Expand Down

0 comments on commit 5a7c0ac

Please sign in to comment.