Skip to content

Commit ded370a

Browse files
committed
apply sembr lint
Signed-off-by: Heba Elayoty <heelayot@microsoft.com>
1 parent 57a6ba4 commit ded370a

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

content/en/docs/concepts/scheduling-eviction/taint-and-toleration.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,23 @@ You can also use numeric comparison operators for threshold-based matching:
8989
* the `operator` is `Gt` (greater than) and the toleration value is greater than the taint value, or
9090
* the `operator` is `Lt` (less than) and the toleration value is less than the taint value.
9191

92-
For numeric operators, both the toleration and taint values must be valid integers. If either value cannot be parsed as an integer, the toleration does not match.
92+
For numeric operators, both the toleration and taint values must be valid integers.
93+
If either value cannot be parsed as an integer, the toleration does not match.
9394

9495
{{< note >}}
95-
When you create a Pod that uses `Gt` or `Lt` tolerations operators, the API server validates that the toleration values are valid integers. Taint values on nodes are not validated at node registration time. If a node has a non-numeric taint value (for example, `servicelevel.organization.example/agreed-service-level=high:NoSchedule`), pods with numeric comparison
96-
operators will not match that taint and cannot schedule on that node.
96+
When you create a Pod that uses `Gt` or `Lt` tolerations operators, the API server validates that
97+
the toleration values are valid integers. Taint values on nodes are not validated at node
98+
registration time. If a node has a non-numeric taint value (for example,
99+
`servicelevel.organization.example/agreed-service-level=high:NoSchedule`),
100+
pods with numeric comparison operators will not match that taint and cannot schedule on that node.
97101
{{< /note >}}
98102

99103
{{< note >}}
100104

101105
There are two special cases:
102106

103-
If the `key` is empty, then the `operator` must be `Exists`, which matches all keys and values. Note that the `effect` still needs to be matched at the same time.
107+
If the `key` is empty, then the `operator` must be `Exists`, which matches all keys and values.
108+
Note that the `effect` still needs to be matched at the same time.
104109

105110
An empty `effect` matches all effects with key `key1`.
106111

@@ -192,7 +197,9 @@ taint is removed before that time, the pod will not be evicted.
192197

193198
{{< feature-state feature_gate_name="TaintTolerationComparisonOperators" >}}
194199

195-
In addition to the `Equal` and `Exists` operators, you can use numeric comparison operators (`Gt` and `Lt`) to match taints with integer values. This is useful for threshold-based scheduling scenarios, such as matching nodes based on reliability levels or SLA requirements.
200+
In addition to the `Equal` and `Exists` operators, you can use numeric comparison operators
201+
(`Gt` and `Lt`) to match taints with integer values. This is useful for threshold-based scheduling
202+
scenarios, such as matching nodes based on reliability levels or SLA requirements.
196203

197204
For example, if nodes are tainted with a value representing a service level agreement (SLA):
198205

@@ -204,9 +211,10 @@ A pod can tolerate nodes with SLA greater than 900:
204211

205212
{{% code_sample file="pods/pod-with-numeric-toleration.yaml" %}}
206213

207-
This toleration matches the taint on `node1` because `900 < 950` (the toleration value is less than the taint value for the `Gt` operator).
208-
209-
Similarly, you can use the `Lt` operator to match taints where the toleration value is greater than the taint value:
214+
This toleration matches the taint on `node1` because `900 < 950` (the toleration value
215+
is less than the taint value for the `Gt` operator).
216+
Similarly, you can use the `Lt` operator to match taints where the toleration value is
217+
greater than the taint value:
210218

211219
```yaml
212220
tolerations:
@@ -219,7 +227,8 @@ tolerations:
219227
{{< note >}}
220228
When using numeric comparison operators:
221229

222-
* Both the toleration and taint values must be valid signed 64-bit integers (zero leading numbers (e.g., "0550") are not allowed).
230+
* Both the toleration and taint values must be valid signed 64-bit integers
231+
(zero leading numbers (e.g., "0550") are not allowed).
223232
* If a value cannot be parsed as an integer, the toleration does not match.
224233
* Numeric operators work with all taint effects: `NoSchedule`, `PreferNoSchedule`, and `NoExecute`.
225234
{{< /note >}}

0 commit comments

Comments
 (0)