Skip to content

Commit ef5275e

Browse files
committed
Increase master size in small clusters
Change-Id: I1837a20a28f089b530a231282804610fccf848c3
1 parent 4a6c90d commit ef5275e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/k8s-integration/cluster.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ func clusterUpGCE(k8sDir, gceZone string, numNodes int, imageType string) error
9898
return err
9999
}
100100

101+
// The default master size with few nodes is too small; the tests must hit the API server
102+
// more than usual. The main issue seems to be memory, to reduce GC times that stall the
103+
// api server. For defaults, get-master-size in k/k/cluster/gce/config-common.sh.
104+
if numNodes < 20 {
105+
err = os.Setenv("MASTER_SIZE", "n1-standard-4")
106+
if err != nil {
107+
return err
108+
}
109+
}
110+
101111
err = os.Setenv("KUBE_GCE_ZONE", gceZone)
102112
if err != nil {
103113
return err
@@ -112,8 +122,6 @@ func clusterUpGCE(k8sDir, gceZone string, numNodes int, imageType string) error
112122
}
113123

114124
func setImageTypeEnvs(imageType string) error {
115-
//const image = "ubuntu-1804-bionic-v20191211"
116-
//const imageProject = "ubuntu-os-cloud"
117125
switch strings.ToLower(imageType) {
118126
case "cos":
119127
case "gci": // GCI/COS is default type and does not need env vars set

0 commit comments

Comments
 (0)