Skip to content

Commit 925a071

Browse files
committed
docs: add CR restrictions to the master configuration reference
Signed-off-by: AhmedGrati <[email protected]>
1 parent 7bad0d5 commit 925a071

File tree

3 files changed

+148
-1
lines changed

3 files changed

+148
-1
lines changed

docs/reference/master-configuration-reference.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,115 @@ Comma-separated list of `pattern=N` settings for file-filtered logging.
338338
Default: *empty*
339339

340340
Run-time configurable: yes
341+
342+
343+
## restrictions
344+
345+
The following options specify the restrictions that can be applied by nfd-master
346+
on the deployed Custom Resources in the cluster.
347+
348+
### restrictions.allowedNamespaces
349+
350+
The `allowedNamespaces` option specifies the NodeFeatures namespaces to watch.
351+
To select the appropriate namespaces to watch, you can use the `metav1.LabelSelector`
352+
as a type for this option.
353+
354+
Default: all namespaces are allowed to be watched.
355+
356+
Example:
357+
358+
```yaml
359+
restrictions:
360+
allowedNamespaces:
361+
matchLabels:
362+
kubernetes.io/metadata.name: "node-feature-discovery"
363+
matchExpressions:
364+
- key: "kubernetes.io/metadata.name"
365+
operator: "In"
366+
values:
367+
- "node-feature-discovery"
368+
```
369+
370+
### restrictions.maxLabelsPerCR
371+
372+
The `maxLabelsPerCR` option specifies the maximum number of labels that can
373+
be generated by a single CustomResource.
374+
375+
Default: no limit
376+
377+
Example:
378+
379+
```yaml
380+
restrictions:
381+
maxLabelsPerCR: 20
382+
```
383+
384+
### restrictions.maxTaintsPerCR
385+
386+
The `maxTaintsPerCR` option specifies the maximum number of taints that can
387+
be generated by a single CustomResource.
388+
389+
Default: no limit
390+
391+
Example:
392+
393+
```yaml
394+
restrictions:
395+
maxTaintsPerCR: 10
396+
```
397+
398+
### restrictions.maxExtendedResourcesPerCR
399+
400+
The `maxExtendedResourcesPerCR` option specifies the maximum number of extended
401+
resources that can be generated by a single CustomResource.
402+
403+
Default: no limit
404+
405+
Example:
406+
407+
```yaml
408+
restrictions:
409+
maxExtendedResourcesPerCR: 15
410+
```
411+
412+
### restrictions.maxExtendedResourcesPerCR
413+
414+
The `maxExtendedResourcesPerCR` option specifies the maximum number of extended
415+
resources that can be generated by a single CustomResource.
416+
417+
Default: no limit
418+
419+
Example:
420+
421+
```yaml
422+
restrictions:
423+
maxExtendedResourcesPerCR: 15
424+
```
425+
426+
### restrictions.overwriteLabels
427+
428+
The `overwriteLabels` option specifies whether to overwrite existing
429+
labels, if there's an overlap, or not.
430+
431+
Default: true
432+
433+
Example:
434+
435+
```yaml
436+
restrictions:
437+
overwriteLabels: false
438+
```
439+
440+
### restrictions.denyNodeFeatureLabels
441+
442+
The `denyNodeFeatureLabels` option specifies whether to deny labels from NodeFeature
443+
objects or not.
444+
445+
Default: false
446+
447+
Example:
448+
449+
```yaml
450+
restrictions:
451+
denyNodeFeatureLabels: true
452+
```

examples/nodefeature.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: nfd.k8s-sigs.io/v1alpha1
44
kind: NodeFeature
55
metadata:
66
labels:
7-
nfd.node.kubernetes.io/node-name: example-node
7+
nfd.node.kubernetes.io/node-name: nfd-control-plane
88
name: example-node
99
namespace: node-feature-discovery
1010
spec:

nfd-master.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
noPublish: false
2+
autoDefaultNs: true
3+
extraLabelNs: ["added.ns.io","added.kubernets.io"]
4+
denyLabelNs: ["denied.ns.io","denied.kubernetes.io"]
5+
resourceLabels: ["vendor-1.com/feature-1","vendor-2.io/feature-2"]
6+
enableTaints: false
7+
labelWhiteList: ""
8+
resyncPeriod: "2h"
9+
restrictions:
10+
allowedNamespaces:
11+
matchLabels:
12+
kubernetes.io/metadata.name: "node-feature-discovery"
13+
matchExpressions:
14+
- key: "kubernetes.io/metadata.name"
15+
operator: "In"
16+
values:
17+
- "node-feature-discovery"
18+
klog:
19+
addDirHeader: false
20+
alsologtostderr: false
21+
logBacktraceAt:
22+
logtostderr: true
23+
skipHeaders: false
24+
stderrthreshold: 2
25+
v: 0
26+
vmodule:
27+
logDir:
28+
logFile:
29+
logFileMaxSize: 1800
30+
skipLogHeaders: false
31+
leaderElection:
32+
leaseDuration: 15s
33+
renewDeadline: 10s
34+
retryPeriod: 2s
35+
nfdApiParallelism: 10

0 commit comments

Comments
 (0)