diff --git a/pkg/asset/machines/baremetal/machines.go b/pkg/asset/machines/baremetal/machines.go index df0dffdb3..be26efb51 100644 --- a/pkg/asset/machines/baremetal/machines.go +++ b/pkg/asset/machines/baremetal/machines.go @@ -4,8 +4,7 @@ package baremetal import ( "fmt" - // FIXME: baremetal - libvirtprovider "github.com/openshift/cluster-api-provider-libvirt/pkg/apis/libvirtproviderconfig/v1alpha1" + baremetalprovider "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis/baremetal/v1alpha1" machineapi "github.com/openshift/cluster-api/pkg/apis/machine/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -60,7 +59,6 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine return machines, nil } -func provider(clusterName string, networkInterfaceAddress string, platform *baremetal.Platform, userDataSecret string) *libvirtprovider.LibvirtMachineProviderConfig { - // FIXME: baremetal - return &libvirtprovider.LibvirtMachineProviderConfig{} +func provider(clusterName string, networkInterfaceAddress string, platform *baremetal.Platform, userDataSecret string) *baremetalprovider.BareMetalMachineProviderSpec { + return &baremetalprovider.BareMetalMachineProviderSpec{} } diff --git a/pkg/asset/machines/master.go b/pkg/asset/machines/master.go index 6f2b69148..689f602f7 100644 --- a/pkg/asset/machines/master.go +++ b/pkg/asset/machines/master.go @@ -19,6 +19,8 @@ import ( azureprovider "sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1alpha1" openstackapi "sigs.k8s.io/cluster-api-provider-openstack/pkg/apis" openstackprovider "sigs.k8s.io/cluster-api-provider-openstack/pkg/apis/openstackproviderconfig/v1alpha1" + baremetalapi "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis" + baremetalprovider "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis/baremetal/v1alpha1" "github.com/openshift-metalkube/kni-installer/pkg/asset" "github.com/openshift-metalkube/kni-installer/pkg/asset/ignition/machine" @@ -254,11 +256,13 @@ func (m *Master) Machines() ([]machineapi.Machine, error) { azureapi.AddToScheme(scheme) libvirtapi.AddToScheme(scheme) openstackapi.AddToScheme(scheme) + baremetalapi.AddToScheme(scheme) decoder := serializer.NewCodecFactory(scheme).UniversalDecoder( awsprovider.SchemeGroupVersion, azureprovider.SchemeGroupVersion, libvirtprovider.SchemeGroupVersion, openstackprovider.SchemeGroupVersion, + baremetalprovider.SchemeGroupVersion, ) machines := []machineapi.Machine{} diff --git a/pkg/asset/machines/worker.go b/pkg/asset/machines/worker.go index ce2ff68f1..077fa65aa 100644 --- a/pkg/asset/machines/worker.go +++ b/pkg/asset/machines/worker.go @@ -19,6 +19,8 @@ import ( azureprovider "sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1alpha1" openstackapi "sigs.k8s.io/cluster-api-provider-openstack/pkg/apis" openstackprovider "sigs.k8s.io/cluster-api-provider-openstack/pkg/apis/openstackproviderconfig/v1alpha1" + baremetalapi "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis" + baremetalprovider "github.com/metal3-io/cluster-api-provider-baremetal/pkg/apis/baremetal/v1alpha1" "github.com/openshift-metalkube/kni-installer/pkg/asset" "github.com/openshift-metalkube/kni-installer/pkg/asset/ignition/machine" @@ -288,11 +290,13 @@ func (w *Worker) MachineSets() ([]machineapi.MachineSet, error) { libvirtapi.AddToScheme(scheme) openstackapi.AddToScheme(scheme) azureapi.AddToScheme(scheme) + baremetalapi.AddToScheme(scheme) decoder := serializer.NewCodecFactory(scheme).UniversalDecoder( awsprovider.SchemeGroupVersion, libvirtprovider.SchemeGroupVersion, openstackprovider.SchemeGroupVersion, azureprovider.SchemeGroupVersion, + baremetalprovider.SchemeGroupVersion, ) machineSets := []machineapi.MachineSet{}