Skip to content

Commit fe2fa0a

Browse files
authored
Merge pull request kubernetes#1958 from liggitt/warning-implementation
KEP-1693: Update warnings KEP with 1.19 work
2 parents d7ee189 + 4d00796 commit fe2fa0a

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

keps/sig-api-machinery/1693-warnings/README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ checklist items _must_ be updated for the enhancement to be released.
4545
- [x] Supporting documentation e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
4646
- [x] KEP approvers have approved the KEP status as `implementable`
4747
- [x] "Implementation History" section is up-to-date for milestone
48-
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
48+
- [x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
4949

5050
<!--
5151
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
@@ -94,8 +94,8 @@ but surfacing warnings to clients submitting problematic data would help them di
9494
When a deprecated API is used:
9595

9696
1. Add a `Warning` header to the response
97-
2. Set a gauge metric to 1 with labels for the API group, version, resource, subresource, and target removal version
98-
3. Record an audit annotation indicating the request used a deprecated API
97+
2. Set a `apiserver_requested_deprecated_apis` gauge metric to 1 with labels for the API group, version, resource, subresource, and target removal version
98+
3. Record a `"k8s.io/deprecated": "true"` audit annotation indicating the request used a deprecated API
9999

100100
Allow custom resource definitions to indicate specific versions are deprecated
101101

@@ -122,6 +122,12 @@ In kubectl, configure the per-process handler to:
122122

123123
In kube-apiserver and kube-controller-manager, configure the process-wide handler to ignore warnings
124124

125+
Example `kubectl` user experience:
126+
127+
![kubectl warnings](kubectl-warnings.png)
128+
129+
![kubectl --warnings-as-errors](kubectl-warnings-as-errors.png)
130+
125131
## Design Details
126132

127133
### Server-side
@@ -271,18 +277,18 @@ disable the server sending warnings during the beta period.
271277
* Complete test plan for implemented items
272278
* API server output of `Warning` headers for deprecated API use is feature-gated and enabled by default
273279
* The metric for deprecated API use is registered at [stability level `ALPHA`](https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes)
274-
* client-go logs warnings with code `199` and `299` by default
275-
* kubectl outputs warnings with code `199` and `299` to stderr by default
280+
* Implement admission webhook warning contributions
281+
* Implement custom resource version deprecation
282+
* client-go logs warnings with code `299` by default
283+
* kubectl outputs warnings with code `299` to stderr by default
284+
* Custom resource and admission webhook documentation is extended to describe appropriate use of warnings
276285
277286
#### GA
278287
279288
* At least two releases after Beta
280289
* Gather feedback on metric structure and use from multi-cluster admins
281290
* Implement in-process helpers for field-level validation warnings and admission warnings
282-
* Implement admission webhook warning contributions
283-
* Implement custom resource version deprecation
284291
* Complete test plan for implemented items
285-
* Custom resource and admission webhook documentation is extended to describe appropriate use of warnings
286292
* API server output of `Warning` headers for deprecated API use is unconditionally enabled
287293
* Server metric for deprecated API use is registered at [stability level `STABLE`](https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes)
288294
@@ -318,3 +324,4 @@ New clients making requests to old API servers handle requests without `Warning`
318324
- 2020-04-16: KEP introduced
319325
- 2020-04-27: Updated GA criteria, added extension mechanism warnings, kubectl warnings-as-errors option, size limits
320326
- 2020-04-27: Moved to implementable
327+
- 2020-08-26: Completed beta items for v1.19

keps/sig-api-machinery/1693-warnings/kep.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,30 @@ approvers:
1919
- "@smarterclayton"
2020
see-also:
2121
- "/keps/sig-architecture/1635-prevent-permabeta"
22+
23+
# The target maturity stage in the current dev cycle for this KEP.
24+
# stage: alpha|beta|stable
25+
stage: beta
26+
27+
# The most recent milestone for which work toward delivery of this KEP has been
28+
# done. This can be the current (upcoming) milestone, if it is being actively
29+
# worked on.
30+
# latest-milestone: "v1.19"
31+
latest-milestone: "v1.19"
32+
33+
# The milestone at which this feature was, or is targeted to be, at each stage.
34+
milestone:
35+
beta: "v1.19"
36+
stable: "v1.21"
37+
38+
# The following PRR answers are required at alpha release
39+
# List the feature gate name and the components for which it must be enabled
40+
feature-gates:
41+
- name: WarningHeaders
42+
components:
43+
- kube-apiserver
44+
disable-supported: true
45+
46+
# The following PRR answers are required at beta release
47+
metrics:
48+
- apiserver_requested_deprecated_apis
280 KB
Loading
362 KB
Loading

0 commit comments

Comments
 (0)