Skip to content

Conversation

@diafour
Copy link
Member

@diafour diafour commented Nov 12, 2025

Description

  • 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 spec.dvcr.gc.schedule setting to specify schedule in the ModuleConfig.

Why do we need it, and what problem does it solve?

We need to periodically cleanup non-existent images in registry to free up storage space.

What is the expected result?

dvcr storage is cleaned up on schedule.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: dvcr
type: feature
summary: Add setting spec.gc.schedule to specify schedule for dvcr storage cleanup.

z9r5
z9r5 previously approved these changes Nov 13, 2025
@diafour diafour force-pushed the feat/dvcr/add-controller-to-cleanup-registry-on-schedule branch from c574929 to 899cc75 Compare November 13, 2025 10:35
@diafour diafour force-pushed the feat/dvcr/add-controller-to-cleanup-registry-on-schedule branch from 899cc75 to ed4113c Compare November 17, 2025 20:00
@diafour diafour force-pushed the feat/dvcr/add-controller-to-cleanup-registry-on-schedule branch from ed4113c to c7fd67c Compare November 18, 2025 19:41
- 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.

Signed-off-by: Ivan Mikheykin <[email protected]>
…in spec.settings.dvcr.gc.schedule to run cleanup periodically.

Signed-off-by: Ivan Mikheykin <[email protected]>
@diafour diafour force-pushed the feat/dvcr/add-controller-to-cleanup-registry-on-schedule branch from 2fda947 to a85fe35 Compare November 19, 2025 19:24
Signed-off-by: Ivan Mikheykin <[email protected]>
…1689)

- Cleanup is disabled by default, set schedule explicitly in spec.settings.dvcr.gc.schedule to run cleanup periodically.


* feat(api): postpone image operations until dvcr maintenance finishes

- 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.

* feat(core): add auto-cleanup and check for dvcr-cleaner (#1675)

Add new commands to support auto-cleanup:

- dvcr-cleaner gc auto-cleanup — compares images in registry and in cluster, removes manifests not found in cluster, runs garbage collect.
- dvcr-cleaner gc check — jst compares images in registry and in cluster and prints images eligible to cleanup.


---------

Signed-off-by: Ivan Mikheykin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants