Skip to content

Commit 6960cc8

Browse files
authored
Merge pull request kubernetes#2134 from Sh4d1/update_kep_1860
Set KEP 1860 as implementable
2 parents 1ab4b6e + 0e987cd commit 6960cc8

File tree

2 files changed

+75
-18
lines changed

2 files changed

+75
-18
lines changed

keps/sig-network/1860-kube-proxy-IP-node-binding/README.md

Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,24 @@
1616
- [Risks and Mitigations](#risks-and-mitigations)
1717
- [Drawbacks](#drawbacks)
1818
- [Alternatives](#alternatives)
19+
- [Design Details](#design-details)
20+
- [Test Plan](#test-plan)
21+
- [Graduation Criteria](#graduation-criteria)
22+
- [Alpha](#alpha)
23+
- [Beta/GA](#betaga)
24+
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
25+
- [Version Skew Strategy](#version-skew-strategy)
1926
<!-- /toc -->
2027

2128
## Release Signoff Checklist
2229

2330
Items marked with (R) are required *prior to targeting to a milestone / release*.
2431

25-
- [ ] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
26-
- [ ] (R) KEP approvers have approved the KEP status as `implementable`
27-
- [ ] (R) Design details are appropriately documented
28-
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
29-
- [ ] (R) Graduation criteria is in place
32+
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
33+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
34+
- [x] (R) Design details are appropriately documented
35+
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
36+
- [x] (R) Graduation criteria is in place
3037
- [ ] (R) Production readiness review completed
3138
- [ ] Production readiness review approved
3239
- [ ] "Implementation History" section is up-to-date for milestone
@@ -66,31 +73,31 @@ Currently there is some hacky workaround that set the `Hostname` on the `Service
6673

6774
## Proposal
6875

69-
The solution would be to add a new field in the `loadBalancer` field of a `Service`'s `status`, like `ingressMode`. This new field will be used by kube-proxy in order to not bind the Load Balancer's External IP to the node (in both IPVS and iptables mode). The value `VIP` would be the default one (if not set for instance), keeping the current behaviour. The value `Proxy` would be used in order to disable the the shortcut.
76+
The solution would be to add a new field in the `loadBalancer` field of a `Service`'s `status`, like `ipMode`. This new field will be used by kube-proxy in order to not bind the Load Balancer's External IP to the node (in both IPVS and iptables mode). The value `VIP` would be the default one (if not set for instance), keeping the current behaviour. The value `Proxy` would be used in order to disable the the shortcut.
7077

71-
Since the `EnsureLoadBalancer` returns a `LoadBalancerStatus`, the Cloud Controller Manager can optionally set the `ingressMode` field before returning the status.
78+
Since the `EnsureLoadBalancer` returns a `LoadBalancerStatus`, the Cloud Controller Manager can optionally set the `ipMode` field before returning the status.
7279

7380
### User Stories
7481

7582
#### Story 1
7683

77-
User 1 is a Managed Kubernetes user. There cluster is running on a cloud provider where the LB's behaviour matches the `VIP` `ingressMode`.
84+
User 1 is a Managed Kubernetes user. There cluster is running on a cloud provider where the LB's behaviour matches the `VIP` `ipMode`.
7885
Nothing changes for them since the cloud provider manages the Cloud Controller Manager.
7986

8087
#### Story 2
8188

82-
User 2 is a Managed Kubernetes user. There cluster is running on a cloud provider where the LB's behaviour matches the `Proxy` `ingressMode`.
89+
User 2 is a Managed Kubernetes user. There cluster is running on a cloud provider where the LB's behaviour matches the `Proxy` `ipMode`.
8390
Almost nothing changes for them since the cloud provider manages the Cloud Controller Manager.
8491
The only difference is that pods using the load balancer IP may observe a higher response time since the datapath will go through the load balancer.
8592

8693
#### Story 3
8794

8895
User 3 is a developer working on a cloud provider Kubernetes offering.
89-
On the next version of `k8s.io/cloud-provider`, the cloud provider can optionally set the `ingressMode` field as part of `LoadBalancerStatus`, and reflect the cloud provider load balancer behaviour.
96+
On the next version of `k8s.io/cloud-provider`, the cloud provider can optionally set the `ipMode` field as part of `LoadBalancerStatus`, and reflect the cloud provider load balancer behaviour.
9097

9198
### Risks and Mitigations
9299

93-
1. The first risk is when using the `Proxy` `ingressMode` for pod using the load balancer IP. In this case the packets will not bypass the load balancer anymore.
100+
1. The first risk is when using the `Proxy` `ipMode` for pod using the load balancer IP. In this case the packets will not bypass the load balancer anymore.
94101
However if a user wants to to keep using the in cluster datapath, he can still use the ClusterIP of the service.
95102

96103
## Drawbacks
@@ -102,3 +109,43 @@ However if a user wants to to keep using the in cluster datapath, he can still u
102109
A viable alternative may be to use a flag directly on `kube-proxy`.
103110
When running on a cloud provider managed Kubernetes this solution is viable since the cloud provider will be able to set the right value on `kube-proxy`.
104111
When running a self hosted cluster, the user needs to be aware of how the cloud's load balancers works and need to set the flag on `kube-proxy` accordingly.
112+
113+
## Design Details
114+
115+
API changes to Service:
116+
- Add a new field `status.loadBalancer.ingress[].ipMode: VIP | Proxy`.
117+
- `ipMode` defaults to VIP if the feature gate is enabled, `nil` otherwise, preserving existing behaviour for Service Type=LoadBalancer.
118+
- On create and update, it fails if `ipMode` is set without the `ip` field.
119+
120+
## Test Plan
121+
122+
Unit tests:
123+
- unit tests for the ipvs and iptables rules
124+
- unit tests for the validation
125+
- unit tests for a new util in pkg/proxy
126+
127+
E2E tests:
128+
- The default behavior for `ipMode` does not break any existing e2e tests
129+
- The default `VIP` value is already tested
130+
131+
## Graduation Criteria
132+
133+
### Alpha
134+
135+
Adds new field `ipMode` to Service, which is used when `LoadBalancerIPMode` feature gate is enabled, allowing for rollback.
136+
137+
### Beta/GA
138+
139+
`LoadBalancerIPMode` is enabled by default.
140+
141+
### Upgrade / Downgrade Strategy
142+
143+
On upgrade, while the feature gate is disabled, nothing will change. Once the feature gate is enabled, all the previous LoadBalancer service will get an `ipMode` of `VIP`.
144+
If `kube-proxy` was not yet upgraded: the field will simply be ignored.
145+
If `kube-proxy` was upgraded, and the feature gate enabled, it will stil behave as before if the `ipMode` is `VIP`, and will behave accordingly if the `ipMode` is `Proxy`.
146+
147+
On downgrade, the feature gate will simply be disabled, and as long as `kube-proxy` was downgraded before, nothing should be impacted.
148+
149+
### Version Skew Strategy
150+
151+
Version skew from the control plane to `kube-proxy` should be trivial since `kube-proxy` will simply ignore the `ipMode` field.

keps/sig-network/1860-kube-proxy-IP-node-binding/kep.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,27 @@ authors:
55
owning-sig: sig-network
66
participating-sigs:
77
- sig-cloud-provider
8+
status: implementable
89
reviewers:
910
- "@thockin"
1011
- "@cheftako"
1112
- "@MorrisLaw"
1213
approvers:
1314
- "@thockin"
1415
- "@andrewsykim"
15-
editor: "@Sh4d1"
16-
creation-date: 2019-12-05
17-
last-updated: 2020-06-18
18-
status: provisional
19-
replaces:
20-
superseded-by:
21-
see-also:
16+
17+
stage: "alpha"
18+
19+
latest-milestone: "v1.21"
20+
21+
milestone:
22+
alpha: "v1.21"
23+
beta: "v1.22"
24+
stable: "v1.22"
25+
26+
feature-gates:
27+
- name: LoadBalancerIPMode
28+
components:
29+
- kube-apiserver
30+
- kube-proxy
31+
disable-supported: true

0 commit comments

Comments
 (0)