Skip to content

Commit cabd637

Browse files
committed
KEP-4192: describe the currently implemented SVM behavior
Signed-off-by: Stanislav Láznička <[email protected]>
1 parent 916232c commit cabd637

File tree

1 file changed

+24
-4
lines changed
  • keps/sig-api-machinery/4192-svm-in-tree

1 file changed

+24
-4
lines changed

keps/sig-api-machinery/4192-svm-in-tree/README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,29 @@ will be deferred to the user, instead of being triggered automatically.
253253

254254
#### Garbage Collection Cache
255255
Kube Controller Manager's garbage collection cache contains the name and namespace
256-
for all resources, providing a suitable dataset for the migration process. This
257-
approach is detailed [here](https://docs.google.com/document/d/1lHDbrMCmNG1KXEpw6gMhDL8qWAWgeSlfW6gbCvD80uw/edit?usp=sharing).
258-
_We will use this approach for the Alpha release_.
256+
for all resources, providing a suitable dataset for the migration process.
257+
258+
At the beginning of a migration, to make sure the garbage collector's cache is
259+
up-to-date with the cluster state, the SVM controller performs a list that is
260+
guaranteed to return at most one item (using limits/non-existent namespace names).
261+
The RV of the returned list is then stored and used to compare with the RV from
262+
the GC cache for the given resource. The controller waits until the GC cache RV
263+
is newer that the RV stored for the specific migration.
264+
265+
The controller then issues patch requests for each of the objects in the GC cache
266+
for the given resource, that is only if the resource version of this object is not greater
267+
than the resource version for the migration that was observed earlier. These patch
268+
requests should contain minimum information:
269+
- API version and kind
270+
- resource name and namespace
271+
- UID from the GC cache
272+
- to make sure we don't accidentally create an empty instance if the resource was
273+
deleted in the meantime
274+
- resource version from the GC cache
275+
- this would provoke conflict errors if the object was modified in the meantime,
276+
meaning we no longer need to attempt the write because someone else already did that
277+
- must also be set in case the object was removed to prevent "immutable field"
278+
errors when setting UID as discussed above
259279
260280
### RBAC for SVM
261281
- Storage Version Migrator Controller
@@ -393,7 +413,7 @@ total:
393413
The feature is enabled using the feature gate `StorageVersionMigrator`. During an upgrade, this gate must be set to true. During a downgrade, this gate must be set to false, and any remaining _StorageVersionMigration_ resources should be manually removed.
394414

395415
### Version Skew Strategy
396-
The feature will be enabled by the feature gate `StorageVersionMigrator` on both the _api-server_ and the _kube-controller-manager_. This gate must be set for both components during installation. Otherwise, since the kube-controller-manager is allowed to be one version lower than the api-server, it won't be able to process any StorageVersionMigration resources created by the API server.
416+
The feature will be enabled by the feature gate `StorageVersionMigrator` on the _kube-controller-manager_.
397417

398418
## Production Readiness Review Questionnaire
399419

0 commit comments

Comments
 (0)