@@ -167,19 +167,20 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
167
167
WaitForEtcdUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
168
168
})
169
169
170
- By ("Upgrading the machine deployment" )
171
- framework .UpgradeMachineDeploymentsAndWait (ctx , framework.UpgradeMachineDeploymentsAndWaitInput {
172
- ClusterProxy : input .BootstrapClusterProxy ,
173
- Cluster : clusterResources .Cluster ,
174
- UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
175
- MachineDeployments : clusterResources .MachineDeployments ,
176
- WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-worker-nodes" ),
177
- })
170
+ if workerMachineCount > 0 {
171
+ By ("Upgrading the machine deployment" )
172
+ framework .UpgradeMachineDeploymentsAndWait (ctx , framework.UpgradeMachineDeploymentsAndWaitInput {
173
+ ClusterProxy : input .BootstrapClusterProxy ,
174
+ Cluster : clusterResources .Cluster ,
175
+ UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
176
+ MachineDeployments : clusterResources .MachineDeployments ,
177
+ WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-worker-nodes" ),
178
+ })
179
+ }
178
180
}
179
181
180
- // Only attempt to upgrade MachinePools if they were provided in the template,
181
- // also adjust the expected workerMachineCount if we have MachinePools
182
- if len (clusterResources .MachinePools ) > 0 {
182
+ // Only attempt to upgrade MachinePools if they were provided in the template.
183
+ if len (clusterResources .MachinePools ) > 0 && workerMachineCount > 0 {
183
184
By ("Upgrading the machinepool instances" )
184
185
framework .UpgradeMachinePoolAndWait (ctx , framework.UpgradeMachinePoolAndWaitInput {
185
186
ClusterProxy : input .BootstrapClusterProxy ,
0 commit comments