Commit e8e70b4
authored
feat(dvcr): auto-cleanup for dvcr storage (#1688)
1. feat(dvcr): add controller to cleanup registry on schedule (#1688)
- Add dvcr-maintenance controller tht triggers on schedule and secret/dvcr-maintenance changes.
- Sets Maintenance condition on deployment/dvcr with cleanup state.
- Creates secret to start cleanup, deletes secret when cleanup is finished.
- Add hook to switch deployment/dvcr into maintenance mode.
- Add gc.schedule setting to specify schedule in the ModuleConfig.
- Note: Garbage collection is disabled by default, set schedule explicitly in spec.settings.dvcr.gc.schedule to run cleanup periodically.
2. feat(api): postpone image operations until dvcr maintenance finishes (#1689)
- Add postpone handler that runs before all other handlers.
- VirtualDisk: postpone only disks with dataSource that requires import to dvcr first.
- Add ProvisioningPostponed reason for Ready condition for vi/cvi/vd resources.
3. feat(core): add auto-cleanup and check commands for dvcr-cleaner (#1675)
- dvcr-cleaner gc auto-cleanup — compares images in registry and in cluster, removes manifests not found in cluster, runs garbage collect on registry blobs.
- dvcr-cleaner gc check — compares images in registry and in cluster and prints images eligible to cleanup.
---------
Signed-off-by: Ivan Mikheykin <[email protected]>1 parent 0f623b2 commit e8e70b4
File tree
50 files changed
+2866
-23
lines changed- api/core/v1alpha2
- dvcr-deployment-condition
- images
- dvcr-artifact
- cmd/dvcr-cleaner/cmd
- pkg
- cleaner
- kubernetes
- registry
- signal
- storage
- humanize
- hooks
- cmd/virtualization-module-hooks
- pkg/hooks/dvcr-garbage-collection
- virtualization-artifact
- cmd/virtualization-controller
- pkg
- common/annotations
- config
- controller
- conditions
- cvi
- dvcr-garbage-collection
- condition
- internal
- service
- watcher
- postponehandler
- types
- service
- vd
- internal
- vi
- dvcr
- openapi
- templates
- dvcr
- virtualization-controller
- tools/kubeconform/fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+2866
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
0 commit comments