Skip to content

Commit 33cc9ee

Browse files
committed
clarify the allowed value on Operator
1 parent 88f3b64 commit 33cc9ee

File tree

1 file changed

+7
-0
lines changed
  • keps/sig-scheduling/3633-matchlabelselectors-to-podaffinity

1 file changed

+7
-0
lines changed

keps/sig-scheduling/3633-matchlabelselectors-to-podaffinity/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,19 @@ A new optional field `MatchLabelSelectors` is introduced to `PodAffinityTerm`.
346346
```go
347347
type LabelSelectorOperator string
348348
349+
// Only `In` and `NotIn` are expected for LabelSelectorOperator.
350+
const (
351+
InLabelSelectorOperator LabelSelectorOperator = "In"
352+
NotInLabelSelectorOperator LabelSelectorOperator = "NotIn"
353+
)
354+
349355
type MatchLabelSelector struct {
350356
// Key is used to lookup value from the incoming pod labels,
351357
// and that key-value label is merged with `LabelSelector`.
352358
// Key that doesn't exist in the incoming pod labels will be ignored.
353359
Key string
354360
// Operator defines how key-value, fetched via the above `Keys`, is merged into LabelSelector.
361+
// Only `In` and `NotIn` are expected.
355362
// If Operator is `In`, `key in (value)` is merged with LabelSelector.
356363
// If Operator is `NotIn`, `key notin (value)` is merged with LabelSelector.
357364
//

0 commit comments

Comments
 (0)