Skip to content

Commit 42ade50

Browse files
committed
Add more detail about APIs and storage versions
1 parent 50d0a32 commit 42ade50

File tree

1 file changed

+24
-17
lines changed
  • keps/sig-api-machinery/4330-compatibility-versions

1 file changed

+24
-17
lines changed

keps/sig-api-machinery/4330-compatibility-versions/README.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -243,41 +243,48 @@ compatibility version.
243243

244244
CEL environments already [support a compatibility
245245
version](https://github.com/kubernetes/kubernetes/blob/7fe31be11fbe9b44af262d5f5cffb1e73648aa96/staging/src/k8s.io/apiserver/pkg/cel/environment/base.go#L45).
246-
The CEL compatibility version is use to ensure when a kubeneretes contol plane
247-
component reads a CEL expression from storage written by a N+1 newer version
248-
(either due to version skew or a rollback), that a compatible CEL environment
249-
can still be constructed. This is achieved by making any CEL environment changes
250-
(language settings, libraries, variables) available for [stored expressions one
251-
version before they are allowed to be written by new expressions](https://github.com/kubernetes/kubernetes/blob/7fe31be11fbe9b44af262d5f5cffb1e73648aa96/staging/src/k8s.io/apiserver/pkg/cel/environment/environment.go#L38).
246+
The CEL compatibility version is used to ensure when a kubeneretes contol plane
247+
component reads a CEL expression from storage written by a (N+1) newer version
248+
(either due to version skew or a rollback), that a compatible CEL environment
249+
can still be constructed and the expression can still be evaluated. This is
250+
achieved by making any CEL environment changes (language settings, libraries,
251+
variables) available for [stored expressions one version before they are allowed
252+
to be written by new
253+
expressions](https://github.com/kubernetes/kubernetes/blob/7fe31be11fbe9b44af262d5f5cffb1e73648aa96/staging/src/k8s.io/apiserver/pkg/cel/environment/environment.go#L38).
252254

253255
The only change we must make for this enhancement is to remove the
254256
[compatibility version
255257
constant](https://github.com/kubernetes/kubernetes/blob/7fe31be11fbe9b44af262d5f5cffb1e73648aa96/staging/src/k8s.io/apiserver/pkg/cel/environment/base.go#L45)
256-
and instead always pass in N-1 of the compatibility version introduced by this enhancement.
258+
and instead always pass in N-1 of the compatibility version introduced by this
259+
enhancement as the CEL compatibility version.
257260

258261
### StorageVersion Compatibility Versioning
259262

260263
StorageVersions specify what version an apiserver uses to write resources to etcd
261264
for an API group. The StorageVersion differs across releases as API groups
262265
graduate through stability levels.
263266

264-
the StorageVersions of an API group will need to be modified to track which
265-
storage versions are used for which version ranges.
267+
The StorageVersions of an API group will need to be modified to track which
268+
storage versions should be used for which Kubernetes versions.
266269

267-
When an apiserver starts, StorageVersions will be compared against the compatibility version to
268-
determine which StorageVersions should be used for each API group.
270+
When an apiserver starts, StorageVersions will be compared against the
271+
compatibility version to determine which StorageVersion should be used to write
272+
resources for each API group.
269273

270274
### API Compatibility Versioning
271275

272276
Similar to feature flags, all APIs group-versions declarations will be modified
273-
to track which version the APIs are introduced and removed at.
277+
to track which Kubernetes version the API group-versions are introduced (or
278+
removed) at.
274279

275-
If any on-by-default Beta APIs still exist (hopefully not), then they will be enabled
276-
if they were enabled at the compatibility version provided. Off-by-default Beta APIs
277-
will need to be enabled by flags.
280+
GA APIs should match the exact set of APIs enabled in GA for the Kubernetes version
281+
the compatibility version is set to.
278282

279-
When an apiserver starts, APIs will be compared against the compatibility version to
280-
determine which APIs to match the APIs that were enabled for that compatibility version.
283+
All Alpha and Beta APIs (both off-by-default and on-by-default, if any of those
284+
still exist) need to behave exactly as they did for the Kubernetes version
285+
the compatibility version is set to. I.e. `--runtime-config=api/<version>` needs
286+
to be able to turn on APIs exactly like it did for each Kubernetes version that
287+
compatibility version can be set to.
281288

282289
### User Stories (Optional)
283290

0 commit comments

Comments
 (0)