Skip to content

Enable Volume expansion test for GKE PDCSI driver #584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions test/k8s-integration/driver-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@ func generateDriverConfigFile(platform, pkgDir, storageClassFile, snapshotClassF
// TODO: Support adding/removing capabilities based on Kubernetes version.
switch deploymentStrat {
case "gke":
fallthrough
case "gce":
// TODO: OSS K8S supports volume expansion for CSI by default in 1.16+;
// however, at time of writing GKE does not support K8S 1.16+. Add these
// capabilities for both deployment strategies when GKE Supports CSI
// Expansion by default.
caps = append(caps, "controllerExpansion", "nodeExpansion")
default:
return "", fmt.Errorf("got unknown deployment strat %s, expected gce or gke", deploymentStrat)
Expand Down
6 changes: 6 additions & 0 deletions test/k8s-integration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ func generateGKETestSkip(clusterVersion string, use_gke_managed_driver bool) str
skipString = skipString + "|volumeMode\\sshould\\snot\\smount\\s/\\smap\\sunused\\svolumes\\sin\\sa\\spod"
}

// For GKE deployed PD CSI driver, resizer sidecar is enabled in 1.16.8-gke.3
if (use_gke_managed_driver && curVer.lessThan(mustParseVersion("1.16.8-gke.3"))) ||
(!use_gke_managed_driver && curVer.lessThan(mustParseVersion("1.16.0"))) {
skipString = skipString + "|allowExpansion"
}

// For GKE deployed PD CSI snapshot is enabled in 1.17.6-gke.4(and higher), 1.18.3-gke.0(and higher).
if (use_gke_managed_driver && curVer.lessThan(mustParseVersion("1.17.6-gke.4"))) ||
(!use_gke_managed_driver && (*curVer).lessThan(mustParseVersion("1.17.0"))) {
Expand Down