From a35bd4cc38c21f66e1c8d24dd2e157d77e4c7fe0 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Fri, 28 Jun 2024 14:23:19 +0200 Subject: [PATCH] ci-automation/vendor-testing/azure: Allow passing kola vnet This adds support for providing a value for the newly introduce --azure-kola-vnet kola parameter through the environment. This parameter is meant to indicate that kola is running inside of a vnet in Azure and the kola created storage account will be restricted to being accessed from that vnet. This lets us disable public access to storage accounts. Needs a corresponding change to jenkins jobs, because we have no way of determining what vnet a worker node is connected to programmatically. So it needs to be defined by the job. Signed-off-by: Jeremi Piotrowski --- ci-automation/ci-config.env | 1 + ci-automation/vendor-testing/azure.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ci-automation/ci-config.env b/ci-automation/ci-config.env index 9188dc454a4..e7da0157e33 100644 --- a/ci-automation/ci-config.env +++ b/ci-automation/ci-config.env @@ -149,6 +149,7 @@ AWS_PARALLEL="${PARALLEL_TESTS:-8}" : ${AZURE_amd64_MACHINE_SIZE:="Standard_D2s_v4"} : ${AZURE_arm64_MACHINE_SIZE:="Standard_D2pls_v5"} : ${AZURE_USE_GALLERY:=""} +: ${AZURE_KOLA_VNET:=""} : ${AZURE_USE_PRIVATE_IPS:=true} : ${AZURE_VNET_SUBNET_NAME:="jenkins-vnet-westeurope"} AZURE_PARALLEL="${PARALLEL_TESTS:-20}" diff --git a/ci-automation/vendor-testing/azure.sh b/ci-automation/vendor-testing/azure.sh index 069b3b34800..c84e36ed9c7 100755 --- a/ci-automation/vendor-testing/azure.sh +++ b/ci-automation/vendor-testing/azure.sh @@ -56,6 +56,7 @@ run_kola_tests() { --azure-size="${instance_type}" \ --azure-hyper-v-generation="${hyperv_gen}" \ ${AZURE_USE_GALLERY} \ + ${AZURE_KOLA_VNET:+--azure-kola-vnet=${AZURE_KOLA_VNET}} \ ${azure_vnet_subnet_name:+--azure-vnet-subnet-name=${azure_vnet_subnet_name}} \ ${AZURE_USE_PRIVATE_IPS:+--azure-use-private-ips=${AZURE_USE_PRIVATE_IPS}} \ "${@}"