Skip to content

Commit bcab04c

Browse files
author
Hantao (Will) Wang
committed
add ability to set cluster and kube version in integration script
1 parent 64fecda commit bcab04c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

test/run-k8s-integration-local.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ set -o errexit
55

66
readonly PKGDIR=${GOPATH}/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
77
readonly deployment_strategy=${DEPLOYMENT_STRATEGY:-gce}
8+
readonly gke_cluster_version=${GKE_CLUSTER_VERSION:-latest}
9+
readonly kube_version=${KUBE_VERSION:-master}
810

911
source "${PKGDIR}/deploy/common.sh"
1012

@@ -17,7 +19,8 @@ make -C ${PKGDIR} test-k8s-integration
1719
# --staging-image=${GCE_PD_CSI_STAGING_IMAGE} --service-account-file=${GCE_PD_SA_DIR}/cloud-sa.json \
1820
# --deploy-overlay-name=dev --storageclass-file=sc-standard.yaml \
1921
# --test-focus="External.Storage" --gce-zone="us-central1-b" \
20-
# --deployment-strategy=${deployment_strategy}
22+
# --deployment-strategy=${deployment_strategy} --gke-cluster-version=${gke_cluster_version} \
23+
# --kube-version=${kube_version}
2124

2225
# This version of the command does not build the driver or K8s, points to a
2326
# local K8s repo to get the e2e.test binary, and does not bring up or down the cluster
@@ -26,4 +29,5 @@ ${PKGDIR}/bin/k8s-integration-test --kube-version=master --run-in-prow=false \
2629
--staging-image=${GCE_PD_CSI_STAGING_IMAGE} --service-account-file=${GCE_PD_SA_DIR}/cloud-sa.json \
2730
--deploy-overlay-name=dev --bringup-cluster=false --teardown-cluster=false --local-k8s-dir=$KTOP \
2831
--storageclass-file=sc-standard.yaml --do-driver-build=true --test-focus="External.Storage" \
29-
--gce-zone="us-central1-b"
32+
--gce-zone="us-central1-b" --gke-cluster-version=${gke_cluster_version} \
33+
--kube-version=${kube_version}

test/run-k8s-integration.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ readonly overlay_name="${GCE_PD_OVERLAY_NAME:-stable}"
1414
readonly boskos_resource_type="${GCE_PD_BOSKOS_RESOURCE_TYPE:-gce-project}"
1515
readonly do_driver_build="${GCE_PD_DO_DRIVER_BUILD:-true}"
1616
readonly deployment_strategy=${DEPLOYMENT_STRATEGY:-gce}
17+
readonly gke_cluster_version=${GKE_CLUSTER_VERSION:-latest}
18+
readonly kube_version=${KUBE_VERSION:-master}
19+
1720
export GCE_PD_VERBOSITY=9
1821

1922
make -C ${PKGDIR} test-k8s-integration
2023
${PKGDIR}/bin/k8s-integration-test --kube-version=${GCE_PD_KUBE_VERSION:-master} \
2124
--run-in-prow=true --deploy-overlay-name=${overlay_name} --service-account-file=${E2E_GOOGLE_APPLICATION_CREDENTIALS} \
2225
--do-driver-build=${do_driver_build} --boskos-resource-type=${boskos_resource_type} \
2326
--storageclass-file=sc-standard.yaml --test-focus="External.Storage" --gce-zone="us-central1-b" \
24-
--deployment-strategy=${deployment_strategy}
27+
--deployment-strategy=${deployment_strategy} --gke-cluster-version=${gke_cluster_version} \
28+
--kube-version=${kube_version}

0 commit comments

Comments
 (0)