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

Graduate EndpointSlice Controllers to GA #99870

Merged
merged 2 commits into from Mar 7, 2021

Conversation

swetharepakula
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

Graduates EPS controllers to use V1 Endpoint Slice Resources and API

Does this PR introduce a user-facing change?

EndpointSlice Controllers are now GA. The EndpointSlice Controller will not populate the `deprecatedTopology` field and will only provide topology information through the `zone` and `nodeName` fields.

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

Please use the following format for linking documentation:
KEP: EndpointSlice KEP
Enhancement Issue: kubernetes/enhancements#752

/cc @aojea @andrewsykim @liggitt @robscott @wojtek-t
/assign @thockin
/sig network
/priority important-soon

@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. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 5, 2021
@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 5, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @swetharepakula. Thanks for your PR.

I'm waiting for a kubernetes 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/apiserver area/test kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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/testing Categorizes an issue or PR as relevant to SIG Testing. labels Mar 5, 2021
@robscott
Copy link
Member

robscott commented Mar 5, 2021

Thanks @swetharepakula! Should this PR also include graduating the EndpointSlice feature gate to GA? That's what guards the enablement of these controllers. Related to that, I think this file also needs to be updated: https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-controller-manager/app/discovery.go#L40.

/triage accepted
/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. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 5, 2021
@@ -186,6 +187,17 @@ func objectRefPtrEqual(ref1, ref2 *corev1.ObjectReference) bool {
return true
}

// stringPtrEqual returns true if a set of string pointers have equivalent values.
func stringPtrEqual(ptr1, ptr2 *string) bool {
Copy link
Member

Choose a reason for hiding this comment

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

we have stringPtrChanged in endpointslices/utils.go, @robscott if the goal is to consolidate this code does make sense to have only one and negate the logic in one of the places?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch, it would be good to use that util function instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is a good point. I wasn't sure where the function should go. Is endpointslices/utils.go the best place and it can be called in the other controller as well?

Copy link
Member

Choose a reason for hiding this comment

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

I added a function to utils/pointer just yesterday, LOL.

Ideally we can all just use pointer.StringEqual()

Copy link
Member

Choose a reason for hiding this comment

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

needs to be re-vendored, so "later"

@aojea
Copy link
Member

aojea commented Mar 5, 2021

it seems this integration test has to be changed to

ERROR(linux/amd64): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/dualstack/dualstack_endpoints_test.go:118:3: cannot use informers.Discovery().V1beta1().EndpointSlices() (value of type v1beta1.EndpointSliceInformer) as "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/discovery/v1".EndpointSliceInformer value in argument to endpointslice.NewController: wrong type for method Lister (have func() k8s.io/kubernetes/vendor/k8s.io/client-go/listers/discovery/v1beta1.EndpointSliceLister, want func() k8s.io/kubernetes/vendor/k8s.io/client-go/listers/discovery/v1.EndpointSliceLister)

levee: test/integration/endpointslice/endpointslicemirroring_test.go:63:3: cannot use informers.Discovery().V1beta1().EndpointSlices() (value of type v1beta1.EndpointSliceInformer) as "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/discovery/v1".EndpointSliceInformer value in argument to endpointslice.NewController: wrong type for method Lister (have func() k8s.io/kubernetes/vendor/k8s.io/client-go/listers/discovery/v1beta1.EndpointSliceLister, want func() k8s.io/kubernetes/vendor/k8s.io/client-go/listers/discovery/v1.EndpointSliceLister)

@swetharepakula
Copy link
Member Author

swetharepakula commented Mar 6, 2021

I just pushed up an update that consolidates the util functions that were being used by both EPS controllers and removes an extraneous check when starting the controllers since the feature gate is being removed. Also added the beta comment to the EndpointSlice feature gate.

Thanks for all the quick reviews on this!

@swetharepakula swetharepakula marked this pull request as ready for review March 6, 2021 00:01
@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 Mar 6, 2021
@swetharepakula
Copy link
Member Author

/retest

@aojea
Copy link
Member

aojea commented Mar 6, 2021

/retest
doesn't seem related the failures

@robscott
Copy link
Member

robscott commented Mar 6, 2021

@swetharepakula Now that #99662 is in it looks like this needs to be rebased. I can LGTM whenever you're able to rebase.

 - EndpointSlice controller will stop writing to Topology field
 - EndpointSlice controller will only provide NodeName and Zone on
 EndpointSlices
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: swetharepakula, thockin

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

@swetharepakula
Copy link
Member Author

Rebased the branch now that #99662 is merged. Thanks @robscott !

@robscott
Copy link
Member

robscott commented Mar 7, 2021

Thanks!

/lgtm

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

robscott commented Mar 7, 2021

Waiting for base GA to merge

The hold was just waiting for #99662 to merge in, removing that now that it has.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 7, 2021
@fejta-bot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

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/apiserver area/test 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/feature Categorizes issue or PR as related to a new feature. 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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/auth Categorizes an issue or PR as relevant to SIG Auth. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants