You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-api-machinery/1693-warnings/README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ but surfacing warnings to clients submitting problematic data would help them di
94
94
When a deprecated API is used:
95
95
96
96
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
98
98
3. Record an audit annotation indicating the request used a deprecated API
99
99
100
100
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
142
142
143
143
In the endpoint installer, decorate handlers for deprecated APIs:
144
144
* 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
146
146
* add an audit annotation indicating the request was made to a deprecated API
147
147
148
148
**In-process validation and admission warnings:**
@@ -176,7 +176,7 @@ type CustomResourceDefinitionVersion struct {
176
176
177
177
In the custom resource handler, decorate handlers for deprecated versions:
178
178
* 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
180
180
* add an audit annotation indicating the request was made to a deprecated API
181
181
182
182
**Admission webhook warnings:**
@@ -217,7 +217,7 @@ Warning mechanism unit tests:
217
217
Deprecated API integration tests:
218
218
219
219
- 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
221
221
- Audit annotations are added when making requests to deprecated APIs
0 commit comments