API Reference
Packages
nfd.k8s-sigs.io/v1alpha1
Package v1alpha1 is the v1alpha1 version of the nfd API.
Resource Types
- NodeFeature
- NodeFeatureGroup
- NodeFeatureGroupList
- NodeFeatureList
- NodeFeatureRule
- NodeFeatureRuleList
AttributeFeatureSet
AttributeFeatureSet is a set of features having string value.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
elements object (keys:string, values:string) | Individual features of the feature set. |
FeatureGroupNode
FeatureGroupNode is a node that matches the rules of a NodeFeatureGroup.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name of the node. |
FeatureMatcher
Underlying type: FeatureMatcherTerm array
FeatureMatcher is a list (array) of FeatureMatcherTerm (i.e. per-feature matchers), all of which must match.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
feature string | Feature is the name of the feature set to match against. | ||
matchExpressions MatchExpressionSet | MatchExpressions is the set of per-element expressions evaluated. These match against the value of the specified elements. | ||
matchName MatchExpression | MatchName in an expression that is matched against the name of each element in the feature set. |
FeatureMatcherTerm
FeatureMatcherTerm defines requirements against one feature set. All requirements (specified as MatchExpressions) are evaluated against each element in the feature set.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
feature string | Feature is the name of the feature set to match against. | ||
matchExpressions MatchExpressionSet | MatchExpressions is the set of per-element expressions evaluated. These match against the value of the specified elements. | ||
matchName MatchExpression | MatchName in an expression that is matched against the name of each element in the feature set. |
Features
Features is the collection of all discovered features.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
flags object (keys:string, values:FlagFeatureSet) | Flags contains all the flag-type features of the node. | ||
attributes object (keys:string, values:AttributeFeatureSet) | Attributes contains all the attribute-type features of the node. | ||
instances object (keys:string, values:InstanceFeatureSet) | Instances contains all the instance-type features of the node. |
FlagFeatureSet
FlagFeatureSet is a set of simple features only containing names without values.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
elements object (keys:string, values:Nil) | Individual features of the feature set. |
GroupRule
GroupRule defines a rule for nodegroup filtering.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name of the rule. | ||
vars object (keys:string, values:string) | Vars is the variables to store if the rule matches. Variables can be referenced from other rules enabling more complex rule hierarchies. | ||
varsTemplate string | VarsTemplate specifies a template to expand for dynamically generating multiple variables. Data (after template expansion) must be keys with an optional value ( | ||
matchFeatures FeatureMatcher | MatchFeatures specifies a set of matcher terms all of which must match. | ||
matchAny MatchAnyElem array | MatchAny specifies a list of matchers one of which must match. |
InstanceFeature
InstanceFeature represents one instance of a complex features, e.g. a device.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
attributes object (keys:string, values:string) | Attributes of the instance feature. |
InstanceFeatureSet
InstanceFeatureSet is a set of features each of which is an instance having multiple attributes.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
elements InstanceFeature array | Individual features of the feature set. |
MatchAnyElem
MatchAnyElem specifies one sub-matcher of MatchAny.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
matchFeatures FeatureMatcher | MatchFeatures specifies a set of matcher terms all of which must match. |
MatchExpression
MatchExpression specifies an expression to evaluate against a set of input values. It contains an operator that is applied when matching the input and an array of values that the operator evaluates the input against.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
op MatchOp | Op is the operator to be applied. | Enum: [In NotIn InRegexp Exists DoesNotExist Gt Ge Lt Le GtLt GeLe IsTrue IsFalse] | |
value MatchValue | Value is the list of values that the operand evaluates the input against. Value should be empty if the operator is Exists, DoesNotExist, IsTrue or IsFalse. Value should contain exactly one element if the operator is Gt or Lt and exactly two elements if the operator is GtLt. In other cases Value should contain at least one element. | ||
type ValueType | Type defines the value type for specific operators. The currently supported type is ‘version' for Gt,Ge,Lt,Le,GtLt,GeLe operators. |
MatchExpressionSet
Underlying type: object (keys:string, values:MatchExpression)
MatchExpressionSet contains a set of MatchExpressions, each of which is evaluated against a set of input values.
Appears in:
MatchOp
Underlying type: string
MatchOp is the match operator that is applied on values when evaluating a MatchExpression.
Validation:
- Enum: [In NotIn InRegexp Exists DoesNotExist Gt Ge Lt Le GtLt GeLe IsTrue IsFalse]
Appears in:
| Field | Description |
|---|---|
In | MatchIn returns true if any of the values stored in the expression is equal to the input. |
NotIn | MatchNotIn returns true if none of the values in the expression are equal to the input. |
InRegexp | MatchInRegexp treats values of the expression as regular expressions and returns true if any of them matches the input. |
Exists | MatchExists returns true if the input is valid. The expression must not have any values. |
DoesNotExist | MatchDoesNotExist returns true if the input is not valid. The expression must not have any values. |
Gt | MatchGt returns true if the input is greater than the value of the expression (number of values in the expression must be exactly one). Both the input and value must be integer numbers, otherwise an error is returned. |
Ge | MatchGe returns true if the input is greater than or equal to the value of the expression (number of values in the expression must be exactly one). Both the input and value must be integer numbers, otherwise an error is returned. |
Lt | MatchLt returns true if the input is less than the value of the expression (number of values in the expression must be exactly one). Both the input and value must be integer numbers, otherwise an error is returned. |
Le | MatchLe returns true if the input is less than or equal to the value of the expression (number of values in the expression must be exactly one). Both the input and value must be integer numbers, otherwise an error is returned. |
GtLt | MatchGtLt returns true if the input is between two values, i.e. greater than the first value and less than the second value of the expression (number of values in the expression must be exactly two). Both the input and values must be integer numbers, otherwise an error is returned. |
GeLe | MatchGeLe returns true if the input is between two values including the boundary values, i.e. greater than or equal to the first value and less than or equal to the second value of the expression (number of values in the expression must be exactly two). Both the input and values must be integer numbers, otherwise an error is returned. |
IsTrue | MatchIsTrue returns true if the input holds the value "true". The expression must not have any values. |
IsFalse | MatchIsFalse returns true if the input holds the value "false". The expression must not have any values. |
MatchValue
Underlying type: string array
MatchValue is the list of values associated with a MatchExpression.
Appears in:
Nil
Nil is a dummy empty struct for protobuf compatibility. NOTE: protobuf definitions have been removed but this is kept for API compatibility.
Appears in:
NodeFeature
NodeFeature resource holds the features discovered for one node in the cluster. NodeFeature is namespaced.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | nfd.k8s-sigs.io/v1alpha1 | ||
kind string | NodeFeature | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec NodeFeatureSpec | Specification of the NodeFeature, containing features discovered for a node. |
NodeFeatureGroup
NodeFeatureGroup resource holds Node pools by featureGroup. NodeFeatureGroup is namespaced (short name nfg) and has a status subresource. Only objects in the namespace of nfd-master are processed.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | nfd.k8s-sigs.io/v1alpha1 | ||
kind string | NodeFeatureGroup | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec NodeFeatureGroupSpec | Spec defines the rules to be evaluated. | ||
status NodeFeatureGroupStatus | Status of the NodeFeatureGroup after the most recent evaluation of the specification. |
NodeFeatureGroupList
NodeFeatureGroupList contains a list of NodeFeatureGroup objects.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | nfd.k8s-sigs.io/v1alpha1 | ||
kind string | NodeFeatureGroupList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
items NodeFeatureGroup array | List of NodeFeatureGroups. |
NodeFeatureGroupSpec
NodeFeatureGroupSpec describes a NodeFeatureGroup object.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
featureGroupRules GroupRule array | List of rules to evaluate to determine nodes that belong in this group. |
NodeFeatureGroupStatus
NodeFeatureGroupStatus is the status of a NodeFeatureGroup, i.e. the result of the most recent evaluation of its rules.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
nodes FeatureGroupNode array | Nodes is a list of FeatureGroupNode in the cluster that match the featureGroupRules |
NodeFeatureList
NodeFeatureList contains a list of NodeFeature objects.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | nfd.k8s-sigs.io/v1alpha1 | ||
kind string | NodeFeatureList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
items NodeFeature array | List of NodeFeatures. |
NodeFeatureRule
NodeFeatureRule resource specifies a configuration for feature-based customization of node objects, such as node labeling. NodeFeatureRule is cluster-scoped (short name nfr).
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | nfd.k8s-sigs.io/v1alpha1 | ||
kind string | NodeFeatureRule | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec NodeFeatureRuleSpec | Spec defines the rules to be evaluated. |
NodeFeatureRuleList
NodeFeatureRuleList contains a list of NodeFeatureRule objects.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | nfd.k8s-sigs.io/v1alpha1 | ||
kind string | NodeFeatureRuleList | ||
metadata ListMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
items NodeFeatureRule array | List of NodeFeatureRules. |
NodeFeatureRuleSpec
NodeFeatureRuleSpec describes a NodeFeatureRule.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
rules Rule array | Rules is a list of node customization rules. |
NodeFeatureSpec
NodeFeatureSpec describes a NodeFeature object.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
features Features | Features is the full "raw" features data that has been discovered. | ||
labels object (keys:string, values:string) | Labels is the set of node labels that are requested to be created. |
Rule
Rule defines a rule for node customization such as labeling.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | Name of the rule. | ||
labels object (keys:string, values:string) | Labels to create if the rule matches. | ||
labelsTemplate string | LabelsTemplate specifies a template to expand for dynamically generating multiple labels. Data (after template expansion) must be keys with an optional value ( | ||
annotations object (keys:string, values:string) | Annotations to create if the rule matches. | ||
vars object (keys:string, values:string) | Vars is the variables to store if the rule matches. Variables do not directly inflict any changes in the node object. However, they can be referenced from other rules enabling more complex rule hierarchies, without exposing intermediary output values as labels. | ||
varsTemplate string | VarsTemplate specifies a template to expand for dynamically generating multiple variables. Data (after template expansion) must be keys with an optional value ( | ||
taints Taint array | Taints to create if the rule matches. | ||
extendedResources object (keys:string, values:string) | ExtendedResources to create if the rule matches. | ||
matchFeatures FeatureMatcher | MatchFeatures specifies a set of matcher terms all of which must match. | ||
matchAny MatchAnyElem array | MatchAny specifies a list of matchers one of which must match. |
ValueType
Underlying type: string
ValueType represents the type of value in the expression.
Appears in:
| Field | Description |
|---|---|
version | TypeVersion represents a version with the following supported formats (major.minor.patch): %d.%d.%d (e.g., 1.2.3), %d.%d (e.g., 1.2), %d (e.g., 1) |