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 docker controller to internal #5595

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

kaitoii11
Copy link
Contributor

@kaitoii11 kaitoii11 commented Nov 5, 2021

What this PR does / why we need it:
Move Docker controller package to internal and create alias.go for exposing Reconciler

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
Ref #5455

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 5, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @kaitoii11!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @kaitoii11. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 5, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 5, 2021
@kaitoii11 kaitoii11 changed the title [WIP] 🌱 Move docker controller to internal [WIP] :seedling: Move docker controller to internal Nov 5, 2021
@kaitoii11 kaitoii11 changed the title [WIP] :seedling: Move docker controller to internal [WIP] 🌱 Move docker controller to internal Nov 5, 2021
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.

@kaitoii11 thanks for your first PR in Cluster API and welcome on the team!
change look great, only a small nit not blocking from my side

// DockerClusterReconciler reconciles a DockerMachine object.
type DockerClusterReconciler struct {
Client client.Client
Log logr.Logger
Copy link
Member

Choose a reason for hiding this comment

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

Do you mind to drop this field and replace it's usage with ctrl.LoggerFrom(ctx)
(not strictly related to this change, it is also fine to open an issue/send a follow up PR to address this)

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 have made the changes to use ctrl.LoggerFrom(ctx).

@fabriziopandini
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 5, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2021
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.

one last nit + CI errors to be addressed, otherwise lgtm from my side
/retest

limitations under the License.
*/

// Package controllers implements the Docker controllers.
Copy link
Member

Choose a reason for hiding this comment

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

Is this file required?
Also the godoc seem not in line with "internal"

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 created the file in the wrong directory and I have committed the change.
But if the file itself is unnecessary, I can remove the file.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 11, 2021
@kaitoii11 kaitoii11 changed the title [WIP] 🌱 Move docker controller to internal 🌱 Move docker controller to internal Nov 11, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2021
@fabriziopandini
Copy link
Member

/retest

@sbueringer
Copy link
Member

sbueringer commented Nov 11, 2021

The tests fail because of the RBAC change:

failed to list *v1beta1.Machine: machines.cluster.x-k8s.io is forbidden: User "system:serviceaccount:capd-system:capd-manager" cannot list resource "machines" in API group "cluster.x-k8s.io" at the cluster scope
https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api/5595/pull-cluster-api-e2e-main/1458826016473485312/artifacts/clusters/bootstrap/controllers/capd-controller-manager/capd-controller-manager-6ffc877c65-6zkms/manager.log

I think this can be fixed by adjusting test/infrastructure/docker/Makefile | generate-manifests by adding the new internal folder. (below controllers/...) and re-running

make -C  ./test/infrastructure/docker generate-manifests

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 11, 2021
@fabriziopandini
Copy link
Member

lgtm pending squash

@sbueringer
Copy link
Member

sbueringer commented Nov 12, 2021

/lgtm

Thank you very much!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2021
@fabriziopandini
Copy link
Member

@kaitoii11 could you kindly fix one things I forgot in the previous pass 😅

You should add this PR into API change documentation for provider implementers

@kaitoii11
Copy link
Contributor Author

@kaitoii11 could you kindly fix one things I forgot in the previous pass 😅

You should add this PR into API change documentation for provider implementers

It looks like it is added in #5647 is it not?

@sbueringer
Copy link
Member

sbueringer commented Nov 12, 2021

@kaitoii11 could you kindly fix one things I forgot in the previous pass 😅
You should add this PR into API change documentation for provider implementers

It looks like it is added in #5647 is it not?

Yup. I thought I'll just take care of it because I have to modify that doc anyway. (but of course fine for me to already add it here in this PR)

@kaitoii11
Copy link
Contributor Author

@kaitoii11 could you kindly fix one things I forgot in the previous pass 😅
You should add this PR into API change documentation for provider implementers

It looks like it is added in #5647 is it not?

Yup. I thought I'll just take care of it because I have to modify that doc anyway. (but of course fine for me to already add it here in this PR)

I'll just add a line referencing this PR in the documentation then.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2021
@sbueringer
Copy link
Member

Thx!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2021
@stmcginnis
Copy link
Contributor

/lgtm

Checks are happy, and this looks good to me.

@fabriziopandini
Copy link
Member

/lgtm
/approve

@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 Nov 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit ef4f9bd into kubernetes-sigs:main Nov 12, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Nov 12, 2021
@kaitoii11 kaitoii11 deleted the docker-controller branch November 12, 2021 23:29
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants