@@ -233,7 +233,150 @@ large number of traffic to the apiserver.
233
233
234
234
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
235
235
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
+ ```
237
380
238
381
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
239
382
0 commit comments