@@ -106,6 +106,8 @@ func withDefaultEnvironment() Option {
106106 e2e .Environment .controlPlaneMachineImagePrefix = e2e .envOrVar ("E2E_CONTROL_PLANE_MACHINE_IMAGE_PREFIX" )
107107 e2e .Environment .workerMachineImagePrefix = e2e .envOrVar ("E2E_WORKER_MACHINE_IMAGE_PREFIX" )
108108 e2e .Environment .Flavor = e2e .envOrVar ("E2E_DEFAULT_FLAVOR" )
109+ e2e .Environment .infrastructureProvider = e2e .envOrVar ("INFRASTRUCTURE_PROVIDER" )
110+ e2e .Environment .infrastructureProviderContract = e2e .envOrVar ("INFRASTRUCTURE_PROVIDER_CONTRACT" )
109111
110112 _ = e2e .envOrVar ("CONTROL_PLANE_MACHINE_SIZE" )
111113 _ = e2e .envOrVar ("WORKER_MACHINE_SIZE" )
@@ -138,6 +140,8 @@ type Environment struct {
138140 publicNetwork string
139141 kubeconfigPath string
140142 artifactsPath string
143+ infrastructureProvider string
144+ infrastructureProviderContract string
141145}
142146
143147func (ee * E2EContext ) ProvideBootstrapCluster () {
@@ -209,7 +213,7 @@ func (ee *E2EContext) InitManagementCluster(ctx context.Context) {
209213 ClusterProxy : ee .Environment .Bootstrap ,
210214 ClusterctlConfigPath : ee .Environment .ClusterctlConfigPath ,
211215 LogFolder : path .Join (ee .Environment .artifactsPath , "clusters" , "bootstrap" ),
212- InfrastructureProviders : ee .E2EConfig .GetProviderLatestVersionsByContract ("v1beta2" , "metal-stack" ),
216+ InfrastructureProviders : ee .E2EConfig .GetProviderLatestVersionsByContract (ee . Environment . infrastructureProviderContract , ee . Environment . infrastructureProvider ),
213217 AddonProviders : ee .E2EConfig .GetProviderLatestVersionsByContract ("v1beta2" , clusterctlconfig .HelmAddonProviderName ),
214218 BootstrapProviders : ee .E2EConfig .GetProviderLatestVersionsByContract ("v1beta2" , clusterctlconfig .KubeadmBootstrapProviderName ),
215219 ControlPlaneProviders : ee .E2EConfig .GetProviderLatestVersionsByContract ("v1beta2" , clusterctlconfig .KubeadmControlPlaneProviderName ),
0 commit comments