Skip to content

Commit 38bc5d0

Browse files
liggittchelseychen
authored andcommitted
KEP 1693: instrumentation updates
1 parent 559cb52 commit 38bc5d0

File tree

1 file changed

+9
-5
lines changed
  • keps/sig-api-machinery/1693-warnings

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ 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. Increment a counter metric with labels for the API group, version, resource, API verb, and target removal major/minor version
97+
2. Set a gauge metric to 1 with labels for the API group, version, resource, subresource, and target removal version
9898
3. Record an audit annotation indicating the request used a deprecated API
9999

100100
Allow custom resource definitions to indicate specific versions are deprecated
@@ -142,7 +142,7 @@ In kube-apiserver and kube-controller-manager, configure the process-wide handle
142142

143143
In the endpoint installer, decorate handlers for deprecated APIs:
144144
* add a warning header: `<group>/<version> <kind> is deprecated in v1.X+, unavailable in v1.Y+; use <replacementGroup>/<replacementVersion> <replacementKind>`
145-
* increment the counter metric for the deprecated use
145+
* set the gauge metric for the deprecated group/version/resource/subresource to 1
146146
* add an audit annotation indicating the request was made to a deprecated API
147147

148148
**In-process validation and admission warnings:**
@@ -176,7 +176,7 @@ type CustomResourceDefinitionVersion struct {
176176
177177
In the custom resource handler, decorate handlers for deprecated versions:
178178
* add the warning header
179-
* increment the counter metric for the deprecated use
179+
* set the gauge metric for the deprecated group/version/resource/subresource to 1
180180
* add an audit annotation indicating the request was made to a deprecated API
181181
182182
**Admission webhook warnings:**
@@ -217,7 +217,7 @@ Warning mechanism unit tests:
217217
Deprecated API integration tests:
218218
219219
- Warning headers are returned when making requests to deprecated APIs
220-
- Deprecated metrics are incremented when making requests to deprecated APIs
220+
- Gauge metrics for deprecated use are set to 1 when making requests to deprecated APIs
221221
- Audit annotations are added when making requests to deprecated APIs
222222
223223
Extension mechanism integration tests:
@@ -231,7 +231,7 @@ Extension mechanism integration tests:
231231
232232
In the past, we have had problems with unbounded metric labels increasing cardinality of
233233
metrics and causing significant memory/storage use. Limiting these metrics to bounded values
234-
(API group, version, resource, API verb, target removal release) and omitting unbounded values
234+
(API group, version, resource, subresource, target removal release) and omitting unbounded values
235235
(resource instance name, client username, etc), metric cardinality is controlled.
236236
237237
Annotating audit events for the deprecated API requests allows an administrator to locate
@@ -308,6 +308,10 @@ New clients making requests to old API servers handle requests without `Warning`
308308
* sig-architecture discussion
309309
* [notes](https://docs.google.com/document/d/1BlmHq5uPyBUDlppYqAAzslVbAO8hilgjqZUTaNXUhKM/edit#bookmark=id.yppt0g2tjwqw)
310310
* [recording](https://www.youtube.com/watch?v=VJo7PonPuGA&list=PL69nYSiGNLP2m6198LaLN6YahX7EEac5g&index=2&t=3m13s)
311+
* sig-instrumentation discussion
312+
* [notes](https://docs.google.com/document/d/1FE4AQ8B49fYbKhfg4Tx0cui1V0eI4o3PxoqQPUwNEiU/edit#bookmark=id.c3qdrgp1fvnc)
313+
* [recording](https://www.youtube.com/watch?v=cOoDnSTkMc0&list=PL69nYSiGNLP1tue6RXLncPTGjfnBVHP-f&index=2&t=2m33s)
314+
* [mailing list thread](https://groups.google.com/d/msgid/kubernetes-sig-instrumentation/62bfc7c8-aab3-41c7-99cb-e69cf88a0749%40googlegroups.com)
311315
312316
## Implementation History
313317

0 commit comments

Comments
 (0)