kube-rs / kube

Rust Kubernetes client and controller runtime
https://kube.rs
Apache License 2.0
2.91k stars 304 forks source link

Label selector support #1539

Closed Danil-Grigorev closed 2 months ago

Danil-Grigorev commented 2 months ago

Motivation

Allow to perform client side resource selection logic based on label selectors, compatible with upstream LabelSelector resource.

Solution

Continued implementation for #1482 Outstanding tasks:

Fixes #1538

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 89.79592% with 25 lines in your changes missing coverage. Please review.

Project coverage is 75.7%. Comparing base (e57b060) to head (32089f1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1539 +/- ## ======================================= + Coverage 75.2% 75.7% +0.5% ======================================= Files 78 79 +1 Lines 6989 7234 +245 ======================================= + Hits 5249 5469 +220 - Misses 1740 1765 +25 ``` | [Files](https://app.codecov.io/gh/kube-rs/kube/pull/1539?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kube-rs) | Coverage Δ | | |---|---|---| | [kube-core/src/params.rs](https://app.codecov.io/gh/kube-rs/kube/pull/1539?src=pr&el=tree&filepath=kube-core%2Fsrc%2Fparams.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kube-rs#diff-a3ViZS1jb3JlL3NyYy9wYXJhbXMucnM=) | `85.6% <100.0%> (+1.1%)` | :arrow_up: | | [kube/src/lib.rs](https://app.codecov.io/gh/kube-rs/kube/pull/1539?src=pr&el=tree&filepath=kube%2Fsrc%2Flib.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kube-rs#diff-a3ViZS9zcmMvbGliLnJz) | `88.5% <ø> (ø)` | | | [kube-runtime/src/watcher.rs](https://app.codecov.io/gh/kube-rs/kube/pull/1539?src=pr&el=tree&filepath=kube-runtime%2Fsrc%2Fwatcher.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kube-rs#diff-a3ViZS1ydW50aW1lL3NyYy93YXRjaGVyLnJz) | `42.1% <0.0%> (-0.5%)` | :arrow_down: | | [kube-core/src/labels.rs](https://app.codecov.io/gh/kube-rs/kube/pull/1539?src=pr&el=tree&filepath=kube-core%2Fsrc%2Flabels.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kube-rs#diff-a3ViZS1jb3JlL3NyYy9sYWJlbHMucnM=) | `90.3% <90.3%> (ø)` | |