Skip to content
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

✨ Implement MachinePool Machines in CAPI, CAPD, and clusterctl #7938

Closed
wants to merge 2 commits into from

Conversation

Jont828
Copy link
Contributor

@Jont828 Jont828 commented Jan 17, 2023

What this PR does / why we need it: Add implementation for MachinePool Machines based off of this proposal.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #4063

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 17, 2023
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 17, 2023
@Jont828
Copy link
Contributor Author

Jont828 commented Jan 17, 2023

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2023
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 18, 2023
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2023
@Jont828 Jont828 force-pushed the machinepool-machines branch 3 times, most recently from 920bcd2 to 29f27a9 Compare February 9, 2023 20:38
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 9, 2023
@Jont828
Copy link
Contributor Author

Jont828 commented Feb 13, 2023

/retest

@Jont828 Jont828 changed the title ✨ [WIP] Implement MachinePool Machines in CAPI, CAPD, and clusterctl ✨ Implement MachinePool Machines in CAPI, CAPD, and clusterctl Feb 13, 2023
@Jont828
Copy link
Contributor Author

Jont828 commented Feb 21, 2023

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 22, 2023
@Jont828 Jont828 force-pushed the machinepool-machines branch 2 times, most recently from b4cd27f to eb4eaeb Compare February 22, 2023 21:49
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 22, 2023
@Jont828
Copy link
Contributor Author

Jont828 commented Feb 23, 2023

/retest

@Jont828
Copy link
Contributor Author

Jont828 commented Apr 19, 2023

/retest

@Jont828 Jont828 force-pushed the machinepool-machines branch 2 times, most recently from 553215f to 06a2eb1 Compare April 25, 2023 02:27
@sbueringer
Copy link
Member

I'll try to review this week

@Jont828
Copy link
Contributor Author

Jont828 commented May 8, 2023

@sbueringer Could you take a look at this when you have some time. Thanks!

@sbueringer
Copy link
Member

@sbueringer Could you take a look at this when you have some time. Thanks!

Yup will do. Got side tracked unfortunately, but now I hopefully have some time.

@Jont828
Copy link
Contributor Author

Jont828 commented May 8, 2023

Sounds good, thanks!

api/v1beta1/machine_webhook.go Outdated Show resolved Hide resolved
api/v1beta1/machine_webhook.go Outdated Show resolved Hide resolved
"must match metadata.namespace",
),
)
// InfraRef can be empty for MachinePool Machines so skip the check in that case.
Copy link
Member

Choose a reason for hiding this comment

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

How are we getting around the OpenAPI validation run by the kube-apiserver? infrastructureRef is a required field on the Machine and its corresponding OpenAPI schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since it's not a pointer we just leave the infraRef uninitialized when we create it for MPMs. Is that what you're asking?

Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised that it works as in the schema in the CRD infraRef is required. So the apiserver should block

Copy link
Member

Choose a reason for hiding this comment

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

So for this to work I would expect that we have to change the Machine CRD to make infraRef optional (eg like config ref)

Copy link
Member

Choose a reason for hiding this comment

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

But maybe there's a reason why it works anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can have uninitialized structs even if it's not optional. Should be the same reason a blank label selector works in CAAPH.

exp/api/v1beta1/machinepool_types.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
api/v1beta1/machine_webhook.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
@Jont828
Copy link
Contributor Author

Jont828 commented May 11, 2023

/retest

@Jont828
Copy link
Contributor Author

Jont828 commented May 16, 2023

/retest

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/area machinepool

@k8s-ci-robot k8s-ci-robot added the area/machinepool Issues or PRs related to machinepools label May 17, 2023
@killianmuldoon killianmuldoon removed the area/clusterctl Issues or PRs related to clusterctl label May 17, 2023
@Jont828
Copy link
Contributor Author

Jont828 commented May 23, 2023

@fabriziopandini @sbueringer Do you think we're about good to merge this?

@fabriziopandini
Copy link
Member

@Jont828 As far as I remember we still have some racy conditions to sort out, but most of this is on me getting busy on many fronts and not keeping up on latest updates

I was chatting with @CecileRobertMichon about having a meeting to help in getting this moving forward, I will try to get this moving soon

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 25, 2023
@k8s-ci-robot k8s-ci-robot added area/clusterctl Issues or PRs related to clusterctl and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 6, 2023
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jun 8, 2023

@Jont828: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-apidiff-main 2032dfa link false /test pull-cluster-api-apidiff-main
pull-cluster-api-test-main 2032dfa link true /test pull-cluster-api-test-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 9, 2023
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

@Jont828
Copy link
Contributor Author

Jont828 commented Jun 19, 2023

Closing as this PR has been split into smaller PRs so it'll be easier to review. Those PRs include #8828, #8842, and #8836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl area/machinepool Issues or PRs related to machinepools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resources representing MachinePool Machines