Support setting network type from AgentClusterInstall
Currently the network type is unspecified for cluster0. When
unspecified the network type defaults to OpenShiftSDN, even
if the user had specified OVNKubernetes.
We need the cluster to reflect the network type specified in
AgentClusterInstall. The CreateClusterParams for cluster0 now
includes the AgentClusterInstall's NetworkType value.
@@ -62,6 +62,11 @@ func RegisterCluster(ctx context.Context, log *log.Logger, bmInventory *client.A
log.Infof("releaseImage version %s cpuarch %s", releaseImageVersion, releaseImageCPUArch)
clusterParams := controllers.CreateClusterParams(&cd, &aci, pullSecret, releaseImageVersion, releaseImageCPUArch, nil)
+
+ if aci.Spec.Networking.NetworkType != "" {
+ clusterParams.NetworkType = &aci.Spec.Networking.NetworkType
+ }
+
clientClusterParams := &installer.V2RegisterClusterParams{
NewClusterParams: clusterParams,
}
