Merge pull request #30658 from hongchaodeng/r2
Automatic merge from submit-queue
Make labels, fields expose selectable requirements
What?
This is to change the labels/fields Selector interface and make them expose selectable requirements. We reuse labels.Requirement struct for label selector and add fields.Requirement for field selector.
Why?
In order to index labels/fields, we need them to tell us three things: index key (a field or a label), operator (greater, less, or equal), and value (string, int, etc.). By getting selectable requirements, we are able to pass them down and use them for indexing in storage layer.
Showing
pkg/fields/requirements.go
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
pkg/selection/operator.go
0 → 100644
Please
register
or
sign in
to comment