From 66243a6dc255cf84dff06c7ddb00e19e2d8c5759 Mon Sep 17 00:00:00 2001 From: CRC <6834943+christophercarney@users.noreply.github.com> Date: Mon, 11 Nov 2019 21:24:06 -0500 Subject: [PATCH] Update label selectors caution about OR operator (#17477) --- .../en/docs/concepts/overview/working-with-objects/labels.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/docs/concepts/overview/working-with-objects/labels.md b/content/en/docs/concepts/overview/working-with-objects/labels.md index e8ca6f02c8..606b0f3f67 100644 --- a/content/en/docs/concepts/overview/working-with-objects/labels.md +++ b/content/en/docs/concepts/overview/working-with-objects/labels.md @@ -92,6 +92,10 @@ them. For some API types, such as ReplicaSets, the label selectors of two instances must not overlap within a namespace, or the controller can see that as conflicting instructions and fail to determine how many replicas should be present. {{< /note >}} +{{< caution >}} +For both equality-based and set-based conditions there is no logical _OR_ (`||`) operator. Ensure your filter statements are structured accordingly. +{{< /caution >}} + ### _Equality-based_ requirement _Equality-_ or _inequality-based_ requirements allow filtering by label keys and values. Matching objects must satisfy all of the specified label constraints, though they may have additional labels as well.