Skip to content

Commit ef2d3be

Browse files
authored
Merge pull request #13 from jpbetz/discovery-compat-version
Add section about discovery to compatibility version KEP
2 parents e73d2dc + 3435ba2 commit ef2d3be

File tree

1 file changed

+22
-0
lines changed
  • keps/sig-architecture/4330-compatibility-versions

1 file changed

+22
-0
lines changed

keps/sig-architecture/4330-compatibility-versions/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ tags, and then generate with `hack/update-toc.sh`.
9090
- [CEL Environment Compatibility Versioning](#cel-environment-compatibility-versioning)
9191
- [StorageVersion Compatibility Versioning](#storageversion-compatibility-versioning)
9292
- [API Compatibility Versioning](#api-compatibility-versioning)
93+
- [Discovery](#discovery)
9394
- [User Stories (Optional)](#user-stories-optional)
9495
- [Story 1](#story-1)
9596
- [Story 2](#story-2)
@@ -507,6 +508,27 @@ compatibility version can be set to.
507508
508509
Alpha APIs may not be enabled in conjunction with compatibility version.
509510
511+
### Discovery
512+
513+
Discovery will [enable](https://github.com/kubernetes/kubernetes/blob/7080b51ee92f67623757534f3462d8ae862ef6fe/staging/src/k8s.io/apiserver/pkg/util/openapi/enablement.go#L32) the group versions matching the compatibility version.
514+
515+
API fields that were introduced after the compatibility version will **not** be
516+
pruned. There is a tradoff here:
517+
518+
- If we keep the fields in the API, we leak information about fields that were
519+
introduced in Kubernetes versions newer than the compatibility version.
520+
- If we remove the fields, we have an inconsistency between discovery and the
521+
implementation, because the server implementation is aware of the field, and
522+
may include it in responses (e.g. via defaulting).
523+
524+
Note that even though we are deciding to include fields that were introduced
525+
after the compatibility version in discovery, new fields are always feature
526+
gated, so the fields will not settable and may not impact default behavior.
527+
528+
Also note that we that show information about unavailable features in discovery
529+
today. We introduce fields into APIs for disabled-by-default features and make
530+
no attempt to hide those fields in discovery.
531+
510532
### User Stories (Optional)
511533
512534
<!--

0 commit comments

Comments
 (0)