Skip to content

Commit e0f2894

Browse files
authored
Merge pull request kubernetes#3504 from andrewsykim/kep-1672
KEP-1672: promote EndpointSliceTerminatingCondition feature to GA
2 parents ac963f5 + 4d9dfe2 commit e0f2894

File tree

3 files changed

+149
-3
lines changed

3 files changed

+149
-3
lines changed

keps/prod-readiness/sig-network/1672.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ alpha:
33
approver: "@wojtek-t"
44
beta:
55
approver: "@wojtek-t"
6+
stable:
7+
approver: "@wojtek-t"

keps/sig-network/1672-tracking-terminating-endpoints/README.md

Lines changed: 144 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,150 @@ large number of traffic to the apiserver.
233233

234234
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
235235

236-
Not yet, but manual upgrade and rollback testing will be done prior to graduating the feature to Beta.
236+
Rollback was manually validated using the following steps:
237+
238+
Create a kind cluster:
239+
```
240+
$ kind create cluster
241+
Creating cluster "kind" ...
242+
✓ Ensuring node image (kindest/node:v1.25.0) 🖼
243+
✓ Preparing nodes 📦
244+
✓ Writing configuration 📜
245+
✓ Starting control-plane 🕹️
246+
✓ Installing CNI 🔌
247+
✓ Installing StorageClass 💾
248+
Set kubectl context to "kind-kind"
249+
You can now use your cluster with:
250+
251+
kubectl cluster-info --context kind-kind
252+
253+
Thanks for using kind! 😊
254+
```
255+
256+
Check an EndpointSlice object to verify that the EndpointSliceTerminatingCondition feature gate is enabled.
257+
Note that endpoints should have 3 conditions, `ready`, `serving` and `terminating`:
258+
```
259+
$ kubectl -n kube-system get endpointslice
260+
NAME ADDRESSTYPE PORTS ENDPOINTS AGE
261+
kube-dns-zp8h5 IPv4 9153,53,53 10.244.0.2,10.244.0.4 2m20s
262+
$ kubectl -n kube-system get endpointslice kube-dns-zp8h5 -oyaml
263+
addressType: IPv4
264+
apiVersion: discovery.k8s.io/v1
265+
endpoints:
266+
- addresses:
267+
- 10.244.0.2
268+
conditions:
269+
ready: true
270+
serving: true
271+
terminating: false
272+
nodeName: kind-control-plane
273+
targetRef:
274+
kind: Pod
275+
name: coredns-565d847f94-lgsrp
276+
namespace: kube-system
277+
uid: cefa189a-66e0-4da3-8341-5c4e9f11407b
278+
- addresses:
279+
- 10.244.0.4
280+
conditions:
281+
ready: true
282+
serving: true
283+
terminating: false
284+
nodeName: kind-control-plane
285+
targetRef:
286+
kind: Pod
287+
name: coredns-565d847f94-ptfln
288+
namespace: kube-system
289+
uid: d9003b65-2316-4d76-96f5-34d7570e6fcb
290+
kind: EndpointSlice
291+
metadata:
292+
...
293+
...
294+
```
295+
296+
Turn off the `EndpointSliceTerminatingCondition` feature gate in `kube-apiserver` and `kube-controller-manager` (this is effectively
297+
the state of the feature gate when it was Alpha).
298+
```
299+
$ docker ps
300+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
301+
501fafe18dbd kindest/node:v1.25.0 "/usr/local/bin/entr…" 4 minutes ago Up 4 minutes 127.0.0.1:36795->6443/tcp kind-control-plane
302+
$ docker exec -ti kind-control-plane bash
303+
$ vim /etc/kubernetes/manifests/kube-apiserver.yaml
304+
# append --feature-gates=EndpointSliceTerminatingCondition=false to kube-apiserver flags
305+
$ vim /etc/kubernetes/manifests/kube-controller-manager.yaml
306+
# append --feature-gates=EndpointSliceTerminatingCondition=false to kube-controller-manager flags
307+
```
308+
309+
Once `kube-apiserver` and `kube-controller-manager` restarts with the flag disabled, check that endpoints have the
310+
`serving` and `terminating` conditions preserved and only dropped on the next update.
311+
```
312+
# preserved initially
313+
$ kubectl -n kube-system get endpointslice kube-dns-zp8h5 -oyaml
314+
addressType: IPv4
315+
apiVersion: discovery.k8s.io/v1
316+
endpoints:
317+
- addresses:
318+
- 10.244.0.2
319+
conditions:
320+
ready: true
321+
serving: true
322+
terminating: false
323+
nodeName: kind-control-plane
324+
targetRef:
325+
kind: Pod
326+
name: coredns-565d847f94-lgsrp
327+
namespace: kube-system
328+
uid: cefa189a-66e0-4da3-8341-5c4e9f11407b
329+
- addresses:
330+
- 10.244.0.4
331+
conditions:
332+
ready: true
333+
serving: true
334+
terminating: false
335+
nodeName: kind-control-plane
336+
targetRef:
337+
kind: Pod
338+
name: coredns-565d847f94-ptfln
339+
namespace: kube-system
340+
uid: d9003b65-2316-4d76-96f5-34d7570e6fcb
341+
kind: EndpointSlice
342+
metadata:
343+
...
344+
345+
# trigger an update to endpointslice
346+
$ kubectl -n kube-system delete po -l k8s-app=kube-dns
347+
pod "coredns-565d847f94-lgsrp" deleted
348+
pod "coredns-565d847f94-ptfln" deleted
349+
350+
# verify that serving/terminating conditions are now dropped
351+
$ kubectl -n kube-system get endpointslice kube-dns-zp8h5 -oyaml
352+
addressType: IPv4
353+
apiVersion: discovery.k8s.io/v1
354+
endpoints:
355+
- addresses:
356+
- 10.244.0.6
357+
conditions:
358+
ready: true
359+
nodeName: kind-control-plane
360+
targetRef:
361+
kind: Pod
362+
name: coredns-565d847f94-jhtxk
363+
namespace: kube-system
364+
uid: b9a45145-fd3a-4f03-8243-59b0a0789bbf
365+
- addresses:
366+
- 10.244.0.5
367+
conditions:
368+
ready: true
369+
nodeName: kind-control-plane
370+
targetRef:
371+
kind: Pod
372+
name: coredns-565d847f94-r6n9s
373+
namespace: kube-system
374+
uid: e20ce163-cf2b-4251-bcc8-352dcaf135c9
375+
kind: EndpointSlice
376+
metadata:
377+
...
378+
...
379+
```
237380

238381
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
239382

keps/sig-network/1672-tracking-terminating-endpoints/kep.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ see-also:
2020
replaces: []
2121

2222
# The target maturity stage in the current dev cycle for this KEP.
23-
stage: beta
23+
stage: stable
2424

2525
# The most recent milestone for which work toward delivery of this KEP has been
2626
# done. This can be the current (upcoming) milestone, if it is being actively
2727
# worked on.
28-
latest-milestone: "v1.24"
28+
latest-milestone: "v1.26"
2929

3030
# The milestone at which this feature was, or is targeted to be, at each stage.
3131
milestone:
3232
alpha: "v1.20"
3333
beta: "v1.22"
34+
stable: "v1.26"
3435

3536
# The following PRR answers are required at alpha release
3637
# List the feature gate name and the components for which it must be enabled

0 commit comments

Comments
 (0)