|
47 | 47 | numNodes = flag.Int("num-nodes", -1, "the number of nodes in the test cluster")
|
48 | 48 | imageType = flag.String("image-type", "cos", "the image type to use for the cluster")
|
49 | 49 | gkeReleaseChannel = flag.String("gke-release-channel", "", "GKE release channel to be used for cluster deploy. One of 'rapid', 'stable' or 'regular'")
|
50 |
| - gkeTestClusterName = flag.String("gke-cluster-name", "gcp-pd-csi-cluster", "GKE cluster name") |
| 50 | + gkeTestClusterName = flag.String("gke-cluster-name", "pdcsi", "Prefix of GKE cluster names. A random suffix will be appended to form the full name.") |
51 | 51 | gkeNodeVersion = flag.String("gke-node-version", "", "GKE cluster worker node version")
|
52 | 52 | isRegionalCluster = flag.Bool("is-regional-cluster", false, "tell the test that a regional cluster is being used. Should be used for running on an existing regional cluster (ie, --bringup-cluster=false). The test will fail if a zonal GKE cluster is created when this flag is true")
|
53 | 53 |
|
@@ -164,6 +164,8 @@ func main() {
|
164 | 164 | if len(*localK8sDir) == 0 {
|
165 | 165 | ensureVariable(testVersion, true, "Must set either test-version or local k8s dir when using deployment strategy 'gke'.")
|
166 | 166 | }
|
| 167 | + randSuffix := string(uuid.NewUUID())[0:4] |
| 168 | + *gkeTestClusterName += randSuffix |
167 | 169 | } else if *deploymentStrat == "gce" {
|
168 | 170 | ensureVariable(gceRegion, false, "regional clusters not supported for 'gce' deployment")
|
169 | 171 | ensureVariable(gceZone, true, "gce-zone required for 'gce' deployment")
|
|
0 commit comments