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
- warning headers are returned when making requests to deprecated APIs
150
151
- deprecated metrics are incremented when making requests to deprecated APIs
151
152
- audit annotations are added when making requests to deprecated APIs
152
-
153
+
153
154
### Risks and Mitigations
154
155
155
156
**Metric cardinality**
156
-
157
+
157
158
In the past, we have had problems with unbounded metric labels increasing cardinality of
158
159
metrics and causing significant memory/storage use. Limiting these metrics to bounded values
159
160
(API group, version, resource, API verb, target removal release) and omitting unbounded values
160
161
(resource instance name, client username, etc), metric cardinality is controlled.
161
-
162
+
162
163
Annotating audit events for the deprecated API requests allows an administrator to locate
163
164
the particular client making deprecated requests when metrics indicate an investigation is needed.
164
165
165
166
**Additional stderr / warning output**
166
-
167
+
167
168
Additional warning messages may be unexpected by kubectl or client-go consumers.
168
169
However, kubectl and client-go already output warning messages to stderr or via `klog.Warn`.
169
170
client-go consumers can programmatically modify or suppress the warning output at a per-process or per-client level.
170
171
171
172
### Graduation Criteria
172
-
173
+
173
174
The structure of the `Warning` header is RFC-defined and unversioned.
174
175
The RFC defines the behavior of the `299` warning code as follows:
175
176
176
177
> The warning text can include arbitrary information to be presented to a human user or logged.
177
178
> A system receiving this warning MUST NOT take any automated action.
178
-
179
+
179
180
Because the server -> client warning format is fixed, and the warnings do not
180
181
drive automated action in clients, graduation criteria is primarily oriented
181
182
toward the stability level of the administrator metrics, and the ability to
182
183
disable the server sending warnings during the beta period.
183
184
184
185
#### Beta graduation
185
-
186
+
186
187
* Test plan is implemented
187
188
* API server output of `Warning` headers for deprecated API use is feature-gated and enabled by default
188
189
* 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)
189
190
* client-go logs warnings by default
190
191
* kubectl outputs warnings to stderr
191
192
192
193
#### GA graduation
193
-
194
+
194
195
* At least two releases after Beta
195
196
* Gathered feedback on metric structure and use from multi-cluster admins
196
197
* API server output of `Warning` headers for deprecated API use is unconditionally enabled
197
198
* 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)
198
199
199
200
### Upgrade / Downgrade Strategy
200
-
201
+
201
202
client-go consumers wanting to suppress default warning messages would need to override the per-process warning handler.
202
203
Note that client-go already [logs warning messages](https://grep.app/search?q=klog.Warn&filter[repo][0]=kubernetes/client-go).
203
204
204
205
### Version Skew Strategy
205
-
206
+
206
207
Old clients making requests to a new API server ignore `Warning` headers.
207
208
208
209
New clients making requests to old API servers handle requests without `Warning` headers normally.
0 commit comments