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
The `.labelsTemplate` field specifies a text template for dynamically creating
590
556
labels based on the matched features. See [templating](#templating) for
@@ -594,9 +560,10 @@ details.
594
560
> labels specified in the `labels` field will override anything
595
561
> originating from `labelsTemplate`.
596
562
597
-
#### Node Annotations
563
+
#### annotations
598
564
599
-
The `.annotations` field is a list of features to be advertised as annotations.
565
+
The `.annotations` field is a list of features to be advertised as node
566
+
annotations.
600
567
601
568
Take this rule as a referential example:
602
569
@@ -642,23 +609,61 @@ NFD enforces some limitations to the namespace (or prefix)/ of the annotations:
642
609
> annotations the features won't be advertised as node labels unless they are
643
610
> specified in the `labels` field.
644
611
645
-
#### Taints
612
+
#### taints
646
613
647
614
*taints* is a list of taint entries and each entry can have `key`, `value` and `effect`,
648
615
where the `value` is optional. Effect could be `NoSchedule`, `PreferNoSchedule`
649
616
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
617
618
+
Example NodeFeatureRule with taints:
619
+
620
+
```yaml
621
+
apiVersion: nfd.k8s-sigs.io/v1alpha1
622
+
kind: NodeFeatureRule
623
+
metadata:
624
+
name: my-sample-rule-object
625
+
spec:
626
+
rules:
627
+
- name: "my sample taint rule"
628
+
taints:
629
+
- effect: PreferNoSchedule
630
+
key: "feature.node.kubernetes.io/special-node"
631
+
value: "true"
632
+
- effect: NoExecute
633
+
key: "feature.node.kubernetes.io/dedicated-node"
634
+
matchFeatures:
635
+
- feature: kernel.loadedmodule
636
+
matchExpressions:
637
+
dummy: {op: Exists}
638
+
- feature: kernel.config
639
+
matchExpressions:
640
+
X86: {op: In, value: ["y"]}
641
+
```
642
+
643
+
In this example, if the `my sample taint rule` rule is matched,
0 commit comments