-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Machine api #645
Machine api #645
Conversation
Hi @enxebre. Thanks for your PR. I'm waiting for a kubernetes-sigs or kubernetes 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. |
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.
Overall LGTM and really nice to see this being split up.
Not sure that machine/common
as a package makes sense anymore.
Isn't everything in machine/common
only related to machines? If so, can this not be moved up into machine
?
'common' as a package name doesn't really convey much.
@@ -42,16 +45,16 @@ func newClusterStatus(errorReason common.ClusterStatusError, errorMessage string | |||
} | |||
} | |||
|
|||
func newMachineStatus(nodeRef *v1.ObjectReference, errorReason *common.MachineStatusError, errorMessage *string) v1alpha1.MachineStatus { | |||
return v1alpha1.MachineStatus{ | |||
func newMachineStatus(nodeRef *v1.ObjectReference, errorReason *machinecommon.MachineStatusError, errorMessage *string) machinev1alpha1.MachineStatus { |
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.
No strictly related to your overall change but machinecommon
seems an oxymoron. It's not actually common if it is related to machines. And 'common' generally doesn't convey much.
|
||
package apis | ||
|
||
//import ( |
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.
Why are we committing commented out code?
limitations under the License. | ||
*/ | ||
|
||
package common |
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.
So now I'm wondering why this is common
. Can this not all move to ../machines
? It would convey so much more as it is directly nested under machines.
pkg/util/util.go
Outdated
@@ -177,33 +178,33 @@ func GetNamespaceOrDefault(namespace string) string { | |||
return namespace | |||
} | |||
|
|||
func ParseClusterYaml(file string) (*clusterv1.Cluster, error) { | |||
func ParseClusterYaml(file string) (*cluster.Cluster, error) { |
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 consistency] Why is this no longer clusterv1
?
58e44eb
to
2e1a263
Compare
I am very much not in favor of this. Was there a situation already in which one part of the API held back the other one? The cluster-api repo is in my opinion about two things:
I think the actual critique here is not so much about the the types themselves being coupled strongly but about the machine actuator enforcing the usage of a cluster cr even when one does not want to manage the whole cluster with it. That however is a shortcoming of the implementation that is in this repository. There are other implementations that work differently out there. The fix for this issue should be one of:
But not changing anything on this API itself. |
@alvaroaleman thanks for feedback. I agree, upstream solution still should be valid and useful for many use cases, and provide the "right common" for guiding and therefore favouring adoption. As the cluster api overall project we'll still need to solve problems related to ha/cluster/control-plane/infra/bootstrapping which imho should evolve an API orthogonally to the "machine" API where the scope is more limited by nature. This is to provide balance between flexibility and having a manageable contained scope for the different layers of the project by giving clear boundaries and separation of responsibilities regardless the controllers implementation upstream/downstream |
Dropping in because this came up at KubeCon - historically, a Kube API group is intended to roughly encompass a lifecycle. That lifecycle has sometimes been SIG defined (autoscaling) but has also been related to orthogonal features (batch and v2beta1 being created for cronjob specifically, or the split between the various parts of what sig-auth controls). When boundaries can exist between lifecycles, we strongly recommend those be created. Federation v1 is a cautionary tale around coupling too closely between "high level API" (the workloads) and the low level api (the workload APIs on each cluster) - we erred a bit too far on putting everything all together, while federation v2 has focused on a much lower level primitive succeeding. In this case, machine API is absolutely valuable regardless of the state of the cluster API. It is a building block, while the larger cluster API is a more opinionated and potentially differently-lifecycled API. I would strongly encourage the SIG to consider having well factored building block APIs be at a different lifecycle, and potentially move into different groups. While there is a unifying philosophy (as there is for all Kubernetes objects), the practical realities of shipping APIs favors patterns where each API that can stand on its own can do so and evolve. |
/ok-to-test |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: enxebre If they are not already assigned, you can assign the PR to them by writing 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 |
b0ac693
to
a863b27
Compare
/test pull-cluster-api-test |
I agree with @smarterclayton and @enxebre |
@roberthbailey sounds good, I'll share my input in the doc |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Closing this since we discussed waiting until the types stabilize more before potentially breaking out into different api groups. /close |
@detiber: Closed this PR. In response to this:
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. |
What this PR does / why we need it:
Decouple the machine API from the Cluster API group so they can be promoted at separate cadence.
This will help to solidify boundaries between "cluster" and "machines" so one API is not necessarily holding back the other one, hence this will favour adoption for use cases where a consumer wants to leverage solely one of the APIs. The most common use case is where a user wants to leverage the machine API over a bespoke "cluster" deployment
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Related to:
#490
#497
#639
#644
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: