Skip to content

Commit 7897e0a

Browse files
committed
Enable Volume expansion test for GKE PDCSI driver
1 parent 6b61753 commit 7897e0a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/k8s-integration/driver-config.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ func generateDriverConfigFile(platform, pkgDir, storageClassFile, snapshotClassF
7474
// TODO: Support adding/removing capabilities based on Kubernetes version.
7575
switch deploymentStrat {
7676
case "gke":
77+
fallthrough
7778
case "gce":
78-
// TODO: OSS K8S supports volume expansion for CSI by default in 1.16+;
79-
// however, at time of writing GKE does not support K8S 1.16+. Add these
80-
// capabilities for both deployment strategies when GKE Supports CSI
81-
// Expansion by default.
8279
caps = append(caps, "controllerExpansion", "nodeExpansion")
8380
default:
8481
return "", fmt.Errorf("got unknown deployment strat %s, expected gce or gke", deploymentStrat)

test/k8s-integration/main.go

+6
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ func generateGCETestSkip(clusterVersion, platform string) string {
391391
// bug-fix introduced in 1.16
392392
if v.LessThan(apimachineryversion.MustParseSemantic("1.16.0")) {
393393
skipString = skipString + "|volumeMode\\sshould\\snot\\smount\\s/\\smap\\sunused\\svolumes\\sin\\sa\\spod"
394+
skipString = skipString + "|allowExpansion"
394395
}
395396
if v.LessThan(apimachineryversion.MustParseSemantic("1.17.0")) {
396397
skipString = skipString + "|VolumeSnapshotDataSource"
@@ -412,6 +413,11 @@ func generateGKETestSkip(clusterVersion string, use_gke_managed_driver bool) str
412413
skipString = skipString + "|volumeMode\\sshould\\snot\\smount\\s/\\smap\\sunused\\svolumes\\sin\\sa\\spod"
413414
}
414415

416+
// Minimum GKE cluster version where managed GKE driver contains resizer sidecar.
417+
if curVer.lessThan(mustParseVersion("1.16.8-gke.3")) {
418+
skipString = skipString + "|allowExpansion"
419+
}
420+
415421
// For GKE deployed PD CSI snapshot is enabled in 1.17.6-gke.4(and higher), 1.18.3-gke.0(and higher).
416422
if (use_gke_managed_driver && curVer.lessThan(mustParseVersion("1.17.6-gke.4"))) ||
417423
(!use_gke_managed_driver && (*curVer).lessThan(mustParseVersion("1.17.0"))) {

0 commit comments

Comments
 (0)