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

Add predicates::resource_version #1221

Merged
merged 3 commits into from Jun 4, 2023
Merged

Add predicates::resource_version #1221

merged 3 commits into from Jun 4, 2023

Conversation

clux
Copy link
Member

@clux clux commented May 31, 2023

This adds a resource_version predicate helper for things that cannot use predicates::generation like pods (which do not set the .medata.generation).

This predicate also exists upstream in https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/predicate/predicate.go#L127

We also change the default example to use deployments, as these can make use of the predicates::generation fn by default.

clux added 2 commits May 31, 2023 15:04
This adds a resource_version predicate helper for things that cannot use
`predicates::generation` like pods (which do not set the .medata.generation).

We also change the default example to use deployments, as these can
make use of the `predicates::generation` fn by default.

Signed-off-by: clux <sszynrae@gmail.com>
Signed-off-by: clux <sszynrae@gmail.com>
@clux clux added the runtime controller runtime related label May 31, 2023
@clux clux added this to the 0.83.0 milestone May 31, 2023
@clux clux added the changelog-add changelog added category for prs label May 31, 2023
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #1221 (d071f85) into main (ff5b320) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1221      +/-   ##
==========================================
- Coverage   73.49%   73.43%   -0.07%     
==========================================
  Files          68       68              
  Lines        5380     5390      +10     
==========================================
+ Hits         3954     3958       +4     
- Misses       1426     1432       +6     
Impacted Files Coverage Δ
kube-client/src/api/util/mod.rs 93.50% <ø> (ø)
kube-client/src/lib.rs 93.78% <ø> (ø)
kube-runtime/src/utils/predicate.rs 84.61% <0.00%> (-3.39%) ⬇️
kube-runtime/src/utils/watch_ext.rs 0.00% <ø> (ø)
kube/src/lib.rs 89.04% <ø> (ø)

... and 7 files with indirect coverage changes

@clux clux requested review from Dav1dde and mateiidavid June 4, 2023 05:07
Signed-off-by: clux <sszynrae@gmail.com>
@clux clux merged commit 89b1502 into main Jun 4, 2023
16 of 17 checks passed
@clux clux deleted the predicate-rv branch June 4, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-add changelog added category for prs runtime controller runtime related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants