Skip to content

Commit 0a18035

Browse files
authored
Merge pull request #683 from saikat-royc/fix-version-parse
Fix GKE cluster version check for cluster update
2 parents 4c46bb8 + 4fa500f commit 0a18035

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/k8s-integration/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,6 @@ func getKubeClient() (kubernetes.Interface, error) {
397397
func isGKEDeploymentInstalledByDefault(clusterVersion string) bool {
398398
cv := mustParseVersion(clusterVersion)
399399
return cv.atLeast(mustParseVersion("1.18.10-gke.2101")) &&
400-
cv.lessThan(mustParseVersion("1.19")) ||
400+
cv.lessThan(mustParseVersion("1.19.0")) ||
401401
cv.atLeast(mustParseVersion("1.19.3-gke.2100"))
402402
}

test/k8s-integration/version_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ func TestParseVersion(t *testing.T) {
5454
version: [4]int{10, 18, 10, 10},
5555
},
5656
},
57+
{
58+
version: "v1.19.0",
59+
expectedV: version{
60+
version: [4]int{1, 19, 0, -1},
61+
},
62+
},
5763
{
5864
version: "100.101.102-gke.103",
5965
expectedV: version{

0 commit comments

Comments
 (0)