v1alpha1

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 6 Imported by: 29

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the nfd API. +k8s:deepcopy-gen=package +kubebuilder:object:generate=true +groupName=nfd.k8s-sigs.io

Index

Constants

View Source
const (
	// FeatureLabelNs is the (default) namespace for feature labels.
	FeatureLabelNs = "feature.node.kubernetes.io"

	// FeatureLabelSubNsSuffix is the suffix for allowed feature label sub-namespaces.
	FeatureLabelSubNsSuffix = "." + FeatureLabelNs

	// ProfileLabelNs is the namespace for profile labels.
	ProfileLabelNs = "profile.node.kubernetes.io"

	// ProfileLabelSubNsSuffix is the suffix for allowed profile label sub-namespaces.
	ProfileLabelSubNsSuffix = "." + ProfileLabelNs

	// TaintNs is the k8s.io namespace that can be used for NFD-managed taints.
	TaintNs = "feature.node.kubernetes.io"

	// TaintSubNsSuffix is the suffix for allowed sub-namespaces for NFD-managed taints.
	TaintSubNsSuffix = "." + TaintNs

	// AnnotationNs namespace for all NFD-related annotations.
	AnnotationNs = "nfd.node.kubernetes.io"

	// ExtendedResourceNs is the namespace for extended resources.
	ExtendedResourceNs = "feature.node.kubernetes.io"

	// ExtendedResourceSubNsSuffix is the suffix for allowed extended resources sub-namespaces.
	ExtendedResourceSubNsSuffix = "." + ExtendedResourceNs

	// ExtendedResourceAnnotation is the annotation that holds all extended resources managed by NFD.
	ExtendedResourceAnnotation = AnnotationNs + "/extended-resources"

	// FeatureLabelsAnnotation is the annotation that holds all feature labels managed by NFD.
	FeatureLabelsAnnotation = AnnotationNs + "/feature-labels"

	// MasterVersionAnnotation is the annotation that holds the version of nfd-master running on the node
	// DEPRECATED: will not be used in NFD v0.15 or later.
	MasterVersionAnnotation = AnnotationNs + "/master.version"

	// WorkerVersionAnnotation is the annotation that holds the version of nfd-worker running on the node
	WorkerVersionAnnotation = AnnotationNs + "/worker.version"

	// NodeTaintsAnnotation is the annotation that holds the taints that nfd-master set on the node
	NodeTaintsAnnotation = AnnotationNs + "/taints"

	// FeatureAnnotationsTrackingAnnotation is the annotation that holds all feature annotations that nfd-master set on the node
	FeatureAnnotationsTrackingAnnotation = AnnotationNs + "/feature-annotations"

	// NodeFeatureObjNodeNameLabel is the label that specifies which node the
	// NodeFeature object is targeting. Creators of NodeFeature objects must
	// set this label and consumers of the objects are supposed to use the
	// label for filtering features designated for a certain node.
	NodeFeatureObjNodeNameLabel = "nfd.node.kubernetes.io/node-name"

	// FeatureAnnotationNs is the (default) namespace for feature annotations.
	FeatureAnnotationNs = "feature.node.kubernetes.io"

	// FeatureAnnotationSubNsSuffix is the suffix for allowed feature annotation sub-namespaces.
	FeatureAnnotationSubNsSuffix = "." + FeatureAnnotationNs

	// FeatureAnnotationValueSizeLimit is the maximum allowed length for the value of a feature annotation.
	FeatureAnnotationValueSizeLimit = 1 << 10
)
View Source
const (
	// RuleBackrefDomain is the special feature domain for backreferencing
	// output of preceding rules.
	RuleBackrefDomain = "rule"
	// RuleBackrefFeature is the special feature name for backreferencing
	// output of preceding rules.
	RuleBackrefFeature = "matched"
)
View Source
const MatchAllNames = "*"

MatchAllNames is a special key in MatchExpressionSet to use field names (keys from the input) instead of values when matching.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "nfd.k8s-sigs.io", Version: "v1alpha1"}

	// SchemeBuilder is the scheme builder for this API.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme is a function to register this API group and version to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource name and returns a Group qualified GroupResource.

Types

type AttributeFeatureSet

type AttributeFeatureSet struct {
	// Individual features of the feature set.
	Elements map[string]string `json:"elements"`
}

AttributeFeatureSet is a set of features having string value.

func NewAttributeFeatures

func NewAttributeFeatures(values map[string]string) AttributeFeatureSet

NewAttributeFeatures creates a new instance of ValueFeatureSet.

func (*AttributeFeatureSet) DeepCopy

func (in *AttributeFeatureSet) DeepCopy() *AttributeFeatureSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttributeFeatureSet.

func (*AttributeFeatureSet) DeepCopyInto

func (in *AttributeFeatureSet) DeepCopyInto(out *AttributeFeatureSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AttributeFeatureSet) MergeInto

func (in *AttributeFeatureSet) MergeInto(out *AttributeFeatureSet)

MergeInto merges two sets of attribute featues.

type FeatureGroupNode

type FeatureGroupNode struct {
	// Name of the node.
	Name string `json:"name"`
}

func (*FeatureGroupNode) DeepCopy

func (in *FeatureGroupNode) DeepCopy() *FeatureGroupNode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGroupNode.

func (*FeatureGroupNode) DeepCopyInto

func (in *FeatureGroupNode) DeepCopyInto(out *FeatureGroupNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeatureMatcher

type FeatureMatcher []FeatureMatcherTerm

FeatureMatcher specifies a set of feature matcher terms (i.e. per-feature matchers), all of which must match.

func (FeatureMatcher) DeepCopy

func (in FeatureMatcher) DeepCopy() FeatureMatcher

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureMatcher.

func (FeatureMatcher) DeepCopyInto

func (in FeatureMatcher) DeepCopyInto(out *FeatureMatcher)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeatureMatcherTerm

type FeatureMatcherTerm struct {
	// Feature is the name of the feature set to match against.
	Feature string `json:"feature"`
	// MatchExpressions is the set of per-element expressions evaluated. These
	// match against the value of the specified elements.
	// +optional
	MatchExpressions *MatchExpressionSet `json:"matchExpressions"`
	// MatchName in an expression that is matched against the name of each
	// element in the feature set.
	// +optional
	MatchName *MatchExpression `json:"matchName"`
}

FeatureMatcherTerm defines requirements against one feature set. All requirements (specified as MatchExpressions) are evaluated against each element in the feature set.

func (*FeatureMatcherTerm) DeepCopy

func (in *FeatureMatcherTerm) DeepCopy() *FeatureMatcherTerm

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureMatcherTerm.

func (*FeatureMatcherTerm) DeepCopyInto

func (in *FeatureMatcherTerm) DeepCopyInto(out *FeatureMatcherTerm)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Features

type Features struct {
	// Flags contains all the flag-type features of the node.
	// +optional
	Flags map[string]FlagFeatureSet `json:"flags"`
	// Attributes contains all the attribute-type features of the node.
	// +optional
	Attributes map[string]AttributeFeatureSet `json:"attributes"`
	// Instances contains all the instance-type features of the node.
	// +optional
	Instances map[string]InstanceFeatureSet `json:"instances"`
}

Features is the collection of all discovered features.

func NewFeatures

func NewFeatures() *Features

NewFeatures creates a new instance of Features, initializing all feature types (flags, attributes and instances) to empty values.

func (*Features) DeepCopy

func (in *Features) DeepCopy() *Features

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Features.

func (*Features) DeepCopyInto

func (in *Features) DeepCopyInto(out *Features)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Features) InsertAttributeFeatures

func (f *Features) InsertAttributeFeatures(domain, feature string, values map[string]string)

InsertAttributeFeatures inserts new values into a specific feature.

func (*Features) MergeInto

func (in *Features) MergeInto(out *Features)

MergeInto merges two sets of features into one. Features from the input set take precedence (overwrite) features from the existing features of the set we're merging into.

type FlagFeatureSet

type FlagFeatureSet struct {
	// Individual features of the feature set.
	Elements map[string]Nil `json:"elements"`
}

FlagFeatureSet is a set of simple features only containing names without values.

func NewFlagFeatures

func NewFlagFeatures(keys ...string) FlagFeatureSet

NewFlagFeatures creates a new instance of KeyFeatureSet.

func (*FlagFeatureSet) DeepCopy

func (in *FlagFeatureSet) DeepCopy() *FlagFeatureSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlagFeatureSet.

func (*FlagFeatureSet) DeepCopyInto

func (in *FlagFeatureSet) DeepCopyInto(out *FlagFeatureSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FlagFeatureSet) MergeInto

func (in *FlagFeatureSet) MergeInto(out *FlagFeatureSet)

MergeInto merges two sets of flag featues.

type GroupRule

type GroupRule struct {
	// Name of the rule.
	Name string `json:"name"`

	// MatchFeatures specifies a set of matcher terms all of which must match.
	// +optional
	MatchFeatures FeatureMatcher `json:"matchFeatures"`

	// MatchAny specifies a list of matchers one of which must match.
	// +optional
	MatchAny []MatchAnyElem `json:"matchAny"`
}

GroupRule defines a rule for nodegroup filtering.

func (*GroupRule) DeepCopy

func (in *GroupRule) DeepCopy() *GroupRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupRule.

func (*GroupRule) DeepCopyInto

func (in *GroupRule) DeepCopyInto(out *GroupRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InstanceFeature

type InstanceFeature struct {
	// Attributes of the instance feature.
	Attributes map[string]string `json:"attributes"`
}

InstanceFeature represents one instance of a complex features, e.g. a device.

func NewInstanceFeature

func NewInstanceFeature(attrs map[string]string) *InstanceFeature

NewInstanceFeature creates a new InstanceFeature instance.

func (*InstanceFeature) DeepCopy

func (in *InstanceFeature) DeepCopy() *InstanceFeature

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceFeature.

func (*InstanceFeature) DeepCopyInto

func (in *InstanceFeature) DeepCopyInto(out *InstanceFeature)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InstanceFeatureSet

type InstanceFeatureSet struct {
	// Individual features of the feature set.
	Elements []InstanceFeature `json:"elements"`
}

InstanceFeatureSet is a set of features each of which is an instance having multiple attributes.

func NewInstanceFeatures

func NewInstanceFeatures(instances ...InstanceFeature) InstanceFeatureSet

NewInstanceFeatures creates a new instance of InstanceFeatureSet.

func (*InstanceFeatureSet) DeepCopy

func (in *InstanceFeatureSet) DeepCopy() *InstanceFeatureSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceFeatureSet.

func (*InstanceFeatureSet) DeepCopyInto

func (in *InstanceFeatureSet) DeepCopyInto(out *InstanceFeatureSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InstanceFeatureSet) MergeInto

func (in *InstanceFeatureSet) MergeInto(out *InstanceFeatureSet)

MergeInto merges two sets of instance featues.

type MatchAnyElem

type MatchAnyElem struct {
	// MatchFeatures specifies a set of matcher terms all of which must match.
	MatchFeatures FeatureMatcher `json:"matchFeatures"`
}

MatchAnyElem specifies one sub-matcher of MatchAny.

func (*MatchAnyElem) DeepCopy

func (in *MatchAnyElem) DeepCopy() *MatchAnyElem

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchAnyElem.

func (*MatchAnyElem) DeepCopyInto

func (in *MatchAnyElem) DeepCopyInto(out *MatchAnyElem)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MatchExpression

type MatchExpression struct {
	// Op is the operator to be applied.
	Op MatchOp `json:"op"`

	// 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.
	// +optional
	Value MatchValue `json:"value,omitempty"`
}

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.

func (*MatchExpression) DeepCopy

func (in *MatchExpression) DeepCopy() *MatchExpression

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchExpression.

func (*MatchExpression) DeepCopyInto

func (in *MatchExpression) DeepCopyInto(out *MatchExpression)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (MatchExpression) String added in v0.17.0

func (m MatchExpression) String() string

String represents the match expression as a string type.

type MatchExpressionSet

type MatchExpressionSet map[string]*MatchExpression

MatchExpressionSet contains a set of MatchExpressions, each of which is evaluated against a set of input values.

func (MatchExpressionSet) DeepCopy

func (in MatchExpressionSet) DeepCopy() MatchExpressionSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchExpressionSet.

func (MatchExpressionSet) DeepCopyInto

func (in MatchExpressionSet) DeepCopyInto(out *MatchExpressionSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MatchOp

type MatchOp string

MatchOp is the match operator that is applied on values when evaluating a MatchExpression. +kubebuilder:validation:Enum="In";"NotIn";"InRegexp";"Exists";"DoesNotExist";"Gt";"Lt";"GtLt";"IsTrue";"IsFalse"

const (
	// MatchAny returns always true.
	MatchAny MatchOp = ""
	// MatchIn returns true if any of the values stored in the expression is
	// equal to the input.
	MatchIn MatchOp = "In"
	// MatchNotIn returns true if none of the values in the expression are
	// equal to the input.
	MatchNotIn MatchOp = "NotIn"
	// MatchInRegexp treats values of the expression as regular expressions and
	// returns true if any of them matches the input.
	MatchInRegexp MatchOp = "InRegexp"
	// MatchExists returns true if the input is valid. The expression must not
	// have any values.
	MatchExists MatchOp = "Exists"
	// MatchDoesNotExist returns true if the input is not valid. The expression
	// must not have any values.
	MatchDoesNotExist MatchOp = "DoesNotExist"
	// 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.
	MatchGt MatchOp = "Gt"
	// 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.
	MatchLt MatchOp = "Lt"
	// 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.
	MatchGtLt MatchOp = "GtLt"
	// MatchIsTrue returns true if the input holds the value "true". The
	// expression must not have any values.
	MatchIsTrue MatchOp = "IsTrue"
	// MatchIsFalse returns true if the input holds the value "false". The
	// expression must not have any values.
	MatchIsFalse MatchOp = "IsFalse"
)

type MatchValue

type MatchValue []string

MatchValue is the list of values associated with a MatchExpression.

func (MatchValue) DeepCopy

func (in MatchValue) DeepCopy() MatchValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchValue.

func (MatchValue) DeepCopyInto

func (in MatchValue) DeepCopyInto(out *MatchValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Nil

type Nil struct{}

Nil is a dummy empty struct for protobuf compatibility. NOTE: protobuf definitions have been removed but this is kept for API compatibility.

func (*Nil) DeepCopy

func (in *Nil) DeepCopy() *Nil

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nil.

func (*Nil) DeepCopyInto

func (in *Nil) DeepCopyInto(out *Nil)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeFeature

type NodeFeature struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the NodeFeature, containing features discovered for a node.
	Spec NodeFeatureSpec `json:"spec"`
}

NodeFeature resource holds the features discovered for one node in the cluster. +kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NodeFeature) DeepCopy

func (in *NodeFeature) DeepCopy() *NodeFeature

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeature.

func (*NodeFeature) DeepCopyInto

func (in *NodeFeature) DeepCopyInto(out *NodeFeature)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeature) DeepCopyObject

func (in *NodeFeature) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeFeatureGroup

type NodeFeatureGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the rules to be evaluated.
	Spec NodeFeatureGroupSpec `json:"spec"`

	// Status of the NodeFeatureGroup after the most recent evaluation of the
	// specification.
	Status NodeFeatureGroupStatus `json:"status,omitempty"`
}

NodeFeatureGroup resource holds Node pools by featureGroup +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=nfg +kubebuilder:subresource:status +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient

func (*NodeFeatureGroup) DeepCopy

func (in *NodeFeatureGroup) DeepCopy() *NodeFeatureGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureGroup.

func (*NodeFeatureGroup) DeepCopyInto

func (in *NodeFeatureGroup) DeepCopyInto(out *NodeFeatureGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeatureGroup) DeepCopyObject

func (in *NodeFeatureGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeFeatureGroupList

type NodeFeatureGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	// List of NodeFeatureGroups.
	Items []NodeFeatureGroup `json:"items"`
}

NodeFeatureGroupList contains a list of NodeFeatureGroup objects. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NodeFeatureGroupList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureGroupList.

func (*NodeFeatureGroupList) DeepCopyInto

func (in *NodeFeatureGroupList) DeepCopyInto(out *NodeFeatureGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeatureGroupList) DeepCopyObject

func (in *NodeFeatureGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeFeatureGroupSpec

type NodeFeatureGroupSpec struct {
	// List of rules to evaluate to determine nodes that belong in this group.
	Rules []GroupRule `json:"featureGroupRules"`
}

NodeFeatureGroupSpec describes a NodeFeatureGroup object.

func (*NodeFeatureGroupSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureGroupSpec.

func (*NodeFeatureGroupSpec) DeepCopyInto

func (in *NodeFeatureGroupSpec) DeepCopyInto(out *NodeFeatureGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeFeatureGroupStatus

type NodeFeatureGroupStatus struct {
	// Nodes is a list of FeatureGroupNode in the cluster that match the featureGroupRules
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=name
	Nodes []FeatureGroupNode `json:"nodes"`
}

func (*NodeFeatureGroupStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureGroupStatus.

func (*NodeFeatureGroupStatus) DeepCopyInto

func (in *NodeFeatureGroupStatus) DeepCopyInto(out *NodeFeatureGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeFeatureList

type NodeFeatureList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	// List of NodeFeatures.
	Items []NodeFeature `json:"items"`
}

NodeFeatureList contains a list of NodeFeature objects. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NodeFeatureList) DeepCopy

func (in *NodeFeatureList) DeepCopy() *NodeFeatureList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureList.

func (*NodeFeatureList) DeepCopyInto

func (in *NodeFeatureList) DeepCopyInto(out *NodeFeatureList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeatureList) DeepCopyObject

func (in *NodeFeatureList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeFeatureRule

type NodeFeatureRule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the rules to be evaluated.
	Spec NodeFeatureRuleSpec `json:"spec"`
}

NodeFeatureRule resource specifies a configuration for feature-based customization of node objects, such as node labeling. +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName=nfr +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient +genclient:nonNamespaced

func (*NodeFeatureRule) DeepCopy

func (in *NodeFeatureRule) DeepCopy() *NodeFeatureRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureRule.

func (*NodeFeatureRule) DeepCopyInto

func (in *NodeFeatureRule) DeepCopyInto(out *NodeFeatureRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeatureRule) DeepCopyObject

func (in *NodeFeatureRule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeFeatureRuleList

type NodeFeatureRuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	// List of NodeFeatureRules.
	Items []NodeFeatureRule `json:"items"`
}

NodeFeatureRuleList contains a list of NodeFeatureRule objects. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NodeFeatureRuleList) DeepCopy

func (in *NodeFeatureRuleList) DeepCopy() *NodeFeatureRuleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureRuleList.

func (*NodeFeatureRuleList) DeepCopyInto

func (in *NodeFeatureRuleList) DeepCopyInto(out *NodeFeatureRuleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeatureRuleList) DeepCopyObject

func (in *NodeFeatureRuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeFeatureRuleSpec

type NodeFeatureRuleSpec struct {
	// Rules is a list of node customization rules.
	Rules []Rule `json:"rules"`
}

NodeFeatureRuleSpec describes a NodeFeatureRule.

func (*NodeFeatureRuleSpec) DeepCopy

func (in *NodeFeatureRuleSpec) DeepCopy() *NodeFeatureRuleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureRuleSpec.

func (*NodeFeatureRuleSpec) DeepCopyInto

func (in *NodeFeatureRuleSpec) DeepCopyInto(out *NodeFeatureRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeFeatureSpec

type NodeFeatureSpec struct {
	// Features is the full "raw" features data that has been discovered.
	// +optional
	Features Features `json:"features"`
	// Labels is the set of node labels that are requested to be created.
	// +optional
	Labels map[string]string `json:"labels"`
}

NodeFeatureSpec describes a NodeFeature object.

func NewNodeFeatureSpec

func NewNodeFeatureSpec() *NodeFeatureSpec

NewNodeFeatureSpec creates a new emprty instance of NodeFeatureSpec type, initializing all fields to proper empty values.

func (*NodeFeatureSpec) DeepCopy

func (in *NodeFeatureSpec) DeepCopy() *NodeFeatureSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeFeatureSpec.

func (*NodeFeatureSpec) DeepCopyInto

func (in *NodeFeatureSpec) DeepCopyInto(out *NodeFeatureSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeFeatureSpec) MergeInto

func (in *NodeFeatureSpec) MergeInto(out *NodeFeatureSpec)

MergeInto merges two FeatureSpecs into one. Data in the input object takes precedence (overwrite) over data of the existing object we're merging into.

type Rule

type Rule struct {
	// Name of the rule.
	Name string `json:"name"`

	// Labels to create if the rule matches.
	// +optional
	Labels map[string]string `json:"labels"`

	// LabelsTemplate specifies a template to expand for dynamically generating
	// multiple labels. Data (after template expansion) must be keys with an
	// optional value (<key>[=<value>]) separated by newlines.
	// +optional
	LabelsTemplate string `json:"labelsTemplate"`

	// Annotations to create if the rule matches.
	// +optional
	Annotations map[string]string `json:"annotations"`

	// 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.
	// +optional
	Vars map[string]string `json:"vars"`

	// VarsTemplate specifies a template to expand for dynamically generating
	// multiple variables. Data (after template expansion) must be keys with an
	// optional value (<key>[=<value>]) separated by newlines.
	// +optional
	VarsTemplate string `json:"varsTemplate"`

	// Taints to create if the rule matches.
	// +optional
	Taints []corev1.Taint `json:"taints,omitempty"`

	// ExtendedResources to create if the rule matches.
	// +optional
	ExtendedResources map[string]string `json:"extendedResources"`

	// MatchFeatures specifies a set of matcher terms all of which must match.
	// +optional
	MatchFeatures FeatureMatcher `json:"matchFeatures"`

	// MatchAny specifies a list of matchers one of which must match.
	// +optional
	MatchAny []MatchAnyElem `json:"matchAny"`
}

Rule defines a rule for node customization such as labeling.

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.

func (*Rule) DeepCopyInto

func (in *Rule) DeepCopyInto(out *Rule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL