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
Small edit to how tainting is documented in the customization guide.
First, make the heading shorter. Then, move the detailed example yaml
and its description further down in the document to the section that
describes the "taints" field - this is now similar how extended
resources are documented.
Copy file name to clipboardExpand all lines: docs/usage/customization-guide.md
+42-38Lines changed: 42 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ re-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).
161
161
See [Feature rule format](#feature-rule-format) for detailed description of
162
162
available fields and how to write labeling rules.
163
163
164
-
### NodeFeatureRule tainting feature
164
+
### Node tainting
165
165
166
166
This feature is experimental.
167
167
@@ -178,48 +178,14 @@ To enable the tainting feature, `--enable-taints` flag needs to be set to `true`
178
178
If the flag `--enable-taints` is set to `false` (i.e. disabled), taints defined in
179
179
the NodeFeatureRule CR have no effect and will be ignored by the NFD master.
180
180
181
+
See documentation of the [taints field](#taints) for detailed description how
182
+
to specify taints in the NodeFeatureRule object.
183
+
181
184
> **NOTE:** Before enabling any taints, make sure to edit nfd-worker daemonset
182
185
> to tolerate the taints to be created. Otherwise, already running pods that do
183
186
> not tolerate the taint are evicted immediately from the node including the
184
187
> nfd-worker pod.
185
188
186
-
Example NodeFeatureRule with custom taints:
187
-
188
-
```yaml
189
-
apiVersion: nfd.k8s-sigs.io/v1alpha1
190
-
kind: NodeFeatureRule
191
-
metadata:
192
-
name: my-sample-rule-object
193
-
spec:
194
-
rules:
195
-
- name: "my sample taint rule"
196
-
taints:
197
-
- effect: PreferNoSchedule
198
-
key: "feature.node.kubernetes.io/special-node"
199
-
value: "true"
200
-
- effect: NoExecute
201
-
key: "feature.node.kubernetes.io/dedicated-node"
202
-
matchFeatures:
203
-
- feature: kernel.loadedmodule
204
-
matchExpressions:
205
-
dummy: {op: Exists}
206
-
- feature: kernel.config
207
-
matchExpressions:
208
-
X86: {op: In, value: ["y"]}
209
-
```
210
-
211
-
In this example, if the `my sample taint rule` rule is matched, `feature.node.kubernetes.io/pci-0300_1d0f.present=true:NoExecute`
212
-
and `feature.node.kubernetes.io/cpu-cpuid.ADX:NoExecute` taints are set on the node.
213
-
214
-
There are some limitations to the namespace part (i.e. prefix/) of the taint
215
-
key:
216
-
217
-
- `kubernetes.io/`and its sub-namespaces (like `sub.ns.kubernetes.io/`) cannot
218
-
generally be used
219
-
- the only exception is `feature.node.kubernetes.io/` and its sub-namespaces
220
-
(like `sub.ns.feature.node.kubernetes.io`)
221
-
- unprefixed keys (like `foo`) keys are disallowed
222
-
223
189
## Local feature source
224
190
225
191
NFD-Worker has a special feature source named `local` which is an integration
@@ -648,6 +614,44 @@ NFD enforces some limitations to the namespace (or prefix)/ of the annotations:
648
614
where the `value` is optional. Effect could be `NoSchedule`, `PreferNoSchedule`
649
615
or `NoExecute`. To learn more about the meaning of these effects, check out k8s [documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).
650
616
617
+
Example NodeFeatureRule with taints:
618
+
619
+
```yaml
620
+
apiVersion: nfd.k8s-sigs.io/v1alpha1
621
+
kind: NodeFeatureRule
622
+
metadata:
623
+
name: my-sample-rule-object
624
+
spec:
625
+
rules:
626
+
- name: "my sample taint rule"
627
+
taints:
628
+
- effect: PreferNoSchedule
629
+
key: "feature.node.kubernetes.io/special-node"
630
+
value: "true"
631
+
- effect: NoExecute
632
+
key: "feature.node.kubernetes.io/dedicated-node"
633
+
matchFeatures:
634
+
- feature: kernel.loadedmodule
635
+
matchExpressions:
636
+
dummy: {op: Exists}
637
+
- feature: kernel.config
638
+
matchExpressions:
639
+
X86: {op: In, value: ["y"]}
640
+
```
641
+
642
+
In this example, if the `my sample taint rule` rule is matched,
0 commit comments