@@ -429,7 +429,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
429
429
stablePatchVersion : "v1.10.5" ,
430
430
stableVersion : "v1.10.5" ,
431
431
latestDevBranchVersion : "v1.11.0-beta.1" ,
432
- latestVersion : "v1.12.0- alpha.0" ,
432
+ latestVersion : constants . MinimumControlPlaneVersion . WithPreRelease ( " alpha.0"). String () ,
433
433
},
434
434
beforeDNSType : kubeadmapi .CoreDNS ,
435
435
beforeDNSVersion : "1.0.6" ,
@@ -470,7 +470,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
470
470
stablePatchVersion : "v1.10.5" ,
471
471
stableVersion : "v1.10.5" ,
472
472
latestDevBranchVersion : "v1.11.0-rc.1" ,
473
- latestVersion : "v1.12.0- alpha.1" ,
473
+ latestVersion : constants . MinimumControlPlaneVersion . WithPreRelease ( " alpha.1"). String () ,
474
474
},
475
475
beforeDNSType : kubeadmapi .CoreDNS ,
476
476
beforeDNSVersion : "1.0.6" ,
@@ -511,7 +511,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
511
511
stablePatchVersion : "v1.10.5" ,
512
512
stableVersion : "v1.10.5" ,
513
513
latestDevBranchVersion : "v1.11.6-rc.1" ,
514
- latestVersion : "v1.12.1- alpha.0" ,
514
+ latestVersion : constants . MinimumControlPlaneVersion . WithPatch ( 1 ). WithPreRelease ( " alpha.0"). String () ,
515
515
},
516
516
beforeDNSType : kubeadmapi .CoreDNS ,
517
517
beforeDNSVersion : "1.0.6" ,
@@ -552,7 +552,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
552
552
stablePatchVersion : "v1.10.5" ,
553
553
stableVersion : "v1.10.5" ,
554
554
latestDevBranchVersion : "v1.11.0-rc.1" ,
555
- latestVersion : "v1.12.0- alpha.2" ,
555
+ latestVersion : constants . MinimumControlPlaneVersion . WithPreRelease ( " alpha.2"). String () ,
556
556
},
557
557
beforeDNSType : kubeadmapi .CoreDNS ,
558
558
beforeDNSVersion : "1.0.6" ,
@@ -591,8 +591,8 @@ func TestGetAvailableUpgrades(t *testing.T) {
591
591
EtcdVersion : "3.1.12" ,
592
592
},
593
593
After : ClusterState {
594
- KubeVersion : "v1.12.0- alpha.2" ,
595
- KubeadmVersion : "v1.12.0- alpha.2" ,
594
+ KubeVersion : constants . MinimumControlPlaneVersion . WithPreRelease ( " alpha.2"). String () ,
595
+ KubeadmVersion : constants . MinimumControlPlaneVersion . WithPreRelease ( " alpha.2"). String () ,
596
596
DNSType : kubeadmapi .CoreDNS ,
597
597
DNSVersion : "1.2.6" ,
598
598
EtcdVersion : "3.2.24" ,
@@ -625,7 +625,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
625
625
clusterVersion : "v1.11.1" ,
626
626
kubeletVersion : "v1.11.0" ,
627
627
kubeadmVersion : "v1.11.1" ,
628
- }, "v1.12.1" ),
628
+ }, constants . MinimumControlPlaneVersion . WithPatch ( 1 ). String () ),
629
629
etcdClient : etcdClient ,
630
630
beforeDNSType : kubeadmapi .CoreDNS ,
631
631
beforeDNSVersion : "1.0.6" ,
@@ -644,8 +644,8 @@ func TestGetAvailableUpgrades(t *testing.T) {
644
644
EtcdVersion : "3.1.12" ,
645
645
},
646
646
After : ClusterState {
647
- KubeVersion : "v1.12.1" ,
648
- KubeadmVersion : "v1.12.1" ,
647
+ KubeVersion : constants . MinimumControlPlaneVersion . WithPatch ( 1 ). String () ,
648
+ KubeadmVersion : constants . MinimumControlPlaneVersion . WithPatch ( 1 ). String () ,
649
649
DNSType : kubeadmapi .CoreDNS ,
650
650
DNSVersion : "1.2.6" ,
651
651
EtcdVersion : "3.2.24" ,
@@ -658,10 +658,10 @@ func TestGetAvailableUpgrades(t *testing.T) {
658
658
vg : & fakeVersionGetter {
659
659
clusterVersion : "v1.11.2" ,
660
660
kubeletVersion : "v1.11.2" , // the kubelet are on the same version as the control plane
661
- kubeadmVersion : "v1.12.0" ,
661
+ kubeadmVersion : constants . MinimumControlPlaneVersion . String () ,
662
662
663
- stablePatchVersion : "v1.12.0" ,
664
- stableVersion : "v1.12.0" ,
663
+ stablePatchVersion : constants . MinimumControlPlaneVersion . String () ,
664
+ stableVersion : constants . MinimumControlPlaneVersion . String () ,
665
665
},
666
666
etcdClient : etcdClient ,
667
667
beforeDNSType : kubeadmapi .KubeDNS ,
@@ -675,14 +675,14 @@ func TestGetAvailableUpgrades(t *testing.T) {
675
675
KubeletVersions : map [string ]uint16 {
676
676
"v1.11.2" : 1 ,
677
677
},
678
- KubeadmVersion : "v1.12.0" ,
678
+ KubeadmVersion : constants . MinimumControlPlaneVersion . String () ,
679
679
DNSType : kubeadmapi .KubeDNS ,
680
680
DNSVersion : "1.14.7" ,
681
681
EtcdVersion : "3.1.12" ,
682
682
},
683
683
After : ClusterState {
684
- KubeVersion : "v1.12.0" ,
685
- KubeadmVersion : "v1.12.0" ,
684
+ KubeVersion : constants . MinimumControlPlaneVersion . String () ,
685
+ KubeadmVersion : constants . MinimumControlPlaneVersion . String () ,
686
686
DNSType : kubeadmapi .CoreDNS ,
687
687
DNSVersion : "1.2.6" ,
688
688
EtcdVersion : "3.2.24" ,
@@ -695,10 +695,10 @@ func TestGetAvailableUpgrades(t *testing.T) {
695
695
vg : & fakeVersionGetter {
696
696
clusterVersion : "v1.11.2" ,
697
697
kubeletVersion : "v1.11.2" , // the kubelet are on the same version as the control plane
698
- kubeadmVersion : "v1.12.0" ,
698
+ kubeadmVersion : constants . MinimumControlPlaneVersion . String () ,
699
699
700
- stablePatchVersion : "v1.12.0" ,
701
- stableVersion : "v1.12.0" ,
700
+ stablePatchVersion : constants . MinimumControlPlaneVersion . String () ,
701
+ stableVersion : constants . MinimumControlPlaneVersion . String () ,
702
702
},
703
703
etcdClient : etcdClient ,
704
704
beforeDNSType : kubeadmapi .KubeDNS ,
@@ -712,14 +712,14 @@ func TestGetAvailableUpgrades(t *testing.T) {
712
712
KubeletVersions : map [string ]uint16 {
713
713
"v1.11.2" : 1 ,
714
714
},
715
- KubeadmVersion : "v1.12.0" ,
715
+ KubeadmVersion : constants . MinimumControlPlaneVersion . String () ,
716
716
DNSType : kubeadmapi .KubeDNS ,
717
717
DNSVersion : "1.14.7" ,
718
718
EtcdVersion : "3.1.12" ,
719
719
},
720
720
After : ClusterState {
721
- KubeVersion : "v1.12.0" ,
722
- KubeadmVersion : "v1.12.0" ,
721
+ KubeVersion : constants . MinimumControlPlaneVersion . String () ,
722
+ KubeadmVersion : constants . MinimumControlPlaneVersion . String () ,
723
723
DNSType : kubeadmapi .KubeDNS ,
724
724
DNSVersion : "1.14.13" ,
725
725
EtcdVersion : "3.2.24" ,
@@ -860,7 +860,7 @@ func TestGetBranchFromVersion(t *testing.T) {
860
860
expectedVersion : "1.9" ,
861
861
},
862
862
{
863
- version : "v1.12.5" ,
863
+ version : constants . MinimumControlPlaneVersion . WithPatch ( 5 ). String () ,
864
864
expectedVersion : "1.12" ,
865
865
},
866
866
{
0 commit comments