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

.WithDeletionTimestamp Filter #1018

Closed
3 tasks
cmwylie19 opened this issue Aug 2, 2024 · 0 comments · Fixed by #1026
Closed
3 tasks

.WithDeletionTimestamp Filter #1018

cmwylie19 opened this issue Aug 2, 2024 · 0 comments · Fixed by #1026
Assignees
Labels
enhancement New feature or request

Comments

@cmwylie19
Copy link
Collaborator

cmwylie19 commented Aug 2, 2024

Is your feature request related to a problem? Please describe.

UDS-Core is using finalizers to control deletion of managed objects.

They were using When(Object).isDeleted(..) but this no longer works because the finalizer simply Updates instead of deletes because it adds a deletionTimestamp to the object metadata.

Definition of done:

  • unit test
  • e2e test
  • works for mutate, validate, watch, reconcile

Describe the solution you'd like

  • Given someone is using Pepr to write an Operator and the operator uses finalizers
  • When an update occurs
  • Then they can use the WithDeletionTimestamp filter to check if they need to "operate" on the object

Describe alternatives you've considered

(optional) A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@cmwylie19 cmwylie19 added the enhancement New feature or request label Aug 2, 2024
@cmwylie19 cmwylie19 added this to the v0.34.0 milestone Aug 2, 2024
@cmwylie19 cmwylie19 self-assigned this Aug 3, 2024
@cmwylie19 cmwylie19 removed this from the v0.34.0 milestone Aug 3, 2024
cmwylie19 added a commit that referenced this issue Aug 30, 2024
## Description

Adds a new filter `.WithDeletionTimestamp` to aid Operator developers as
they use `ownerRefs`. Decide if `.HasDeletionTimestamp` needs to be
done.

Needs:
- [x] e2e test
(defenseunicorns/pepr-excellent-examples#61)
- [x] docs 

## Related Issue

Fixes #1018 
Fixes: #1027 
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
btlghrants added a commit that referenced this issue Sep 10, 2024
## Description

Adds a new filter `.WithDeletionTimestamp` to aid Operator developers as
they use `ownerRefs`. Decide if `.HasDeletionTimestamp` needs to be
done.

Needs:
- [x] e2e test
(defenseunicorns/pepr-excellent-examples#61)
- [x] docs 

## Related Issue

Fixes #1018 
Fixes: #1027 
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request)
followed

---------

Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant