Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add orphan checkpoint retention policy #60

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

snprajwal
Copy link
Member

This supersedes #28 with the required changes, and has been rebased against the current main branch.

@snprajwal snprajwal requested a review from rst0git December 24, 2024 15:48
- Introduced global, container, pod, and namespace-level
  policies for checkpoint retention, based on storage/size limits.
- Updated CRD definitions to store the storage/size based policies.
- Updated the sample configuration of CheckpointRestoreOperator with
  storage/checkpoint-size based policies

Signed-off-by: Parthiba-Hazra <[email protected]>
- Enhance generate_checkpoint_tar.sh to optionally
  generate tar files larger than 5MB
- Update GitHub Actions workflow to test storage quota
  garbage collection policies

Signed-off-by: Parthiba-Hazra <[email protected]>
- To implement the orphan checkpoint retention policy, the manager
  requires permissions to watch and get resources. This allows the
  manager pod to watch the relevant resources and retrieve the
  necessary resource information when applying the policies.

Signed-off-by: Parthiba-Hazra <[email protected]>
- Added support for orphan retention policies at the global,
  namespace, pod, and container levels.
- Introduced the `retainOrphan` field in each policy type to
  control the retention of orphan checkpoints.
- Updated the policy application logic to delete all orphan
  checkpoints when `retainOrphan` is set to false.
- Implemented a PodWatcher to monitor pod deletions and apply
  policies immediately when a resource is deleted.

Signed-off-by: Parthiba-Hazra <[email protected]>
- Add `test_orphan_retention_policy` test and update
  GitHub Actions workflow to test orphan retention policy

Signed-off-by: Parthiba-Hazra <[email protected]>
@snprajwal
Copy link
Member Author

ping @rst0git @adrianreber

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