Skip to content

Commit d093bfd

Browse files
authored
ci: Allow manual overwrite of k8s version in CI/CD (#3575)
* ci: add K8S_VER to output for make vars * ci: Allow manual overwrite of k8s version in CI/CD * chore: rephrase terminal output
1 parent e722954 commit d093bfd

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

Diff for: .pipelines/cni/load-test-templates/create-cluster-template.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ steps:
1818
addSpnToEnvironment: true
1919
inlineScript: |
2020
set -ex
21+
if ! [ -z ${K8S_VERSION} ]; then
22+
echo "Default k8s version, $(make -C ./hack/aks vars | grep K8S | cut -d'=' -f 2), is manually set to ${K8S_VERSION}"
23+
export K8S_VER=${K8S_VERSION}
24+
fi
25+
2126
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
2227
make -C ./hack/aks ${{ parameters.clusterType }} \
2328
AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \

Diff for: .pipelines/templates/create-cluster.jobs.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
az extension add --name aks-preview
4343
az extension update --name aks-preview
4444
fi
45+
46+
if ! [ -z ${K8S_VERSION} ]; then
47+
echo "Default k8s version, $(make -C ./hack/aks vars | grep K8S | cut -d'=' -f 2), is manually set to ${K8S_VERSION}"
48+
export K8S_VER=${K8S_VERSION}
49+
fi
50+
4551
mkdir -p ~/.kube/
4652
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
4753

Diff for: .pipelines/templates/create-cluster.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
az extension add --name aks-preview
3232
az extension update --name aks-preview
3333
fi
34+
35+
if ! [ -z ${K8S_VERSION} ]; then
36+
echo "Default k8s version, $(make -C ./hack/aks vars | grep K8S | cut -d'=' -f 2), is manually set to ${K8S_VERSION}"
37+
export K8S_VER=${K8S_VERSION}
38+
fi
39+
3440
mkdir -p ~/.kube/
3541
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
3642

Diff for: hack/aks/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ vars: ## Show the input vars configured for the cluster commands
6565
@echo VM_SIZE=$(VM_SIZE)
6666
@echo NODE_COUNT=$(NODE_COUNT)
6767
@echo VMSS_NAME=$(VMSS_NAME)
68+
@echo K8S_VER=$(K8S_VER)
6869

6970

7071
##@ SWIFT Infra

0 commit comments

Comments
 (0)