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
After OpenAPI v3 is implemented, we can start working on updating clients to
210
213
consume OpenAPI v3. A separate KEP will be published for that.
211
214
215
+
#### OpenAPI V2 plan
216
+
217
+
As OpenAPI V3 becomes more and more available and easily accessible,
218
+
clients should move to OpenAPI V3 in favor of OpenAPI V2. This should
219
+
result in a steady decline in the number of requests sent to the
220
+
OpenAPI V2 endpoint. In the short term, we will make OpenAPI V2 make
221
+
computations more lazily, deferring the aggregation and marshaling
222
+
process to be on demand rather than at a set interval. This is not
223
+
directly part of OpenAPI V3's GA plan, but is something we will be
224
+
monitoring closely once OpenAPI V3 is GA.
225
+
212
226
### Risks and Mitigations
213
227
214
228
Aggregation for OpenAPI v2 already consumes a non-negligible amount of
@@ -277,6 +291,12 @@ updates. If there is a race and the client passes in an outdated etag
277
291
value, the server will send a 301 to redirect the client to the URL
278
292
with the latest etag value.
279
293
294
+
To ensure that the client cache does not grow in an unbounded manner,
295
+
the client-go disk cache will be replaced with a cmopactable disk
296
+
cache which performs occasional cleanup of old cached files. Refer to
297
+
[PR](https://github.com/kubernetes/kubernetes/pull/109701) for more
298
+
details.
299
+
280
300
### Controllers
281
301
282
302
#### OpenAPI Builder
@@ -383,6 +403,16 @@ This solves the immediate protobuf issue but adds complexity to the OpenAPI sche
383
403
384
404
The final alternative is to upgrade to OpenAPI 3.1 where the new JSON Schema version it is based off of supports fields alongside a `$ref`. However, OpenAPI does not follow semvar and 3.1 is a major upgrade over 3.0 and introduces various backwards incompatible changes. Furthermore, library support is currently lacking (gnostic) and doesn't fully support OpenAPI 3.1. One important backwards incompatible change is the removal of the nullable field and replacing it by changing the type field from a single string to an array of strings.
385
405
406
+
### Clients
407
+
408
+
Updating all OpenAPI V2 clients to use OpenAPI V3 is outside the scope
409
+
of this KEP and part of future work. However, some key clients will be
410
+
updated to use OpenAPI V3 as part of GA. One example is [OpenAPI V3
Server Side Apply will also be updated to directly use the OpenAPI V3
414
+
schema rather than OpenAPI V2. Finally, the query param verifier in
415
+
kubectl will be updated to use OpenAPI V3.
386
416
387
417
### Test Plan
388
418
@@ -407,6 +437,8 @@ For alpha, unit tests will be included to ensure that v3 schemas are properly
407
437
generated and published. A validator will also be used to ensure that the spec
408
438
generated is valid OpenAPI v3.
409
439
440
+
A fuzzer and performance benchmark tests will also be included.
441
+
410
442
### Graduation Criteria
411
443
412
444
#### Alpha
@@ -420,13 +452,20 @@ generated is valid OpenAPI v3.
420
452
- Incorrect OpenAPI polymorphic types (IntOrString, Quantity) are updated to use `anyOf` in OpenAPI V3
421
453
- Definition names of native resources are updated to omit their package paths
422
454
- Parameters are reused as components
423
-
-`kubectl explain` to support using the OpenAPI v3 Schema
424
455
- Aggregated API servers are queried for their v2 endpoint and converted to
425
456
publish v3 if they do not directly publish v3
426
457
- Heuristics are used for the OpenAPI v2 to v3 conversion to maximize
427
458
correctness of published spec
428
459
- Aggregation for OpenAPI v3 will serve as a proxy to downstream OpenAPI paths
429
460
461
+
#### GA
462
+
463
+
- OpenAPI V3 uses the optimized JSON marshaler for increased performance. See [link](https://github.com/kubernetes/kube-openapi/pull/319) for the benefits with OpenAPI V2.
0 commit comments