1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/deployment/nodefeaturerule/samples/nodefeaturerule-pci.yaml

33 lines
951 B
YAML
Raw Normal View History

#
# This NodeFeatureRule replicates all built-in pci feature labels of NFD.
#
apiVersion: nfd.k8s-sigs.io/v1alpha1
kind: NodeFeatureRule
metadata:
name: nfd-builtin-pci-features
spec:
rules:
- name: "nfd built-in pci-<device>.present labels"
labelsTemplate: |
{{ range .pci.device }}pci-{{ .class }}_{{ .vendor }}.present=true
{{ end }}
matchFeatures:
- feature: pci.device
matchExpressions:
"class":
op: InRegexp
value: ["^03", "^0b40", "^12"]
- name: "nfd built-in pci-<device>.sriov.capable labels"
labelsTemplate: |
{{ range .pci.device }}pci-{{ .class }}_{{ .vendor }}.sriov.capable=true
{{ end }}
matchFeatures:
- feature: pci.device
matchExpressions:
"class":
op: InRegexp
value: ["^03", "^0b40", "^12"]
"sriov_totalvfs":
op: Exists