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/nodefeature-1.yaml
Markus Lehtonen dc5af8be04 nfd-master: predictable handling of unprefixed names
Make the handling of unprefixed names (of labels, annotations and
extended resources) well-defined and predictable. Previously the
resulting output was not predictable in case the same name was coming in
both the unprefixed and prefixed form, say unprefixed "foo=bar" coming from
one source (be it nfd-worker or NodeFeature(Rule)) and
"feature.node.kubernetes.io/foo=baz" from a NodeFeature(Rule).
Previously the output value was randomly either "bar" or "baz".

This patch adds prefixes to all names early in the processing
"pipeline", preventing random name clashes later on.
2023-11-23 22:16:04 +02:00

33 lines
948 B
YAML

apiVersion: nfd.k8s-sigs.io/v1alpha1
kind: NodeFeature
metadata:
# This name should ensure that it's processed later than that from nfd-worker
name: zzz-e2e-features-1
spec:
# Features for NodeFeatureRule matching
features:
flags:
e2e.flags:
elements:
flag_1: {}
flag_2: {}
attributes:
# Override features from the fake sources
fake.attribute:
elements:
attr_2: "true"
instances:
# Append to features from the fake sources
fake.instance:
elements:
- attributes:
attr_1: "true"
attr_2: "9"
# Labels to be created
labels:
e2e-nodefeature-test-1: "foo"
# The prefixed name should take precedence over the non-prefixed name above
feature.node.kubernetes.io/e2e-nodefeature-test-1: "obj-1"
e2e-nodefeature-test-2: "obj-1"
# Override feature from nfd-worker
fake-fakefeature3: "overridden"