@@ -154,18 +154,27 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
154
154
} else {
155
155
// Cluster is not using ClusterClass, upgrade via individual resources.
156
156
By ("Upgrading the Kubernetes control-plane" )
157
- var upgradeMachineTemplateTo * string
158
- if input .E2EConfig .HasVariable (MachineTemplateUpgradeTo ) {
159
- upgradeMachineTemplateTo = pointer .StringPtr (input .E2EConfig .GetVariable (MachineTemplateUpgradeTo ))
157
+ var (
158
+ upgradeCPMachineTemplateTo * string
159
+ upgradeWorkersMachineTemplateTo * string
160
+ )
161
+
162
+ if input .E2EConfig .HasVariable (CPMachineTemplateUpgradeTo ) {
163
+ upgradeCPMachineTemplateTo = pointer .StringPtr (input .E2EConfig .GetVariable (CPMachineTemplateUpgradeTo ))
160
164
}
165
+
166
+ if input .E2EConfig .HasVariable (WorkersMachineTemplateUpgradeTo ) {
167
+ upgradeWorkersMachineTemplateTo = pointer .StringPtr (input .E2EConfig .GetVariable (WorkersMachineTemplateUpgradeTo ))
168
+ }
169
+
161
170
framework .UpgradeControlPlaneAndWaitForUpgrade (ctx , framework.UpgradeControlPlaneAndWaitForUpgradeInput {
162
171
ClusterProxy : input .BootstrapClusterProxy ,
163
172
Cluster : clusterResources .Cluster ,
164
173
ControlPlane : clusterResources .ControlPlane ,
165
174
EtcdImageTag : input .E2EConfig .GetVariable (EtcdVersionUpgradeTo ),
166
175
DNSImageTag : input .E2EConfig .GetVariable (CoreDNSVersionUpgradeTo ),
167
176
KubernetesUpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
168
- UpgradeMachineTemplate : upgradeMachineTemplateTo ,
177
+ UpgradeMachineTemplate : upgradeCPMachineTemplateTo ,
169
178
WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
170
179
WaitForKubeProxyUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
171
180
WaitForDNSUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
@@ -178,7 +187,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
178
187
ClusterProxy : input .BootstrapClusterProxy ,
179
188
Cluster : clusterResources .Cluster ,
180
189
UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
181
- UpgradeMachineTemplate : upgradeMachineTemplateTo ,
190
+ UpgradeMachineTemplate : upgradeWorkersMachineTemplateTo ,
182
191
MachineDeployments : clusterResources .MachineDeployments ,
183
192
WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-worker-nodes" ),
184
193
})
0 commit comments