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

⚠️ Move kubeadm controllers to internal #5493

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
Note: this PR is not marked as breaking given that we agreed on the criteria on beforehand. However, happy to change icon if we prefer to surface this in the release note.

Which issue(s) this PR fixes:
Rif #5455

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 25, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 25, 2021
Comment on lines +29 to +30
// Following types provides access to reconcilers implemented in internal/controllers, thus
// allowing users to provide a single binary "batteries included" with Cluster API and providers of choice.
Copy link
Member Author

@fabriziopandini fabriziopandini Oct 25, 2021

Choose a reason for hiding this comment

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

After some thinking about how to make it possible for users to create single binary "batteries included", I decided to keep the controllers folders, which makes the project nicely consistent with kubebuilder scaffolding, but to leave here only an alias / a proxy type that make it public a small surface of internal/controllers.
In perspective, this will give us more freedom in shifting around our internal/controllers if required, eg. by moving a set of reconcilers to subfolders, without surfacing this in our public surface.

Looking forward for opinions about this approach.

@@ -59,6 +59,10 @@ const (
KubeadmConfigControllerName = "kubeadmconfig-controller"
)

var (
defaultTokenTTL = 15 * time.Minute
Copy link
Member

Choose a reason for hiding this comment

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

Could we export this bit and reuse it when we declare the flag?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@vincepri
Copy link
Member

+1 on the approach, seems like the proposed changes give us a clean api surface

@enxebre
Copy link
Member

enxebre commented Oct 25, 2021

I think this makes sense. It gives us flexibility and clear boundaries between public/internal.

@fabriziopandini fabriziopandini force-pushed the move-kubeadm-controllers-to-internal branch from 22c8b37 to 34ed185 Compare October 25, 2021 16:47
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-test-main

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.

I like the general approach, very clean!!

One nit.

bootstrap/kubeadm/main.go Outdated Show resolved Hide resolved
@fabriziopandini fabriziopandini force-pushed the move-kubeadm-controllers-to-internal branch from 34ed185 to c1c6bee Compare October 25, 2021 17:32
@k8s-ci-robot
Copy link
Contributor

@fabriziopandini: The following test 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 c1c6bee link false /test pull-cluster-api-apidiff-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.

@sbueringer
Copy link
Member

Thanks!

/lgtm

Note: this PR is not marked as breaking given that we agreed on the criteria on beforehand. However, happy to change icon if we prefer to surface this in the release note.

Not sure about this. I previously assumed every breaking change should have the breaking change icon to mark it accordingly. From a consumer perspective it is a breaking change, imho. But I'll stay out of this discussion :)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2021
@fabriziopandini fabriziopandini changed the title 🌱 Move kubeadm controllers to internal ⚠️ Move kubeadm controllers to internal Oct 25, 2021
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 Oct 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit 59f33c5 into kubernetes-sigs:main Oct 25, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Oct 25, 2021
@fabriziopandini fabriziopandini deleted the move-kubeadm-controllers-to-internal branch October 27, 2021 09:11
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. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants