Skip to content

Commit 2238320

Browse files
committed
Address feedback, missing test part
1 parent 67fa33a commit 2238320

File tree

1 file changed

+43
-25
lines changed

1 file changed

+43
-25
lines changed

keps/sig-cli/3805-ssa-default/README.md

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ For maintainers:
102102
mechanisms. Removing the feature can greatly reduce the complexity of
103103
kubectl
104104
- 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/)
106107

107108
### Goals
108109

@@ -132,7 +133,8 @@ The meaning of `auto` goes as follows:
132133
apply that resource
133134
- If the resource is new (GET returns 404), the resource is server-side applied
134135
- 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.
136138

137139
For the alpha phase, the auto value will only be visible and usable if
138140
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
243245
possible to use the flag with `auto` (and we will entirely disallow it
244246
with `--server-side=false`).
245247

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
253257
deprecate it in the future.
254258

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+
255265
Because `kubectl diff` is supposed to map the behavior of `kubectl
256266
apply` as closely as possible, the change will also be done for that
257267
command.
@@ -331,12 +341,15 @@ outside of kubectl) have used it both as "clients" and in controllers.
331341

332342
#### Beta
333343

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+
334347
<!--
335348
To be re-evaluated later:
336349
Server-Side Apply has a very limited set of bugs or feature requests as
337350
this point and is definitely mature. Enabling client-side will allow
338351
increased usage and reduce burden cost for kubectl to maintain both
339-
mechanisms. -->
352+
mechanisms, if we remove client-side apply. -->
340353

341354
#### GA
342355

@@ -349,11 +362,10 @@ migrate existing client-side usage to server-side. -->
349362

350363
#### Deprecation
351364

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.
357369

358370
### Upgrade / Downgrade Strategy
359371

@@ -363,6 +375,10 @@ go from client-side to server-side apply. The upgrade and downgrade
363375
works well in the nominal cases but fail with special cases. Enabling
364376
server-side by default also intends to address that problem.
365377

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+
366382
### Version Skew Strategy
367383

368384
N/A.
@@ -405,18 +421,18 @@ that.
405421

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

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.
410426

411427
### Rollout, Upgrade and Rollback Planning
412428

413429
###### How can a rollout or rollback fail? Can it impact already running workloads?
414430

415431
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.
420436

421437
<<[UNRESOLVED bad description of the problems here ]>>
422438
We could certainly make a much better analysis of the problems we have
@@ -451,10 +467,9 @@ N/A. No monitoring in place.
451467

452468
###### How can an operator determine if the feature is in use by workloads?
453469

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").
458473

459474
###### How can someone using this feature know that it is working for their instance?
460475

@@ -495,6 +510,9 @@ client-side could by-pass the send. This has an impact on the apiserver
495510
since all the requests need to be processed, including by webhooks which
496511
can increase the cluster load.
497512

513+
As the server-side field becomes auto, the initial get could absolutely
514+
be removed saving an extra request.
515+
498516
###### Will enabling / using this feature result in introducing new API types?
499517

500518
No.

0 commit comments

Comments
 (0)