@@ -113,7 +113,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
113
113
Expect (input .E2EConfig .Variables ).To (HaveKey (KubernetesVersionUpgradeTo ))
114
114
115
115
Expect (input .E2EConfig .Variables ).To (HaveKey (kubetestConfigurationVariable ), "% spec requires a %s variable to be defined in the config file" , specName , kubetestConfigurationVariable )
116
- kubetestConfigFilePath = input .E2EConfig .GetVariable (kubetestConfigurationVariable )
116
+ kubetestConfigFilePath = input .E2EConfig .MustGetVariable (kubetestConfigurationVariable )
117
117
Expect (kubetestConfigFilePath ).To (BeAnExistingFile (), "%s should be a valid kubetest config file" )
118
118
119
119
if input .ControlPlaneMachineCount == nil {
@@ -129,10 +129,10 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
129
129
}
130
130
131
131
if input .E2EConfig .HasVariable (EtcdVersionUpgradeTo ) {
132
- etcdVersionUpgradeTo = input .E2EConfig .GetVariable (EtcdVersionUpgradeTo )
132
+ etcdVersionUpgradeTo = input .E2EConfig .MustGetVariable (EtcdVersionUpgradeTo )
133
133
}
134
134
if input .E2EConfig .HasVariable (CoreDNSVersionUpgradeTo ) {
135
- coreDNSVersionUpgradeTo = input .E2EConfig .GetVariable (CoreDNSVersionUpgradeTo )
135
+ coreDNSVersionUpgradeTo = input .E2EConfig .MustGetVariable (CoreDNSVersionUpgradeTo )
136
136
}
137
137
138
138
// Setup a Namespace where to host objects for this spec and create a watcher for the Namespace events.
@@ -160,7 +160,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
160
160
Flavor : ptr .Deref (input .Flavor , "upgrades" ),
161
161
Namespace : namespace .Name ,
162
162
ClusterName : clusterName ,
163
- KubernetesVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeFrom ),
163
+ KubernetesVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeFrom ),
164
164
ControlPlaneMachineCount : ptr.To [int64 ](controlPlaneMachineCount ),
165
165
WorkerMachineCount : ptr.To [int64 ](workerMachineCount ),
166
166
},
@@ -182,7 +182,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
182
182
DNSImageTag : coreDNSVersionUpgradeTo ,
183
183
MachineDeployments : clusterResources .MachineDeployments ,
184
184
MachinePools : clusterResources .MachinePools ,
185
- KubernetesUpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
185
+ KubernetesUpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
186
186
WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
187
187
WaitForMachinePoolToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-pool-upgrade" ),
188
188
WaitForKubeProxyUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
@@ -203,11 +203,11 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
203
203
)
204
204
205
205
if input .E2EConfig .HasVariable (CPMachineTemplateUpgradeTo ) {
206
- upgradeCPMachineTemplateTo = ptr .To (input .E2EConfig .GetVariable (CPMachineTemplateUpgradeTo ))
206
+ upgradeCPMachineTemplateTo = ptr .To (input .E2EConfig .MustGetVariable (CPMachineTemplateUpgradeTo ))
207
207
}
208
208
209
209
if input .E2EConfig .HasVariable (WorkersMachineTemplateUpgradeTo ) {
210
- upgradeWorkersMachineTemplateTo = ptr .To (input .E2EConfig .GetVariable (WorkersMachineTemplateUpgradeTo ))
210
+ upgradeWorkersMachineTemplateTo = ptr .To (input .E2EConfig .MustGetVariable (WorkersMachineTemplateUpgradeTo ))
211
211
}
212
212
213
213
framework .UpgradeControlPlaneAndWaitForUpgrade (ctx , framework.UpgradeControlPlaneAndWaitForUpgradeInput {
@@ -216,7 +216,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
216
216
ControlPlane : clusterResources .ControlPlane ,
217
217
EtcdImageTag : etcdVersionUpgradeTo ,
218
218
DNSImageTag : coreDNSVersionUpgradeTo ,
219
- KubernetesUpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
219
+ KubernetesUpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
220
220
UpgradeMachineTemplate : upgradeCPMachineTemplateTo ,
221
221
WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
222
222
WaitForKubeProxyUpgrade : input .E2EConfig .GetIntervals (specName , "wait-machine-upgrade" ),
@@ -234,7 +234,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
234
234
framework .UpgradeMachineDeploymentsAndWait (ctx , framework.UpgradeMachineDeploymentsAndWaitInput {
235
235
ClusterProxy : input .BootstrapClusterProxy ,
236
236
Cluster : clusterResources .Cluster ,
237
- UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
237
+ UpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
238
238
UpgradeMachineTemplate : upgradeWorkersMachineTemplateTo ,
239
239
MachineDeployments : clusterResources .MachineDeployments ,
240
240
WaitForMachinesToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-worker-nodes" ),
@@ -245,7 +245,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
245
245
framework .UpgradeMachinePoolAndWait (ctx , framework.UpgradeMachinePoolAndWaitInput {
246
246
ClusterProxy : input .BootstrapClusterProxy ,
247
247
Cluster : clusterResources .Cluster ,
248
- UpgradeVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
248
+ UpgradeVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
249
249
WaitForMachinePoolToBeUpgraded : input .E2EConfig .GetIntervals (specName , "wait-machine-pool-upgrade" ),
250
250
MachinePools : clusterResources .MachinePools ,
251
251
})
@@ -258,7 +258,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
258
258
workloadClient := workloadProxy .GetClient ()
259
259
framework .WaitForNodesReady (ctx , framework.WaitForNodesReadyInput {
260
260
Lister : workloadClient ,
261
- KubernetesVersion : input .E2EConfig .GetVariable (KubernetesVersionUpgradeTo ),
261
+ KubernetesVersion : input .E2EConfig .MustGetVariable (KubernetesVersionUpgradeTo ),
262
262
Count : int (clusterResources .ExpectedTotalNodes ()),
263
263
WaitForNodesReady : input .E2EConfig .GetIntervals (specName , "wait-nodes-ready" ),
264
264
})
0 commit comments