-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate baremetal-operator with machine-api-operator #302
Conversation
Hi @sadasu. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
2d90d12
to
6244ed2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it will install and start the operator, but not define the CRD it uses. Should the operator do that for itself? Or is that supposed to happen some other way? (Or maybe I missed a detail here)
Yes, currently the changes proposed here does not define the CRD that the baremetal-operator uses. Code has changes quite a bit since these changes were proposed. Investigating to see if there is now a mechanism to provide baremetal-operator with the CRD at the time of deployment. |
OK, that was an honest question on my part. I have no idea how it's supposed to work, but if the operator needs to do it let me know and we can make that happen. |
@sadasu @dhellmann Take a look at the contents of the It seems one option would be to drop the A second option would be to define the CRD via the API in go code in this patch, and ensure that's done before the baremetal-operator gets launched. A third would be to have the baremetal-operator define its own CRD at runtime if not already defined, I suppose. Any other ideas? Maybe some of the other members of the cloud team that maintains |
I think that's a good starting point to unblock several other pieces of work to integrate the baremetal operator with the installer.
This seems like a better long term approach, once we are unblocked.
I expect we'll have issues giving the operator permissions to define CRDs, so while it makes sense from the perspective of only having the CRD when needed I don't think it's a viable approach.
|
pkg/operator/operator.go
Outdated
}, | ||
BaremetalOperatorConfig: BaremetalConfig{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should set this whole config to nil if baremetal is not enabled. Build BaremetalConfig object above if necesary and refer to it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right before we define the BaremetalConfig object appears to be the only place we should check baremetalEnabled. All the other checks above are redundant. Make that determination here, if it's true, get the images and create BaremetalConfig; else BaremetalConfig := nil
This means we can keep the OCP specific pieces out of the upstream repo, and prototype the integration which will ultimately be handled via openshift/machine-api-operator#302 Also set the RHCOS image URL n the configmap based on the variable from common.sh
This means we can keep the OCP specific pieces out of the upstream repo, and prototype the integration which will ultimately be handled via openshift/machine-api-operator#302 Also set the RHCOS image URL n the configmap based on the variable from common.sh Co-Authored-By: Ian Main <[email protected]>
85e1610
to
8fbd9e4
Compare
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: baremetalhosts.metal3.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to figure out if we want to ship in this namespace. @enxebre @derekwaynecarr @eparis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the resource is alpha, i would like to use the community project name for these resources in the interim. before graduating to GA in openshift, i want to understand how these API resources are evolved in community context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few things, otherwise looks good to me.
- bmh | ||
- bmhost | ||
scope: Namespaced | ||
version: v1alpha1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we good shipping with alpha commitment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this high touch beta, yes. We'll raise the version level in an upcoming release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpha is fine.
|
||
// In addition, if the Provider is BareMetal, then bring up | ||
// the baremetal-operator pod | ||
if config.BaremetalControllers.BaremetalOperator != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the baremetal actuator depends on this components to run successfully? if so you'd need to ensure this gets deployed before syncClusterAPIController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The baremetal actuator does not depend on the metal3 pod to run successfully (but needs it to be running to be useful.) It is OK for the baremetal actuator if the metal3 pod is available later. Also, if the metal3 pod deployment wasn't successful we would still want to go ahead with the machine-api-controller pod deployment. For these reasons, would like to keep the ordering as is.
These changes allow the MAO to bring up the metal3 pod that contains the baremetal-operator and Ironic containers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, nice work!
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Changes required for the MAO to also perform the Baremetal deployment.