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-memory.yaml

34 lines
900 B
YAML

#
# This NodeFeatureRule replicates all built-in memory feature labels of NFD.
#
apiVersion: nfd.k8s-sigs.io/v1alpha1
kind: NodeFeatureRule
metadata:
name: nfd-builtin-memory-features
spec:
rules:
- name: "nfd built-in memory-numa labels"
labels:
"memory-numa": "true"
matchFeatures:
- feature: memory.numa
matchExpressions:
"is_numa":
op: IsTrue
- name: "nfd built-in memory-nv.present label"
labelsTemplate: "{{ if gt (len .memory.nv ) 0 }}memory-nv.present=true{{ end }}"
matchFeatures:
- feature: memory.nv
matchName:
op: Exists
- name: "nfd built-in memory-nv.dax label"
labels:
"memory.nv.dax": "true"
matchFeatures:
- feature: memory.nv
matchExpressions:
"devtype":
op: In
value: ["nd_dax"]