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

✨ Add MachinePool Machine implementation in core CAPI components #8828

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

Jont828
Copy link
Contributor

@Jont828 Jont828 commented Jun 8, 2023

What this PR does / why we need it: Add implementation for MachinePool Machines based off of this proposal. This only affects Machines and MachinePools, and the DockerMachinePool implementation and fallback machine implementation will come in a follow up.

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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 8, 2023
@Jont828 Jont828 changed the title Implement MachinePool Machines in core CAPI components ✨ Implement MachinePool Machines in core CAPI components Jun 8, 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 Jun 12, 2023
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed 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. labels Jun 12, 2023
@Jont828 Jont828 changed the title ✨ Implement MachinePool Machines in core CAPI components ✨ Add MachinePool Machine implementation in core CAPI components Jun 12, 2023
@Jont828 Jont828 force-pushed the mpm-base branch 2 times, most recently from 29bcdf1 to ae90e1a Compare June 12, 2023 22:07
@Jont828
Copy link
Contributor Author

Jont828 commented Jun 12, 2023

/assign @fabriziopandini

I've pulled out the core CAPI implementation. I think this is the implementation that we really want to get merged first so that other providers can get their hands on it when the next release comes.

@Jont828
Copy link
Contributor Author

Jont828 commented Jun 12, 2023

/retest

2 similar comments
@Jont828
Copy link
Contributor Author

Jont828 commented Jun 13, 2023

/retest

@killianmuldoon
Copy link
Contributor

/retest

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

first pass

config/manager/manager.yaml Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
docs/book/src/reference/labels_and_annotations.md Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.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
internal/controllers/machine/machine_controller_phases.go Outdated Show resolved Hide resolved
util/labels/helpers.go Outdated Show resolved Hide resolved
api/v1beta1/machine_webhook.go Outdated Show resolved Hide resolved
api/v1beta1/machine_types.go Show resolved Hide resolved
api/v1beta1/machine_webhook.go Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

lgtm aside from the thread about removing the selector

@Jont828
Copy link
Contributor Author

Jont828 commented Jul 7, 2023

@fabriziopandini @sbueringer I've reverted the changes in the Machine controller and removed the deleteWithoutInfrastructure functionality in the MP controller as well. Besides the final TODOs on testing with CAPD (had some issues setting up Tilt on my machine), I think that should cover our main concerns.

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Just minor comments. Otherwise looks good to me

exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller_phases.go Outdated Show resolved Hide resolved
@fabriziopandini
Copy link
Member

changes look good to me pending open comments and a feedback about tests with CAPD

@Jont828 Jont828 force-pushed the mpm-base branch 6 times, most recently from ed1cb76 to f60fa9d Compare July 8, 2023 03:36
@Jont828
Copy link
Contributor Author

Jont828 commented Jul 8, 2023

/retest

@sbueringer
Copy link
Member

sbueringer commented Jul 10, 2023

lgtm pending golangci-lint:

exp/internal/controllers/machinepool_controller_phases_test.go:1322:5: ginkgo-linter: wrong error assertion; consider using `g.Expect(err).To(HaveOccurred())` instead (ginkgolinter)
                                g.Expect(err).ToNot(BeNil())
                                ^

(No idea about all the errors in: https://github.com/kubernetes-sigs/cluster-api/actions/runs/5492454930/jobs/10037227687, fixing that one finding lead to a green run locally)

@sbueringer
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 10, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fa939587157fc96e970f7ab11bf406347df4a84e

@sbueringer
Copy link
Member

/assign @CecileRobertMichon @fabriziopandini

@Jont828
Copy link
Contributor Author

Jont828 commented Jul 10, 2023

@fabriziopandini Good to go?

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@fabriziopandini
Copy link
Member

/lgtm
/approve

Yay! great work!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2023
@k8s-ci-robot k8s-ci-robot merged commit 03f0752 into kubernetes-sigs:main Jul 10, 2023
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/machinepool Issues or PRs related to machinepools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resources representing MachinePool Machines
8 participants