@@ -158,13 +158,18 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
158158 }
159159 case baremetal .Name :
160160 config .Spec .PlatformSpec .Type = configv1 .BareMetalPlatformType
161+ config .Spec .PlatformSpec .BareMetal = & configv1.BareMetalPlatformSpec {}
161162 config .Status .PlatformStatus .BareMetal = & configv1.BareMetalPlatformStatus {
162163 APIServerInternalIP : installConfig .Config .Platform .BareMetal .APIVIPs [0 ],
163164 IngressIP : installConfig .Config .Platform .BareMetal .IngressVIPs [0 ],
164165 APIServerInternalIPs : installConfig .Config .Platform .BareMetal .APIVIPs ,
165166 IngressIPs : installConfig .Config .Platform .BareMetal .IngressVIPs ,
166167 LoadBalancer : installConfig .Config .Platform .BareMetal .LoadBalancer ,
167168 }
169+ config .Spec .PlatformSpec .BareMetal .APIServerInternalIPs = types .StringsToIPs (installConfig .Config .Platform .BareMetal .APIVIPs )
170+ config .Spec .PlatformSpec .BareMetal .IngressIPs = types .StringsToIPs (installConfig .Config .Platform .BareMetal .IngressVIPs )
171+ config .Spec .PlatformSpec .BareMetal .MachineNetworks = types .MachineNetworksToCIDRs (installConfig .Config .MachineNetwork )
172+ config .Status .PlatformStatus .BareMetal .MachineNetworks = types .MachineNetworksToCIDRs (installConfig .Config .MachineNetwork )
168173 case gcp .Name :
169174 config .Spec .PlatformSpec .Type = configv1 .GCPPlatformType
170175 config .Status .PlatformStatus .GCP = & configv1.GCPPlatformStatus {
@@ -228,15 +233,21 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
228233 config .Spec .PlatformSpec .Type = configv1 .NonePlatformType
229234 case openstack .Name :
230235 config .Spec .PlatformSpec .Type = configv1 .OpenStackPlatformType
236+ config .Spec .PlatformSpec .OpenStack = & configv1.OpenStackPlatformSpec {}
231237 config .Status .PlatformStatus .OpenStack = & configv1.OpenStackPlatformStatus {
232238 APIServerInternalIP : installConfig .Config .OpenStack .APIVIPs [0 ],
233239 IngressIP : installConfig .Config .OpenStack .IngressVIPs [0 ],
234240 APIServerInternalIPs : installConfig .Config .OpenStack .APIVIPs ,
235241 IngressIPs : installConfig .Config .OpenStack .IngressVIPs ,
236242 LoadBalancer : installConfig .Config .OpenStack .LoadBalancer ,
237243 }
244+ config .Spec .PlatformSpec .OpenStack .APIServerInternalIPs = types .StringsToIPs (installConfig .Config .Platform .OpenStack .APIVIPs )
245+ config .Spec .PlatformSpec .OpenStack .IngressIPs = types .StringsToIPs (installConfig .Config .Platform .OpenStack .IngressVIPs )
246+ config .Spec .PlatformSpec .OpenStack .MachineNetworks = types .MachineNetworksToCIDRs (installConfig .Config .MachineNetwork )
247+ config .Status .PlatformStatus .OpenStack .MachineNetworks = types .MachineNetworksToCIDRs (installConfig .Config .MachineNetwork )
238248 case vsphere .Name :
239249 config .Spec .PlatformSpec .Type = configv1 .VSpherePlatformType
250+ config .Spec .PlatformSpec .VSphere = & configv1.VSpherePlatformSpec {}
240251 if len (installConfig .Config .VSphere .APIVIPs ) > 0 {
241252 config .Status .PlatformStatus .VSphere = & configv1.VSpherePlatformStatus {
242253 APIServerInternalIP : installConfig .Config .VSphere .APIVIPs [0 ],
@@ -245,6 +256,8 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
245256 IngressIPs : installConfig .Config .VSphere .IngressVIPs ,
246257 LoadBalancer : installConfig .Config .VSphere .LoadBalancer ,
247258 }
259+ } else {
260+ config .Status .PlatformStatus .VSphere = & configv1.VSpherePlatformStatus {}
248261 }
249262
250263 config .Spec .PlatformSpec .VSphere = vsphereinfra .GetInfraPlatformSpec (installConfig )
@@ -253,6 +266,7 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
253266 cloudProviderConfigMapKey = "vsphere.conf"
254267 }
255268
269+ config .Status .PlatformStatus .VSphere .MachineNetworks = types .MachineNetworksToCIDRs (installConfig .Config .MachineNetwork )
256270 case ovirt .Name :
257271 config .Spec .PlatformSpec .Type = configv1 .OvirtPlatformType
258272 config .Status .PlatformStatus .Ovirt = & configv1.OvirtPlatformStatus {
0 commit comments