diff --git a/Makefile b/Makefile index f32fafaf..15f35450 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ OUTPUT_TYPE ?= type=docker BUILDPLATFORM ?= linux/amd64 IMG_TAG ?= $(subst v,,$(VERSION)) INIT_IMG_TAG ?= 0.1.0 +K8S_VERSION ?= 1.23.12 ## -------------------------------------- @@ -92,15 +93,28 @@ clean: .PHONY: test test: @echo running tests - LOCATION=$(LOCATION) AZURE_AUTH_LOCATION=$(TEST_CREDENTIALS_JSON) LOG_ANALYTICS_AUTH_LOCATION=$(TEST_LOGANALYTICS_JSON) go test -v $(shell go list ./... | grep -v /e2e) -race -coverprofile=coverage.out -covermode=atomic + LOCATION=$(LOCATION) AZURE_AUTH_LOCATION=$(TEST_CREDENTIALS_JSON) \ + LOG_ANALYTICS_AUTH_LOCATION=$(TEST_LOGANALYTICS_JSON) \ + go test -v $(shell go list ./... | grep -v /e2e) -race -coverprofile=coverage.out -covermode=atomic .PHONY: e2e-test e2e-test: - PR_RAND=$(PR_COMMIT_SHA) E2E_TARGET=$(E2E_TARGET) IMG_URL=$(REGISTRY) IMG_REPO=$(IMG_NAME) IMG_TAG=$(IMG_TAG) LOCATION=$(LOCATION) RESOURCE_GROUP=$(E2E_CLUSTER_NAME) $(AKS_E2E_SCRIPT) go test -timeout 30m -v ./e2e + PR_RAND=$(PR_COMMIT_SHA) E2E_TARGET=$(E2E_TARGET) \ + IMG_URL=$(REGISTRY) IMG_REPO=$(IMG_NAME) IMG_TAG=$(IMG_TAG) \ + INIT_IMG_REPO=$(INIT_IMG_REPO) INIT_IMG_TAG=$(INIT_IMG_TAG) \ + LOCATION=$(LOCATION) RESOURCE_GROUP=$(E2E_CLUSTER_NAME) \ + K8S_VERSION=$(K8S_VERSION) \ + $(AKS_E2E_SCRIPT) go test -timeout 30m -v ./e2e .PHONY: aks-addon-e2e-test aks-addon-e2e-test: - PR_RAND=$(PR_COMMIT_SHA) E2E_TARGET=$(E2E_TARGET) IMG_URL=$(REGISTRY) IMG_REPO=$(IMG_NAME) IMG_TAG=$(IMG_TAG) LOCATION=$(LOCATION) RESOURCE_GROUP=$(E2E_CLUSTER_NAME) $(AKS_ADDON_E2E_SCRIPT) go test -timeout 30m -v ./e2e + PR_RAND=$(PR_COMMIT_SHA) E2E_TARGET=$(E2E_TARGET) \ + IMG_URL=$(REGISTRY) IMG_REPO=$(IMG_NAME) IMG_TAG=$(IMG_TAG) \ + INIT_IMG_REPO=$(INIT_IMG_REPO) INIT_IMG_TAG=$(INIT_IMG_TAG) \ + LOCATION=$(LOCATION) RESOURCE_GROUP=$(E2E_CLUSTER_NAME) \ + K8S_VERSION=$(K8S_VERSION) \ + $(AKS_ADDON_E2E_SCRIPT) go test -timeout 30m -v ./e2e + .PHONY: vet vet: @go vet ./... #$(packages) diff --git a/hack/e2e/aks-addon.sh b/hack/e2e/aks-addon.sh index 81728f73..c92fdfc4 100755 --- a/hack/e2e/aks-addon.sh +++ b/hack/e2e/aks-addon.sh @@ -40,6 +40,7 @@ fi : "${ACR_NAME=aksaddonacr$RANDOM_NUM}" : "${CSI_DRIVER_STORAGE_ACCOUNT_NAME=aksaddonvk$RANDOM_NUM}" : "${CSI_DRIVER_SHARE_NAME=vncsidriversharename}" +: "${K8S_VERSION:=1.23.12}" error() { echo "$@" >&2 @@ -112,7 +113,7 @@ cluster_subnet_id="$(az network vnet subnet show \ if [ "$E2E_TARGET" = "pr" ]; then az aks create \ -g "$RESOURCE_GROUP" \ - --kubernetes-version "1.23.12" \ + --kubernetes-version "$K8S_VERSION" \ -l "$LOCATION" \ -c "$NODE_COUNT" \ --node-vm-size standard_d8_v3 \ @@ -127,7 +128,7 @@ else az aks create \ -g "$RESOURCE_GROUP" \ - --kubernetes-version "1.23.12" \ + --kubernetes-version "$K8S_VERSION" \ -l "$LOCATION" \ -c "$NODE_COUNT" \ --node-vm-size standard_d8_v3 \ diff --git a/hack/e2e/aks.sh b/hack/e2e/aks.sh index 114e56cf..5e30bd35 100755 --- a/hack/e2e/aks.sh +++ b/hack/e2e/aks.sh @@ -40,6 +40,7 @@ fi : "${ACR_NAME=vkacr$RANDOM_NUM}" : "${CSI_DRIVER_STORAGE_ACCOUNT_NAME=vkcsidrivers$RANDOM_NUM}" : "${CSI_DRIVER_SHARE_NAME=vncsidriversharename}" +: "${K8S_VERSION:=1.23.12}" error() { echo "$@" >&2 @@ -119,7 +120,7 @@ node_identity_client_id="$(az identity create --name "${RESOURCE_GROUP}-aks-iden if [ "$E2E_TARGET" = "pr" ]; then az aks create \ -g "$RESOURCE_GROUP" \ - --kubernetes-version "1.23.12" \ + --kubernetes-version "$K8S_VERSION" \ -l "$LOCATION" \ -c "$NODE_COUNT" \ --node-vm-size standard_d8_v3 \ @@ -136,7 +137,7 @@ else az aks create \ -g "$RESOURCE_GROUP" \ - --kubernetes-version "1.23.12" \ + --kubernetes-version "$K8S_VERSION" \ -l "$LOCATION" \ -c "$NODE_COUNT" \ --node-vm-size standard_d8_v3 \