Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ This allows to convey desired state of machines in a cluster in a declarative fa

- [cluster-api-provider-openstack](https://github.com/kubernetes-sigs/cluster-api-provider-openstack). Coming soon.

- [cluster-api-provider-baremetal](https://github.com/metalkube/cluster-api-provider-baremetal). Under development in [MetalKube](http://metalkube.org).

- [Node Controller](https://github.com/kubernetes-sigs/cluster-api/tree/master/pkg/controller)
- Reconciles desired state of machines by matching IP addresses of machine objects with IP addresses of node objects. Annotating node with a special label containing machine name that the cluster-api node controller interprets and sets corresponding nodeRef field of each relevant machine.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: machine-api-operator-images
namespace: openshift-machine-api
data:
images.json: '{"machineAPIOperator": "docker.io/openshift/origin-machine-api-operator:v4.0.0", "clusterAPIControllerAWS": "docker.io/openshift/origin-aws-machine-controllers:v4.0.0", "clusterAPIControllerOpenStack": "docker.io/openshift/origin-openstack-machine-controllers:v4.0.0", "clusterAPIControllerLibvirt": "docker.io/openshift/origin-libvirt-machine-controllers:v4.0.0", "clusterAPIControllerKubemark": "docker.io/gofed/kubemark-machine-controllers:v1.0"}'
images.json: '{"machineAPIOperator": "docker.io/openshift/origin-machine-api-operator:v4.0.0", "clusterAPIControllerAWS": "docker.io/openshift/origin-aws-machine-controllers:v4.0.0", "clusterAPIControllerOpenStack": "docker.io/openshift/origin-openstack-machine-controllers:v4.0.0", "clusterAPIControllerLibvirt": "docker.io/openshift/origin-libvirt-machine-controllers:v4.0.0", "clusterAPIControllerKubemark": "docker.io/gofed/kubemark-machine-controllers:v1.0", "clusterAPIControllerBareMetal": "quay.io/openshift/origin-baremetal-machine-controllers:v4.0.0"}'
4 changes: 4 additions & 0 deletions install/image-references
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ spec:
from:
kind: DockerImage
name: docker.io/openshift/origin-libvirt-machine-controllers:v4.0.0
- name: baremetal-machine-controllers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

until your image is built like all other release images in our payload, this will fail CI testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Derek. I'll look into that next, then.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Images would be mirrored to docker.io once openshift/release#3066 is merged

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until ART has published baremetal-machine-controllers to quay this PR cannot be merged.

oc get istag -n ocp 4.0-art-latest:baremetal-machine-controllers
Error from server (NotFound): imagestreamtags.image.openshift.io "4.0-art-latest:baremetal-machine-controllers" not found

Please work with the aos-art channel

from:
kind: DockerImage
name: quay.io/openshift/origin-baremetal-machine-controllers:v4.0.0
3 changes: 1 addition & 2 deletions pkg/operator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ func getProviderControllerFromImages(provider Provider, images Images) (string,
case KubemarkProvider:
return images.ClusterAPIControllerKubemark, nil
case BareMetalProvider:
//FIXME Replace with a proper controller once its available
return images.ClusterAPIControllerLibvirt, nil
return images.ClusterAPIControllerBareMetal, nil
case NoneProvider:
return "None", nil
}
Expand Down
21 changes: 20 additions & 1 deletion pkg/operator/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var (
expectedLibvirtImage = "docker.io/openshift/origin-libvirt-machine-controllers:v4.0.0"
expectedOpenstackImage = "docker.io/openshift/origin-openstack-machine-controllers:v4.0.0"
expectedMachineAPIOperatorImage = "docker.io/openshift/origin-machine-api-operator:v4.0.0"
expectedBareMetalImage = "quay.io/openshift/origin-baremetal-machine-controllers:v4.0.0"
)

func TestInstallConfigFromClusterConfig(t *testing.T) {
Expand Down Expand Up @@ -53,7 +54,7 @@ pullSecret: “"
if err != nil {
t.Errorf("failed to get install config: %v", err)
}
if res.InstallPlatform.AWS != nil && res.InstallPlatform.Libvirt == nil && res.InstallPlatform.OpenStack == nil {
if res.InstallPlatform.AWS != nil && res.InstallPlatform.Libvirt == nil && res.InstallPlatform.OpenStack == nil && res.InstallPlatform.BareMetal == nil {
t.Logf("got install config successfully: %+v", res)
} else {
t.Errorf("failed to getInstallConfigFromClusterConfig. Expected aws to be not nil, got: %+v", res)
Expand All @@ -71,6 +72,7 @@ func TestGetProviderFromInstallConfig(t *testing.T) {
AWS: notNil,
Libvirt: nil,
OpenStack: nil,
BareMetal: nil,
},
},
expected: AWSProvider,
Expand All @@ -81,6 +83,7 @@ func TestGetProviderFromInstallConfig(t *testing.T) {
AWS: nil,
Libvirt: notNil,
OpenStack: nil,
BareMetal: nil,
},
},
expected: LibvirtProvider,
Expand All @@ -102,9 +105,21 @@ func TestGetProviderFromInstallConfig(t *testing.T) {
AWS: nil,
Libvirt: nil,
OpenStack: notNil,
BareMetal: nil,
},
},
expected: OpenStackProvider,
},
{
ic: &InstallConfig{
InstallPlatform{
AWS: nil,
Libvirt: nil,
OpenStack: nil,
BareMetal: notNil,
},
},
expected: BareMetalProvider,
}}

for _, test := range tests {
Expand All @@ -123,6 +138,7 @@ func TestGetProviderFromInstallConfig(t *testing.T) {
AWS: nil,
Libvirt: notNil,
OpenStack: notNil,
BareMetal: nil,
},
}
res, err := getProviderFromInstallConfig(ic)
Expand All @@ -145,6 +161,9 @@ func TestGetImagesFromJSONFile(t *testing.T) {
if img.ClusterAPIControllerOpenStack != expectedOpenstackImage {
t.Errorf("failed getImagesFromJSONFile. Expected: %s, got: %s", expectedOpenstackImage, img.ClusterAPIControllerOpenStack)
}
if img.ClusterAPIControllerBareMetal != expectedBareMetalImage {
t.Errorf("failed getImagesFromJSONFile. Expected: %s, got: %s", expectedBareMetalImage, img.ClusterAPIControllerBareMetal)
}
}

func TestGetProviderControllerFromImages(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/operator/fixtures/images.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"clusterAPIControllerAWS": "docker.io/openshift/origin-aws-machine-controllers:v4.0.0",
"clusterAPIControllerOpenStack": "docker.io/openshift/origin-openstack-machine-controllers:v4.0.0",
"clusterAPIControllerLibvirt": "docker.io/openshift/origin-libvirt-machine-controllers:v4.0.0",
"machineAPIOperator": "docker.io/openshift/origin-machine-api-operator:v4.0.0"
"machineAPIOperator": "docker.io/openshift/origin-machine-api-operator:v4.0.0",
"clusterAPIControllerBareMetal": "quay.io/openshift/origin-baremetal-machine-controllers:v4.0.0"
}