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 cloud provider controllers to k8s.io/cloud-provider #90976

Merged
merged 6 commits into from
Jun 9, 2020

Conversation

andrewsykim
Copy link
Member

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
We're trying to make cmd/cloud-controller-manager easier to consume (kubernetes/cloud-provider#29). This PR moves all the cloud provider specific controllers to k8s.io/cloud-provider as part of moving all of cmd/cloud-controller-manager eventually.

Which issue(s) this PR fixes:
Fixes #81172

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 11, 2020
@k8s-ci-robot k8s-ci-robot requested review from cheftako, davidopp and a team May 11, 2020 13:12
@k8s-ci-robot k8s-ci-robot added area/cloudprovider area/dependency Issues or PRs related to dependency changes area/release-eng Issues or PRs related to the Release Engineering subproject sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/release Categorizes an issue or PR as relevant to SIG Release. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 11, 2020
@andrewsykim andrewsykim force-pushed the move-cloud-controllers branch 3 times, most recently from 58dd398 to e32277a Compare May 11, 2020 14:57
@andrewsykim
Copy link
Member Author

/assign @liggitt @cheftako @cici37

@k8s-ci-robot
Copy link
Contributor

@andrewsykim: GitHub didn't allow me to assign the following users: cici37.

Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @liggitt @cheftako @cici37

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.

@@ -1392,6 +1347,13 @@ func TestPatchStatus(t *testing.T) {
}

func Test_getNodeConditionPredicate(t *testing.T) {
// init feature gates, feature spec does not matter since it will be overriden by tests
Copy link
Contributor

Choose a reason for hiding this comment

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

Misspelling here of "overridden". And I think you mentioned that the test changes are moved to another pr #90987

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, will update after #90987 is merge d

@andrewsykim andrewsykim force-pushed the move-cloud-controllers branch from f79dcfa to 52bb13b Compare May 11, 2020 18:47
@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 12, 2020
@andrewsykim andrewsykim force-pushed the move-cloud-controllers branch from 52bb13b to 4d0d504 Compare May 13, 2020 14:51
@andrewsykim
Copy link
Member Author

@liggitt friendly ping :)

@@ -23,7 +23,7 @@ limitations under the License.
// +k8s:conversion-gen=k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config
// +k8s:conversion-gen=k8s.io/component-base/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/service/config/v1alpha1
// +k8s:conversion-gen=k8s.io/cloud-provider/controllers/service/config/v1alpha1
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 confused... based on #90976 (comment) I thought we were not moving config struct locations

Copy link
Member Author

Choose a reason for hiding this comment

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

The v1alpha1 types live in staging/src/k8s.io/kube-controller-manager/config/v1alpha1 (this is the case today as well). This just moves the generated code that was in pkg/controller/service/config/v1alpha1 to staging along with the controller. That seemed fine to me since none of the types are there (maybe this is still wrong though?)

Before this comment #90976 (comment) I moved the config struct from staging/src/k8s.io/kube-controller-manager into k8s.io/cloud-provider/controllers/service/config/v1alpha1). I thought your comment was specifically for that so I reverted and left the versioned types in kube-controller-manager.

Copy link
Member

Choose a reason for hiding this comment

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

This just moves the generated code that was in pkg/controller/service/config/v1alpha1 to staging along with the controller.

The issue is that places v1alpha1 config-related code in a place that has no concept of a v1alpha1 config... that seems problematic.

@@ -34,7 +35,6 @@ import (
replicasetconfig "k8s.io/kubernetes/pkg/controller/replicaset/config"
replicationconfig "k8s.io/kubernetes/pkg/controller/replication/config"
resourcequotaconfig "k8s.io/kubernetes/pkg/controller/resourcequota/config"
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
Copy link
Member

Choose a reason for hiding this comment

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

same question about config type location

@liggitt
Copy link
Member

liggitt commented Jun 8, 2020

controller code move looks fine. I'm still not sure I understand what it means to move a v1alpha1 config type to the cloud controller module when there is no v1alpha1 top-level version present in that module. This would be a lot clearer to me if it just moved the controller code and kept the config types where they were.

@andrewsykim
Copy link
Member Author

I'm still not sure I understand what it means to move a v1alpha1 config type to the cloud controller module when there is no v1alpha1 top-level version present in that module.

The v1alpha1 types have not moved, they are still in k8s.io/kube-controller-manager/config/v1alpha1. This PR only moves the internal config types and the generated code. Do you still prefer that the internal type and generated code stay where they are in pkg/controller/serivce?

@liggitt
Copy link
Member

liggitt commented Jun 8, 2020

Do you still prefer that the internal type and generated code stay where they are in pkg/controller/serivce?

I think keeping the config in the module where it is being consumed stays more coherent for now, so yes.

@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 8, 2020
…ice for easier external consumption

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
…for easier external consumption

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
…/controllers/node for easier external consumption

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
…d-provider/controllers/nodelifecycle for easier external consumption

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
…ovider controllers to staging

Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
@andrewsykim andrewsykim force-pushed the move-cloud-controllers branch from f627f3f to 21bb99e Compare June 8, 2020 21:42
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 8, 2020
@andrewsykim
Copy link
Member Author

@liggitt updated to leave the config types where they are, sorry for the confusion earlier.

@liggitt
Copy link
Member

liggitt commented Jun 9, 2020

/lgtm
/approve
/retest

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewsykim, liggitt

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 Jun 9, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

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/cloudprovider area/dependency Issues or PRs related to dependency changes area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/release Categorizes an issue or PR as relevant to SIG Release. 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.

Move cloud controllers to k8s.io/cloud-provider/controllers
8 participants