1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-06 08:47:04 +00:00
node-feature-discovery/test/e2e/data/nodefeaturerule-4.yaml
Fabiano Fidêncio 250aea4741
Create extended resources with NodeFeatureRule
Add support for management of Extended Resources via the
NodeFeatureRule CRD API.

There are usage scenarios where users want to advertise features
as extended resources instead of labels (or annotations).

This patch enables the discovery of extended resources, via annotation
and patch of node.status.capacity and node.status.allocatable. By using
the NodeFeatureRule API.

Co-authored-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Co-authored-by: Markus Lehtonen <markus.lehtonen@intel.com>
Co-authored-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2023-04-07 16:14:56 +02:00

32 lines
806 B
YAML

apiVersion: nfd.k8s-sigs.io/v1alpha1
kind: NodeFeatureRule
metadata:
name: e2e-extened-resource-test
spec:
rules:
- name: "e2e no ns rule"
extendedResources:
nons: "123"
matchFeatures:
- feature: "fake.attribute"
matchExpressions:
"attr_1": {op: IsTrue}
"attr_2": {op: IsFalse}
- name: "e2e Dynamic rule"
extendedResources:
vendor.io/dynamic: "@fake.attribute.attr_3"
matchFeatures:
- feature: "fake.attribute"
matchExpressions:
"attr_3": {op: Exists}
- name: "e2e static rule"
extendedResources:
vendor.io/static: "123"
matchFeatures:
- name: "e2e not allowed rule"
extendedResources:
bad.kubernetes.io/malo: "999"
matchFeatures: