Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
Merge pull request #85 from sadasu/sdasu-dev
Browse files Browse the repository at this point in the history
Machine objects for master nodes contain libvirt providerSpec
  • Loading branch information
russellb authored May 22, 2019
2 parents f0b27c5 + b144b97 commit 68b31c3
Show file tree
Hide file tree
Showing 13 changed files with 653 additions and 5 deletions.
13 changes: 13 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,8 @@ required = [
branch = "master"
name = "sigs.k8s.io/cluster-api-provider-azure"
source = "https://github.com/openshift/cluster-api-provider-azure.git"

[[constraint]]
branch = "master"
name = "github.com/metal3-io/cluster-api-provider-baremetal"
source = "github.com/openshift/cluster-api-provider-baremetal/pkg/apis"
8 changes: 3 additions & 5 deletions pkg/asset/machines/baremetal/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{}
}
4 changes: 4 additions & 0 deletions pkg/asset/machines/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{}
Expand Down
4 changes: 4 additions & 0 deletions pkg/asset/machines/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{}
Expand Down
201 changes: 201 additions & 0 deletions vendor/github.com/metal3-io/cluster-api-provider-baremetal/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 68b31c3

Please sign in to comment.