Skip to content

Commit

Permalink
Label selector support (#1539)
Browse files Browse the repository at this point in the history
* Import labels module from linkerd

straight copy + factor out 2 std imports

Signed-off-by: clux <[email protected]>

* some initial interface thoughts

Signed-off-by: clux <[email protected]>

* Implement Selector to match on resource labels

Signed-off-by: Danil-Grigorev <[email protected]>

* Implement SelectorExt and a Matcher trait

- Add SelectorExt to the prelude
- Remove Map in favor of more explicit BTreeMap<String, String>
- Add exmples of usage

Signed-off-by: Danil-Grigorev <[email protected]>

* Use TryFrom for LabelSelector conversion, drop Expression::Invalid

Signed-off-by: Danil-Grigorev <[email protected]>

* Sealing the SelectorExt trait

- fmt fixes

Signed-off-by: Danil-Grigorev <[email protected]>

* Rename Matcher to SelectorExt and seal

- Implemented for Selector and Expression for now

Signed-off-by: Danil-Grigorev <[email protected]>

---------

Signed-off-by: clux <[email protected]>
Signed-off-by: Danil-Grigorev <[email protected]>
Co-authored-by: clux <[email protected]>
  • Loading branch information
Danil-Grigorev and clux authored Jul 20, 2024
1 parent 614792d commit 1816fd8
Show file tree
Hide file tree
Showing 5 changed files with 727 additions and 3 deletions.
Loading

0 comments on commit 1816fd8

Please sign in to comment.