@@ -102,7 +102,8 @@ For maintainers:
102
102
mechanisms. Removing the feature can greatly reduce the complexity of
103
103
kubectl
104
104
- Removes some ugly server-side code meant to deal with transition from
105
- client-side apply to server-side apply.
105
+ client-side apply to server-side apply (see
106
+ https://kubernetes.io/blog/2022/10/20/advanced-server-side-apply/ )
106
107
107
108
### Goals
108
109
@@ -132,7 +133,8 @@ The meaning of `auto` goes as follows:
132
133
apply that resource
133
134
- If the resource is new (GET returns 404), the resource is server-side applied
134
135
- If the resource already exists but doesn't have the ` last-applied `
135
- annotation, the resource is server-side applied
136
+ annotation, the resource is server-side applied. Note that this will
137
+ treat previously "converted" objects as client-side apply.
136
138
137
139
For the alpha phase, the auto value will only be visible and usable if
138
140
the ` KUBECTL_AUTO_SERVER_SIDE ` is set. That variable will later be
@@ -243,15 +245,23 @@ somewhat incompatible with `--server-side=false` today, it will be
243
245
possible to use the flag with ` auto ` (and we will entirely disallow it
244
246
with ` --server-side=false ` ).
245
247
246
- Some other commands might be impacted. ` kubectl create ` (and family)
247
- notably have a ` --save-config ` flag that create the last-applied
248
- annotation. While I don't know how many people actually use the flag,
249
- the idea of saving this as a config is confusing, since people don't
250
- actually have the file and so the situation doesn't really fit well the
251
- ` apply ` workflow. We suggest adding a warning when this flag is used, as
252
- well as updating its documentation to suggest not using it, and possibly
248
+ Some other commands might be impacted, especially when/if we remove
249
+ client-side apply altogether. This would deserve a full section once the
250
+ details of this are carved out. ` kubectl create ` (and family) notably
251
+ have a ` --save-config ` flag that create the last-applied annotation.
252
+ While I don't know how many people actually use the flag, the idea of
253
+ saving this as a config is confusing, since people don't actually have
254
+ the file and so the situation doesn't really fit well the ` apply `
255
+ workflow. We suggest adding a warning when this flag is used, as well as
256
+ updating its documentation to suggest not using it, and possibly
253
257
deprecate it in the future.
254
258
259
+ <<[ UNRESOLVED More details needed on exhaustive CSA clean-up] >>
260
+ Deprecating client-side apply from kubectl probably implies a LOT more
261
+ clean-up that is actually described here, and we would have to go
262
+ through the details when we decide the fate of client-side apply.
263
+ <<[ /UNRESOLVED] >>
264
+
255
265
Because ` kubectl diff ` is supposed to map the behavior of `kubectl
256
266
apply` as closely as possible, the change will also be done for that
257
267
command.
@@ -331,12 +341,15 @@ outside of kubectl) have used it both as "clients" and in controllers.
331
341
332
342
#### Beta
333
343
344
+ The environment variable to protect ` auto ` will be removed in Beta based
345
+ on feedback, so that the ` auto ` flag becomes available to all.
346
+
334
347
<!--
335
348
To be re-evaluated later:
336
349
Server-Side Apply has a very limited set of bugs or feature requests as
337
350
this point and is definitely mature. Enabling client-side will allow
338
351
increased usage and reduce burden cost for kubectl to maintain both
339
- mechanisms. -->
352
+ mechanisms, if we remove client-side apply . -->
340
353
341
354
#### GA
342
355
@@ -349,11 +362,10 @@ migrate existing client-side usage to server-side. -->
349
362
350
363
#### Deprecation
351
364
352
- We are not intending to deprecate the flag, but we might remove the
353
- ` --server-side ` flag in the long term.
354
-
355
- Same thing applies for ` --save-config ` and other client-side related
356
- flags in kubectl which we might remove.
365
+ If we decide to remove the remove the ` --server-side ` flag, we would
366
+ have a deprecation warning at least two releases before. Same thing
367
+ applies for ` --save-config ` and other client-side related flags in
368
+ kubectl which we might remove.
357
369
358
370
### Upgrade / Downgrade Strategy
359
371
@@ -363,6 +375,10 @@ go from client-side to server-side apply. The upgrade and downgrade
363
375
works well in the nominal cases but fail with special cases. Enabling
364
376
server-side by default also intends to address that problem.
365
377
378
+ Going back from ` --server-side=auto ` to ` --server-side=false ` or
379
+ ` --server-side=true ` would trigger the same upgrade/downgrade strategy
380
+ mentioned above for each object that don't match the new mode.
381
+
366
382
### Version Skew Strategy
367
383
368
384
N/A.
@@ -405,18 +421,18 @@ that.
405
421
406
422
###### Are there any tests for feature enablement/disablement?
407
423
408
- Since enablement is not done through a feature gate, tests are fairly
409
- easy to implement.
424
+ Since enablement is not done through a feature gate and/or command-line
425
+ flags, tests are fairly easy to implement.
410
426
411
427
### Rollout, Upgrade and Rollback Planning
412
428
413
429
###### How can a rollout or rollback fail? Can it impact already running workloads?
414
430
415
431
In the context of this change, a rollback would possibly be someone
416
- switching from server-side apply to client-side apply and vice-versa.
417
- This problem isn't new and is one of the reason that motivates this
418
- change. It mostly works well when the default fieldmanager is being
419
- used.
432
+ switching from server-side apply to client-side apply and vice-versa (or
433
+ from ` auto ` to another forced value) This problem isn't new and is one
434
+ of the reason that motivates this change. It mostly works well when the
435
+ default fieldmanager is being used.
420
436
421
437
<<[ UNRESOLVED bad description of the problems here ] >>
422
438
We could certainly make a much better analysis of the problems we have
@@ -451,10 +467,9 @@ N/A. No monitoring in place.
451
467
452
468
###### How can an operator determine if the feature is in use by workloads?
453
469
454
- ` kubectl apply -V8 ` can help identify what type of apply is used. Also
455
- checking the presence of the last applied annotation on the cluster
456
- resource indicates whether the resource was client-side or server-side
457
- applied.
470
+ ` kubectl apply -V8 ` can help identify what type of apply is used, or the
471
+ output of the command when applying ("resource has been server-side
472
+ applied").
458
473
459
474
###### How can someone using this feature know that it is working for their instance?
460
475
@@ -495,6 +510,9 @@ client-side could by-pass the send. This has an impact on the apiserver
495
510
since all the requests need to be processed, including by webhooks which
496
511
can increase the cluster load.
497
512
513
+ As the server-side field becomes auto, the initial get could absolutely
514
+ be removed saving an extra request.
515
+
498
516
###### Will enabling / using this feature result in introducing new API types?
499
517
500
518
No.
0 commit comments