@@ -66,7 +66,49 @@ func KCPUpgradeSpec(ctx context.Context, inputGetter func() KCPUpgradeSpecInput)
6666 namespace , cancelWatches = setupSpecNamespace (ctx , specName , input .BootstrapClusterProxy , input .ArtifactFolder )
6767 })
6868
69- It ("Should successfully upgrade Kubernetes, DNS, kube-proxy, and etcd" , func () {
69+ It ("Should successfully upgrade Kubernetes, DNS, kube-proxy, and etcd in a single control plane cluster" , func () {
70+
71+ By ("Creating a workload cluster" )
72+ Expect (input .E2EConfig .Variables ).To (HaveKey (clusterctl .KubernetesVersion ))
73+ Expect (input .E2EConfig .Variables ).To (HaveKey (clusterctl .CNIPath ))
74+
75+ cluster , controlPlane , _ = clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
76+ ClusterProxy : input .BootstrapClusterProxy ,
77+ ConfigCluster : clusterctl.ConfigClusterInput {
78+ LogFolder : filepath .Join (input .ArtifactFolder , "clusters" , input .BootstrapClusterProxy .GetName ()),
79+ ClusterctlConfigPath : input .ClusterctlConfigPath ,
80+ KubeconfigPath : input .BootstrapClusterProxy .GetKubeconfigPath (),
81+ InfrastructureProvider : clusterctl .DefaultInfrastructureProvider ,
82+ Flavor : clusterctl .DefaultFlavor ,
83+ Namespace : namespace .Name ,
84+ ClusterName : fmt .Sprintf ("cluster-%s" , util .RandomString (6 )),
85+ KubernetesVersion : input .E2EConfig .GetKubernetesVersion (),
86+ ControlPlaneMachineCount : pointer .Int64Ptr (1 ),
87+ WorkerMachineCount : pointer .Int64Ptr (1 ),
88+ },
89+ CNIManifestPath : input .E2EConfig .GetCNIPath (),
90+ WaitForClusterIntervals : input .E2EConfig .GetIntervals (specName , "wait-cluster" ),
91+ WaitForControlPlaneIntervals : input .E2EConfig .GetIntervals (specName , "wait-control-plane" ),
92+ WaitForMachineDeployments : input .E2EConfig .GetIntervals (specName , "wait-worker-nodes" ),
93+ })
94+
95+ By ("Upgrading Kubernetes, DNS, kube-proxy, and etcd versions" )
96+ framework .UpgradeControlPlaneAndWaitForUpgrade (ctx , framework.UpgradeControlPlaneAndWaitForUpgradeInput {
97+ ClusterProxy : input .BootstrapClusterProxy ,
98+ Cluster : cluster ,
99+ ControlPlane : controlPlane ,
100+ //Valid image tags for v1.17.2
101+ EtcdImageTag : "3.4.3-0" ,
102+ DNSImageTag : "1.6.6" ,
103+ KubernetesUpgradeVersion : "v1.17.2" ,
104+ WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
105+ WaitForDNSUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
106+ WaitForEtcdUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
107+ })
108+
109+ By ("PASSED!" )
110+ })
111+ It ("Should successfully upgrade Kubernetes, DNS, kube-proxy, and etcd in a HA cluster" , func () {
70112
71113 By ("Creating a workload cluster" )
72114 Expect (input .E2EConfig .Variables ).To (HaveKey (clusterctl .KubernetesVersion ))
0 commit comments