Skip to content

fix(dvcr): resume postponed imports after garbage collection#2193

Draft
diafour wants to merge 1 commit intomainfrom
fix/vi/dvcr-gc-vi-stuck-in-progress
Draft

fix(dvcr): resume postponed imports after garbage collection#2193
diafour wants to merge 1 commit intomainfrom
fix/vi/dvcr-gc-vi-stuck-in-progress

Conversation

@diafour
Copy link
Copy Markdown
Member

@diafour diafour commented Apr 8, 2026

Description

These changes should fix problem when VI/CVI/VD stuck in "Postponed" state.

Add a DVCR garbage collection secret watcher for VI, CVI, and VD controllers to requeue postponed resources when garbage collection is over.

Add a timeout for the DVCR garbage collection in dvcr-gc controller. It should auto-heal Deploy/dvcr and postponed VI/CVI/VD in case dvcr-cleaner is failed.

Minor:

  • Handle nil garbage collection secret in dvcr-cleaner when adding cleanup completion annotation.
  • Refactor dvcr gc secret watcher: filter events for secret early in predicate functions.

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

These changes should fix problem when VI/CVI/VD stuck in "Postponed" state.

DVCR is not in "garbage collection" state, result is in the secret, but VI still has Postponed condition.

What is the expected result?

CVI/VI/VD should proceed with importing after DVCR garbage collection is done.

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: fix
summary: Fix starting CVI/VI/VD import after DVCR garbage collection is done.

These changes should fix problem when VI/CVI/VD stuck in "Postponed" state.

Add a DVCR garbage collection secret watcher for VI, CVI, and VD
controllers to requeue postponed resources when garbage collection
is over.

Add a timeout for the DVCR garbage collection in dvcr-gc controller.
It should auto-heal Deploy/dvcr and postponed VI/CVI/VD in case
dvcr-cleaner is failed.

Minor:
- Handle nil garbage collection secret in dvcr-cleaner when
adding cleanup completion annotation.
- Refactor dvcr gc secret watcher: filter events for secret early in predicate functions.

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
@diafour diafour added this to the v1.8.0 milestone Apr 8, 2026
@diafour diafour self-assigned this Apr 8, 2026
}

if err := w.client.List(ctx, resList, &client.ListOptions{}); err != nil {
return nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not ignore errors

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.

2 participants