Skip to content

Commit 6b997e8

Browse files
committed
Update StorageVersion API KEP to reflect current state
1 parent 16d5ddf commit 6b997e8

File tree

1 file changed

+21
-13
lines changed
  • keps/sig-api-machinery/2339-storageversion-api-for-ha-api-servers

1 file changed

+21
-13
lines changed

keps/sig-api-machinery/2339-storageversion-api-for-ha-api-servers/README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# KEP-2339: StorageVersion API for HA API servers
22

3-
## Table of Contents
4-
53
<!-- toc -->
64
- [Release Signoff Checklist](#release-signoff-checklist)
75
- [Summary](#summary)
@@ -56,16 +54,16 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
5654

5755
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
5856
- [x] (R) KEP approvers have approved the KEP status as `implementable`
59-
- [ ] (R) Design details are appropriately documented
57+
- [x] (R) Design details are appropriately documented
6058
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
6159
- [ ] e2e Tests for all Beta API Operations (endpoints)
6260
- [ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
6361
- [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
64-
- [ ] (R) Graduation criteria is in place
62+
- [x] (R) Graduation criteria is in place
6563
- [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
6664
- [ ] (R) Production readiness review completed
6765
- [ ] (R) Production readiness review approved
68-
- [ ] "Implementation History" section is up-to-date for milestone
66+
- [x] "Implementation History" section is up-to-date for milestone
6967
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
7068
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
7169

@@ -84,7 +82,7 @@ server instances are encoding objects using the same storage version, resulting
8482
in polluted migration. ([details]).
8583

8684
[storageVersionHash]:https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go#L979
87-
[details]:https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/35-storage-version-hash.md#ha-masters
85+
[details]:https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/2343-automated-storage-version-migration-with-storage-version-hash#future-work-ha-clusters
8886

8987
## Motivation
9088

@@ -180,6 +178,10 @@ type ServerStorageVersion struct {
180178
// The encodingVersion must be included in the decodableVersions.
181179
// +listType=set
182180
DecodableVersions []string `json:"decodableVersions,omitempty" protobuf:"bytes,3,opt,name=decodableVersions"`
181+
182+
// The API server can serve these versions.
183+
// DecodableVersions must include all ServedVersions.
184+
ServedVersions []string
183185
}
184186

185187
type StorageVersionConditionType string
@@ -244,12 +246,15 @@ During bootstrap, for each resource, the API server
244246
* gets the list of participating API servers,
245247
* updates the storageVersion locally. Specifically,
246248
* creates or updates the .status.serverStorageVersions, to express this API
247-
server's decodableVersions and encodingVersion.
249+
server's
250+
* decodableVersions: list of versions (that an object is encoded in) which an apiserver can decode
251+
* encodingVersion: version that apiserver will encode an object in when persisting it in the backend- ex. etcd
252+
* servedVersions: list of versions that an apiserver can serve. All servedVersions should be included in decodableVersions.
248253
* removes .status.serverStorageVersions entries whose server ID is not present
249254
in the list of participating API servers, such entries are stale.
250255
* checks if all participating API servers agree on the same storage version.
251-
If so, sets the version as the status.agreedEncodingVersion. If not, sets
252-
the status.agreedEncodingVersion to empty. The "AllEncodingVersionsEqual"
256+
If so, sets the version as the status.commonEncodingVersion. If not, sets
257+
the status.commonEncodingVersion to empty. The "AllEncodingVersionsEqual"
253258
status.condition is updated accordingly as well.
254259
* updates the storageVersion object, using the rv in the first step
255260
to avoid conflicting with other API servers.
@@ -354,9 +359,9 @@ not manage its API.
354359

355360
The consumer of the StorageVersion API is the storage migrator. The storage
356361
migrator
357-
* starts migration if the storageVersion.status.agreedEncodingVersion differs
362+
* starts migration if the storageVersion.status.commonEncodingVersion differs
358363
from the storageState.status.[persistedStorageVersionHashes],
359-
* aborts ongoing migration if the storageVersion.status.agreedEncodingVersion is
364+
* aborts ongoing migration if the storageVersion.status.commonEncodingVersion is
360365
empty.
361366

362367
[persistedStorageVersionHashes]:https://github.com/kubernetes-sigs/kube-storage-version-migrator/blob/60dee538334c2366994c2323c0db5db8ab4d2838/pkg/apis/migration/v1alpha1/types.go#L164
@@ -534,7 +539,7 @@ for serving mutating or read-only API calls.
534539

535540
Reasonable SLOs specific to the StorageVersion API could be:
536541
- storageVersion.status.serverStorageVersions is accurately updated for an apiserver within 1 minute of start-up.
537-
- storageVersion.status.agreedEncodingVersion is accurately updated for the cluster within 1 minute of completing an upgrade.
542+
- storageVersion.status.commonEncodingVersion is accurately updated for the cluster within 1 minute of completing an upgrade.
538543

539544
1 minute seems reasonable since this feature depends on the `APIServerIdentity` feature, that relies on a heart beat from each apiserver
540545
to create a new Lease object obtaining an ID that will be used in the `storageVersion.status.serverStorageVersions[*].apiServerID` field.
@@ -642,7 +647,10 @@ Major milestones might include:
642647
- when the KEP was retired or superseded
643648
-->
644649

645-
==TODO==
650+
- Add alpha requirements https://github.com/enj/enhancements/commit/76f27981ace434ce9d4d01805a37bbc111992341
651+
- Add Storage Version API implementation https://github.com/kubernetes/kubernetes/pull/88607
652+
- Add ServedVersions info https://github.com/kubernetes/kubernetes/pull/118386
653+
- Add beta requirements https://github.com/kubernetes/enhancements/pull/3593
646654

647655
## Drawbacks
648656

0 commit comments

Comments
 (0)