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
Copy file name to clipboardExpand all lines: keps/sig-api-machinery/4192-svm-in-tree/README.md
+25-4Lines changed: 25 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,9 +253,30 @@ will be deferred to the user, instead of being triggered automatically.
253
253
254
254
#### GarbageCollectionCache
255
255
Kube ControllerManager'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. These patch requests should contain minimum information:
267
+
- API version and kind
268
+
- resource name and namespace
269
+
- UID from the GC cache
270
+
- to make sure we don't accidentally create an empty instance if the resource was
271
+
deleted in the meantime
272
+
- resource version from the GC cache
273
+
- this would provoke conflict errors if the object was modified in the meantime,
274
+
meaning we no longer need to attempt the write because someone else already did that
275
+
- must also be set in case the object was removed to prevent "immutable field"
276
+
errors when setting UID as discussed above
277
+
278
+
<!--TODO: could we skip the resources whose RV is already higher than what we stored
279
+
for the migration initially? -->
259
280
260
281
### RBAC for SVM
261
282
- Storage Version Migrator Controller
@@ -393,7 +414,7 @@ total:
393
414
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.
394
415
395
416
### VersionSkewStrategy
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.
417
+
The feature will be enabled by the feature gate `StorageVersionMigrator` on the _kube-controller-manager_.
0 commit comments