diff --git a/.pipelines/cni/load-test-templates/create-cluster-template.yaml b/.pipelines/cni/load-test-templates/create-cluster-template.yaml index bcdce8f643..9fb8d319ed 100644 --- a/.pipelines/cni/load-test-templates/create-cluster-template.yaml +++ b/.pipelines/cni/load-test-templates/create-cluster-template.yaml @@ -18,6 +18,11 @@ steps: addSpnToEnvironment: true inlineScript: | set -ex + if ! [ -z ${K8S_VERSION} ]; then + echo "Default k8s version, $(make -C ./hack/aks vars | grep K8S | cut -d'=' -f 2), is manually set to ${K8S_VERSION}" + export K8S_VER=${K8S_VERSION} + fi + make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }} make -C ./hack/aks ${{ parameters.clusterType }} \ AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \ diff --git a/.pipelines/templates/create-cluster.jobs.yaml b/.pipelines/templates/create-cluster.jobs.yaml index 2bfa2f56f2..18816bc257 100644 --- a/.pipelines/templates/create-cluster.jobs.yaml +++ b/.pipelines/templates/create-cluster.jobs.yaml @@ -42,6 +42,12 @@ jobs: az extension add --name aks-preview az extension update --name aks-preview fi + + if ! [ -z ${K8S_VERSION} ]; then + echo "Default k8s version, $(make -C ./hack/aks vars | grep K8S | cut -d'=' -f 2), is manually set to ${K8S_VERSION}" + export K8S_VER=${K8S_VERSION} + fi + mkdir -p ~/.kube/ make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }} diff --git a/.pipelines/templates/create-cluster.yaml b/.pipelines/templates/create-cluster.yaml index 4d4e106568..60573922a3 100644 --- a/.pipelines/templates/create-cluster.yaml +++ b/.pipelines/templates/create-cluster.yaml @@ -31,6 +31,12 @@ jobs: az extension add --name aks-preview az extension update --name aks-preview fi + + if ! [ -z ${K8S_VERSION} ]; then + echo "Default k8s version, $(make -C ./hack/aks vars | grep K8S | cut -d'=' -f 2), is manually set to ${K8S_VERSION}" + export K8S_VER=${K8S_VERSION} + fi + mkdir -p ~/.kube/ make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }} diff --git a/hack/aks/Makefile b/hack/aks/Makefile index cad91ba967..86facf22a9 100644 --- a/hack/aks/Makefile +++ b/hack/aks/Makefile @@ -65,6 +65,7 @@ vars: ## Show the input vars configured for the cluster commands @echo VM_SIZE=$(VM_SIZE) @echo NODE_COUNT=$(NODE_COUNT) @echo VMSS_NAME=$(VMSS_NAME) + @echo K8S_VER=$(K8S_VER) ##@ SWIFT Infra