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-1860: Make Kubernetes aware of the LoadBalancer behavior (reopen) #4114

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

RyanAoh
Copy link
Member

@RyanAoh RyanAoh commented Jun 29, 2023

  • One-line PR description: Add an IP mode field to service.status.loadBalancer.ingress to determine whether the rule (iptables or ipvs) for loadBalancer.ip should be added to the node by kube-proxy.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 29, 2023
@k8s-ci-robot k8s-ci-robot requested a review from dcbw June 29, 2023 13:02
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Jun 29, 2023
@k8s-ci-robot k8s-ci-robot added the sig/network Categorizes an issue or PR as relevant to SIG Network. label Jun 29, 2023
@RyanAoh
Copy link
Member Author

RyanAoh commented Jun 29, 2023

cc @thockin @danwinship @sftim

@RyanAoh RyanAoh force-pushed the kep-1860 branch 3 times, most recently from 30b44f9 to 47dfa7a Compare June 29, 2023 13:23
@thockin thockin changed the title KEP-1860: Make Kubernetes aware of the LoadBalancer behaviou(reopen) KEP-1860: Make Kubernetes aware of the LoadBalancer behavior (reopen) Jun 29, 2023
@thockin
Copy link
Member

thockin commented Jun 29, 2023

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 29, 2023
@RyanAoh
Copy link
Member Author

RyanAoh commented Jun 30, 2023

/hold for some new changes according to the comments on kubernetes/kubernetes#118895

@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 Jun 30, 2023
@aojea
Copy link
Member

aojea commented Jun 30, 2023

/hold for some new changes according to the comments on kubernetes/kubernetes#118895

what changes? I think theKEP is ok, comments does not question the KEP itself, is more on the implementation details, can you elaborate?

@RyanAoh
Copy link
Member Author

RyanAoh commented Jun 30, 2023

Got it.
/unhold

@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 Jun 30, 2023
@RyanAoh
Copy link
Member Author

RyanAoh commented Jun 30, 2023

/assign @johnbelamaric

@danwinship
Copy link
Contributor

I had suggested reopening the KEP because it was approved 2 years ago and I didn't even remember it, and I thought we might want to make sure that we still agree with what 2-years-ago us decided.

@aojea
Copy link
Member

aojea commented Jul 3, 2023

I had suggested reopening the KEP because it was approved 2 years ago and I didn't even remember it, and I thought we might want to make sure that we still agree with what 2-years-ago us decided.

oh, I missed that, I thought that the person driving the PR was assuming all the comments there were pushing back ... sorry for the confusion 😅

@aojea
Copy link
Member

aojea commented Jul 4, 2023

/lgtm

@thockin
Copy link
Member

thockin commented Jul 7, 2023

I think you can proceed with implementation while this is pending PRR. I know it's hard to make PRR time happen during the code window.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 10, 2023
# of http://git.k8s.io/enhancements/OWNERS_ALIASES
kep-number: 1860
alpha:
approver: "@wojtek-t"
Copy link
Member

Choose a reason for hiding this comment

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

I didn't realize initially, but you didn't fill in PRR section.

Please copy the whole PRR section from the template:
https://github.com/kubernetes/enhancements/blob/master/keps/NNNN-kep-template/README.md#production-readiness-review-questionnaire

and fill-in at least the ones that are required for Alpha (others may be left empty for now).

And ping me once done :)

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. @wojtek-t

@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 Jul 26, 2023

- [x] Feature gate (also fill in values in `kep.yaml`)
- Feature gate name: LoadBalancerIPMode
- Components depending on the feature gate: kube-proxy, kube-apiserver
Copy link
Member

Choose a reason for hiding this comment

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

Also cloud-controller-manager?

It will be [potentially] setting this field, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. I'll also add it in kep.yaml.


###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?

Yes.
Copy link
Member

Choose a reason for hiding this comment

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

nit: Yes, by disabling the feature gate.

Probably worth mentioning that to get user-visible impact, disabling it in kube-proxy is enough, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Thanks for your advice.


###### Are there any tests for feature enablement/disablement?

Yes. There are some unit tests and an integration test added for this feature enablement/disablement.
Copy link
Member

Choose a reason for hiding this comment

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

Are there? Or will be added?

Copy link
Member Author

Choose a reason for hiding this comment

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

These tests have added in the implemention(kubernetes/kubernetes#118895).

Copy link
Member

Choose a reason for hiding this comment

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

Please correct me if I'm wrong, but I don't see enablement/disablement features there.
I see tests that exercise the feature-gate being on and off, but I don't see tests that change it in the middle of the test [which is what the enablement/disablement is doing.]

On unrelated note - how the implementation PR got merged, given the feature didn't went through PRR and wasn't tracked as part of the release:
https://github.com/orgs/kubernetes/projects/140/views/1?filterQuery=

@thockin ^^

Copy link
Contributor

Choose a reason for hiding this comment

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

On unrelated note - how the implementation PR got merged, given the feature didn't went through PRR and wasn't tracked as part of the release

I think the KEP was originally approved to be implemented before PRR existed (and then just didn't get implemented). I'm not sure what that means process-wise.

Copy link
Member Author

Choose a reason for hiding this comment

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

@wojtek-t The test TestUpdateServiceLoadBalancerStatus in pkg/registry/core/service/storage/storage_test.go did this.
https://github.com/RyanAoh/kubernetes/blob/e6863757f4fd9b6997ca38dea549e3b370463db9/pkg/registry/core/service/storage/storage_test.go#L11935-L11947

Copy link
Member Author

Choose a reason for hiding this comment

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

On unrelated note - how the implementation PR got merged, given the feature didn't went through PRR and wasn't tracked as part of the release: https://github.com/orgs/kubernetes/projects/140/views/1?filterQuery=

@wojtek-t kubernetes/kubernetes#118895 was reverted by kubernetes/kubernetes#119876 for release resons. And I have opened a new one kubernetes/kubernetes#119937, we can make this run into the right process.

@@ -149,3 +159,284 @@ On downgrade, the feature gate will simply be disabled, and as long as `kube-pro
### Version Skew Strategy

Version skew from the control plane to `kube-proxy` should be trivial since `kube-proxy` will simply ignore the `ipMode` field.

Copy link
Member

Choose a reason for hiding this comment

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

Since I can't comment on unchanged code, commenting here:

For Upgrade/Downgrade section:

"all the previous LoadBalancer service will get an ipMode of VIP."

Will cloud-controller-manager be explicitly setting those?
Or are we going to rely on this being defaulted to VIP on the first write by kube-apiserver?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will be defaulted to VIP when we get it from kube-apiserver in this case. Ref https://github.com/kubernetes/kubernetes/pull/118895/files#r1248316868

Copy link
Member

Choose a reason for hiding this comment

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

Can you add that explicitly there (with the link - it seems helpful here too).

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

@wojtek-t
Copy link
Member

Sorry for delay - was OOO for quite some time.

Thanks for all your answers - this LGTM to me now.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RyanAoh, thockin, wojtek-t

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 Aug 24, 2023
@k8s-ci-robot k8s-ci-robot merged commit df246c8 into kubernetes:master Aug 24, 2023
4 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Aug 24, 2023
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. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/network Categorizes an issue or PR as relevant to SIG Network. 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.

None yet

7 participants