Skip to content

Commit e44a17c

Browse files
committed
Add production readiness and GA criteria
1 parent cc54049 commit e44a17c

File tree

3 files changed

+187
-3
lines changed

3 files changed

+187
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kep-number: 555
2+
stable:
3+
approver: "@deads2k"

keps/sig-api-machinery/555-server-side-apply/README.md

Lines changed: 167 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
- [Proposed Change](#proposed-change)
2020
- [Alternatives](#alternatives)
2121
- [Implementation History](#implementation-history)
22+
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
23+
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
24+
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
25+
- [Monitoring Requirements](#monitoring-requirements)
26+
- [Dependencies](#dependencies)
27+
- [Scalability](#scalability)
28+
- [Troubleshooting](#troubleshooting)
2229
- [Risks and Mitigations](#risks-and-mitigations)
2330
- [Testing Plan](#testing-plan)
2431
- [Graduation Criteria](#graduation-criteria)
@@ -279,6 +286,158 @@ The conversion between the two and creating the diff was complex and would have
279286

280287
- 12/2019 [#86083](https://github.com/kubernetes/kubernetes/pull/86083) implementing a poc for the described approach
281288

289+
## Production Readiness Review Questionnaire
290+
291+
<!--
292+
293+
Production readiness reviews are intended to ensure that features merging into
294+
Kubernetes are observable, scalable and supportable; can be safely operated in
295+
production environments, and can be disabled or rolled back in the event they
296+
cause increased failures in production. See more in the PRR KEP at
297+
https://git.k8s.io/enhancements/keps/sig-architecture/1194-prod-readiness.
298+
299+
The production readiness review questionnaire must be completed and approved
300+
for the KEP to move to `implementable` status and be included in the release.
301+
302+
In some cases, the questions below should also have answers in `kep.yaml`. This
303+
is to enable automation to verify the presence of the review, and to reduce review
304+
burden and latency.
305+
306+
The KEP must have a approver from the
307+
[`prod-readiness-approvers`](http://git.k8s.io/enhancements/OWNERS_ALIASES)
308+
team. Please reach out on the
309+
[#prod-readiness](https://kubernetes.slack.com/archives/CPNHUMN74) channel if
310+
you need any help or guidance.
311+
312+
-->
313+
314+
### Feature Enablement and Rollback
315+
316+
_This section must be completed when targeting alpha to a release._
317+
318+
* **How can this feature be enabled / disabled in a live cluster?**
319+
- [x] Feature gate (also fill in values in `kep.yaml`)
320+
- Feature gate name: [ServerSideApply](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/features/kube_features.go#L100)
321+
- Components depending on the feature gate: kube-apiserver
322+
323+
* **Does enabling the feature change any default behavior?**
324+
325+
While this changes how objects are modified and then stored in the database, all the changes should be strictly backward compatible, and shouldn’t break existing automation or users. The increase in size can possibly have adverse, surprising consequences including increased memory usage for controllers, increased bandwidth usage when fetching objects, bigger objects when displaying for users (kubectl get -o yaml). We’re trying to mitigate all of these with the addition of a new header.
326+
327+
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
328+
the enablement)?**
329+
Also set `disable-supported` to `true` or `false` in `kep.yaml`.
330+
Describe the consequences on existing workloads (e.g., if this is a runtime
331+
feature, can it break the existing applications?).
332+
333+
Yes. Managed fields will be reset for server-side applied objects.
334+
335+
* **What happens if we reenable the feature if it was previously rolled back?**
336+
337+
The feature will be restored. Server-side applied objects will have lost their “set” which may cause some surprising behavior (fields might not be removed as expected).
338+
339+
* **Are there any tests for feature enablement/disablement?**
340+
The e2e framework does not currently support enabling or disabling feature
341+
gates. However, unit tests in each component dealing with managing data, created
342+
with and without the feature, are necessary. At the very least, think about
343+
conversion tests if API types are being modified.
344+
345+
Tests are in place for upgrading from client side to server side apply and vice versa.
346+
347+
### Rollout, Upgrade and Rollback Planning
348+
349+
_This section must be completed when targeting beta graduation to a release._
350+
351+
* **How can a rollout fail? Can it impact already running workloads?**
352+
Try to be as paranoid as possible - e.g., what if some components will restart
353+
mid-rollout?
354+
355+
* **What specific metrics should inform a rollback?**
356+
357+
358+
359+
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
360+
Describe manual testing that was done and the outcomes.
361+
Longer term, we may want to require automated upgrade/rollback tests, but we
362+
are missing a bunch of machinery and tooling and can't do that now.
363+
364+
* **Is the rollout accompanied by any deprecations and/or removals of features, APIs,
365+
fields of API types, flags, etc.?** No
366+
367+
### Monitoring Requirements
368+
369+
_This section must be completed when targeting beta graduation to a release._
370+
371+
* **How can an operator determine if the feature is in use by workloads?**
372+
Ideally, this should be a metric. Operations against the Kubernetes API (e.g.,
373+
checking if there are objects with field X set) may be a last resort. Avoid
374+
logs or events for this purpose.
375+
376+
Any existing metric split by request verb will record the [APPLY](https://github.com/kubernetes/kubernetes/blob/8f6ffb24df989608b87451f89b8ac9fc338ed71c/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go#L507-L509) verb if the feature is in use.
377+
378+
* **What are the SLIs (Service Level Indicators) an operator can use to determine
379+
the health of the service?**
380+
381+
There is no specific metric attached to server side apply. All PATCH requests that utilize SSA will use the verb APPLY when logging metrics. API Server metrics that are split by verb automatically include this. They include `apiserver_request_total`, `apiserver_longrunning_gauge`, `apiserver_response_sizes`, `apiserver_request_terminations_total`, `apiserver_selfrequest_total`
382+
- Components exposing the metric: kube-apiserver
383+
384+
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?** n/a
385+
386+
* **Are there any missing metrics that would be useful to have to improve observability
387+
of this feature?** n/a
388+
389+
### Dependencies
390+
391+
* **Does this feature depend on any specific services running in the cluster?** No
392+
393+
### Scalability
394+
395+
* **Will enabling / using this feature result in any new API calls?** No
396+
397+
* **Will enabling / using this feature result in introducing new API types?**
398+
Describe them, providing: No
399+
400+
* **Will enabling / using this feature result in any new calls to the cloud
401+
provider?** No
402+
403+
* **Will enabling / using this feature result in increasing size or count of
404+
the existing API objects?** Objects applied using server side apply will have their managed fields metadata populated.
405+
406+
* **Will enabling / using this feature result in increasing time taken by any
407+
operations covered by [existing SLIs/SLOs]?** No
408+
409+
* **Will enabling / using this feature result in non-negligible increase of
410+
resource usage (CPU, RAM, disk, IO, ...) in any components?** No
411+
412+
### Troubleshooting
413+
414+
The Troubleshooting section currently serves the `Playbook` role. We may consider
415+
splitting it into a dedicated `Playbook` document (potentially with some monitoring
416+
details). For now, we leave it here.
417+
418+
_This section must be completed when targeting beta graduation to a release._
419+
420+
* **How does this feature react if the API server and/or etcd is unavailable?**
421+
422+
The feature is part of of the API server and will not function without it
423+
424+
* **What are other known failure modes?**
425+
For each of them, fill in the following information by copying the below template:
426+
- [Failure mode brief description]
427+
- Detection: How can it be detected via metrics? Stated another way:
428+
how can an operator troubleshoot without logging into a master or worker node?
429+
- Mitigations: What can be done to stop the bleeding, especially for already
430+
running user workloads?
431+
- Diagnostics: What are the useful log messages and their required logging
432+
levels that could help debug the issue?
433+
Not required until feature graduated to beta.
434+
- Testing: Are there any tests for failure mode? If not, describe why.
435+
436+
* **What steps should be taken if SLOs are not being met to determine the problem?** n/a
437+
438+
[supported limits]: https://git.k8s.io/community//sig-scalability/configs-and-limits/thresholds.md
439+
[existing SLIs/SLOs]: https://git.k8s.io/community/sig-scalability/slos/slos.md#kubernetes-slisslos
440+
282441
### Risks and Mitigations
283442

284443
We used a feature branch to ensure that no partial state of this feature would
@@ -341,6 +500,8 @@ Integration tests for:
341500
- [x] Apply works with custom resources. [link](https://github.com/kubernetes/kubernetes/blob/b55417f429353e1109df8b3bfa2afc8dbd9f240b/staging/src/k8s.io/apiextensions-apiserver/test/integration/apply_test.go#L34-L117)
342501
- [x] Run kubectl apply tests with server-side flag enabled. [link](https://github.com/kubernetes/kubernetes/blob/81e6407393aa46f2695e71a015f93819f1df424c/test/cmd/apply.sh#L246-L314)
343502

503+
E2E and Conformance tests will be added for GA.
504+
344505
## Graduation Criteria
345506

346507
An alpha version of this is targeted for 1.14.
@@ -349,8 +510,11 @@ This can be promoted to beta when it is a drop-in replacement for the existing
349510
kubectl apply, and has no regressions (which aren't bug fixes). This KEP will be
350511
updated when we know the concrete things changing for beta.
351512

352-
This will be promoted to GA once it's gone a sufficient amount of time as beta
353-
with no changes. A KEP update will precede this.
513+
A GA version of this is targeted for 1.21.
514+
515+
- E2E tests are created and graduate to conformance
516+
- [Apply for client-go's typed client](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/2144-clientgo-apply) is implemented and has an in-tree controller using it
517+
- Outstanding bugs around status wiping and scale subresource are fixed
354518

355519
### Upgrade / Downgrade Strategy
356520

@@ -423,6 +587,7 @@ annotation is preserved and up-to-date as described in the downgrade above.
423587
* Early 2018: @lavalamp begins thinking about apply and writing design docs
424588
* 2018Q3: Design shift from merge + diff to tracking field managers.
425589
* 2019Q1: Alpha.
590+
* 2019Q3: Beta.
426591

427592
(For more details, one can view the apply-wg recordings, or join the mailing list
428593
and view the meeting notes. TODO: links)

keps/sig-api-machinery/555-server-side-apply/kep.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,29 @@ reviewers:
1111
- "@erictune"
1212
approvers:
1313
- "@bgrant0607"
14+
prr-approvers:
15+
- "@deads2k"
1416
editor: TBD
1517
creation-date: 2018-03-28
16-
last-updated: 2018-03-28
18+
last-updated: 2021-02-21
1719
status: implementable
1820
see-also:
1921
- n/a
2022
replaces:
2123
- n/a
2224
superseded-by:
2325
- n/a
26+
27+
stage: stable
28+
latest-milestone: "v1.21"
29+
30+
milestone:
31+
alpha: "v1.14"
32+
beta: "v1.16"
33+
stable: "v1.21"
34+
35+
feature-gates:
36+
- name: ServerSideApply
37+
components:
38+
- kube-apiserver
39+
disable-supported: true

0 commit comments

Comments
 (0)