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

KEP-1435 Mixed Protocol values in LoadBalancer Service GA #112895

Merged
merged 2 commits into from Nov 3, 2022

Conversation

janosi
Copy link
Contributor

@janosi janosi commented Oct 6, 2022

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This PR is to move the implementation of kubernetes/enhancements#1435 to GA

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

  • Removed the unit tests that test the cases when the MixedProtocolLBService feature flag was false - the feature flag is locked to true with GA
  • Added an integration test to test whether the API server accepts an LB Service with different protocols.
  • Added an e2e test case to the "Network/Services" part to test whether a Service which is exposed via a multi-protocol LB Service is reachable via all ports
  • Removed the conditional validation that compared the new and the old Service definitions during an update - the feature flag is locked to true with GA.

Does this PR introduce a user-facing change?

Yes. The feature flag is locked to true.

Moving MixedProtocolLBService from beta to GA

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

- [KEP]: link comes here once the KEP update is merged

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 6, 2022
@k8s-ci-robot
Copy link
Contributor

@janosi: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 6, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @janosi. 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 6, 2022
@k8s-ci-robot k8s-ci-robot added area/test sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 6, 2022
@aojea
Copy link
Member

aojea commented Oct 6, 2022

/hold

I've added some comments to the KEP, I think e2e should be part of the GA criteria to verify Service proxies implement correctly the new behavior

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 6, 2022
@aojea
Copy link
Member

aojea commented Oct 6, 2022

/hold cancel
/ok-to-test
KEPs has merged , all questions answered
Thanks

@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 do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 6, 2022
@janosi
Copy link
Contributor Author

janosi commented Oct 7, 2022

/retest

@k8s-ci-robot k8s-ci-robot added area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework sig/network Categorizes an issue or PR as relevant to SIG Network. labels Oct 25, 2022
@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 2, 2022
Removed the unit tests that test the cases when the MixedProtocolLBService feature flag was false - the feature flag is locked to true with GA
Added an integration test to test whether the API server accepts an LB Service with different protocols.
Added an e2e test to test whether a service which is exposed by a multi-protocol LB Service is accessible via both ports.
Removed the conditional validation that compared the new and the old Service definitions during an update - the feature flag is locked to true with GA.
@k8s-ci-robot k8s-ci-robot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 2, 2022
@janosi
Copy link
Contributor Author

janosi commented Nov 2, 2022

/test pull-kubernetes-e2e-kind
/test pull-kubernetes-e2e-gce-ubuntu-containerd
/test pull-kubernetes-e2e-gce-100-performance

@janosi
Copy link
Contributor Author

janosi commented Nov 2, 2022

/test pull-kubernetes-e2e-kind
/test pull-kubernetes-e2e-gce-ubuntu-containerd

},
{
Name: "portname2",
Port: 81,
Copy link
Member

Choose a reason for hiding this comment

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

can we use the same port for both protocols?
I've seen some bugs on some implementations when this is happening

}

ginkgo.By("waiting for cluster IP for loadbalancer service " + j.Namespace + "/" + j.Name)
return j.WaitForLoadBalancerClusterIP(timeout)
Copy link
Member

Choose a reason for hiding this comment

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

you don't need to wait, ClusterIP assignment is synchronous

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I'm approving but @aojea is looking at tests

/approve

Testname: Service, same ports with different protocols on a Load Balancer Service
Description: Create a LoadBalancer service with two ports that have the same value but use different protocols. Add a Pod that listens on both ports. The Pod must be reachable via the ClusterIP and both ports
*/
ginkgo.It("should serve endpoints on same port and different protocol for internal traffic on Type LoadBalancer ", func() {
Copy link
Member

Choose a reason for hiding this comment

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

Once upon a time we tried to flatten all LB tests into one run (because LB creation can be very slow). I sort of lost touch - is that still something we care about?

@aojea

Copy link
Member

Choose a reason for hiding this comment

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

we are not waiting for the LoadBalancer IP assignment in this test, we only care about the ClusterIP here

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: janosi, 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

@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 2, 2022
Comment on lines 1087 to 1088
ginkgo.By("waiting for cluster IP for loadbalancer service " + j.Namespace + "/" + j.Name)
return j.WaitForLoadBalancerClusterIP(timeout)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ginkgo.By("waiting for cluster IP for loadbalancer service " + j.Namespace + "/" + j.Name)
return j.WaitForLoadBalancerClusterIP(timeout)
return j.sanityCheckService(service, v1.ServiceTypeLoadBalancer)


// CreateLoadBalancerServiceWaitForClusterIPOnly creates a loadbalancer service and waits
// for it to acquire a cluster IP
func (j *TestJig) CreateLoadBalancerServiceWaitForClusterIPOnly(timeout time.Duration, tweak func(svc *v1.Service)) (*v1.Service, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func (j *TestJig) CreateLoadBalancerServiceWaitForClusterIPOnly(timeout time.Duration, tweak func(svc *v1.Service)) (*v1.Service, error) {
func (j *TestJig) CreateLoadBalancerServiceWaitForClusterIPOnly(tweak func(svc *v1.Service)) (*v1.Service, error) {

we don't need the timeout

@aojea
Copy link
Member

aojea commented Nov 3, 2022

some comments to remove unnecessary code and lgtm

@janosi
Copy link
Contributor Author

janosi commented Nov 3, 2022

@aojea I think I fixed the comments.
On the other hand, I modified the e2e case so, that all ports (LB Service, container ports) have the same port value but different protocols, as you requested. In turn, I had to add some new util functions to be able to validate the list of ports that has the same port number but different protocols.

@janosi
Copy link
Contributor Author

janosi commented Nov 3, 2022

/test pull-kubernetes-unit

Comment on lines +4271 to +4273
// If EndpointSlice API is enabled, then validate if appropriate EndpointSlice objects
// were also create/updated/deleted.
if _, err := c.Discovery().ServerResourcesForGroupVersion(discoveryv1.SchemeGroupVersion.String()); err == nil {
Copy link
Member

Choose a reason for hiding this comment

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

I see, this is a legacy thing, it is always enabled since it is GA, don't worry we can change it in a follow up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, it got there due to my copy-paste magic.

@janosi
Copy link
Contributor Author

janosi commented Nov 3, 2022

/test pull-kubernetes-e2e-gci-gce-ipvs

@aojea
Copy link
Member

aojea commented Nov 3, 2022

/lgtm

thanks for reducing the technical debt, we were only validation by port number on the e2e , and now we can validate per port and protocol

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

aojea commented Nov 3, 2022

#112895

k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory: TestCreateReadycheck/timeouts_if_response_time_higher_than_custom_timeout expand_less

@janosi
Copy link
Contributor Author

janosi commented Nov 3, 2022

/test pull-kubernetes-unit

@k8s-ci-robot k8s-ci-robot merged commit c98aef4 into kubernetes:master Nov 3, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Nov 3, 2022
@liggitt liggitt moved this from Assigned to API review completed, 1.26 in API Reviews Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. 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.
Projects
Status: API review completed, 1.26
Development

Successfully merging this pull request may close these issues.

None yet

6 participants