You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added section on operators for nodeAffinity and podAffinity (#39742)
* Added section in the docs about the behaviour of operator in the node and pod affinity docs
* Fixes from review
* Fixed podAffinity and added note about non-integer values
* Fixes from review
* Fixed review comments
* Fixes from review
The following are all the logical operators that you can use in the `operator` field for `nodeAffinity` and `podAffinity` mentioned above.
504
+
505
+
| Operator | Behavior |
506
+
| :------------: | :-------------: |
507
+
| `In` | The label value is present in the supplied set of strings |
508
+
| `NotIn` | The label value is not contained in the supplied set of strings |
509
+
| `Exists` | A label with this key exists on the object |
510
+
| `DoesNotExist` | No label with this key exists on the object |
511
+
512
+
The following operators can only be used with `nodeAffinity`.
513
+
514
+
| Operator | Behaviour |
515
+
| :------------: | :-------------: |
516
+
| `Gt` | The supplied value will be parsed as an integer, and that integer is less than or equal to the integer that results from parsing the value of a label named by this selector |
517
+
| `Lt` | The supplied value will be parsed as an integer, and that integer is greater than or equal to the integer that results from parsing the value of a label named by this selector |
518
+
519
+
520
+
{{<note>}}
521
+
`Gt`and `Lt` operators will not work with non-integer values. If the given value
522
+
doesn't parse as an integer, the pod will fail to get scheduled. Also, `Gt` and `Lt`
523
+
are not available for `podAffinity`.
524
+
{{</note>}}
525
+
495
526
## {{% heading "whatsnext" %}}
496
527
497
528
- Read more about [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/) .
0 commit comments