v1alpha1

package
v0.0.0-...-c93914d Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

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

Package v1alpha1 contains API Schema definitions for the nfd.openshift.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=nfd.openshift.io

Index

Constants

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 (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "nfd.openshift.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

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

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 NodeFeatureRule

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

	Spec   NodeFeatureRuleSpec   `json:"spec,omitempty"`
	Status NodeFeatureRuleStatus `json:"status,omitempty"`
}

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

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,omitempty"`
	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 defines the desired state of 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 NodeFeatureRuleStatus

type NodeFeatureRuleStatus struct {
}

NodeFeatureRuleStatus defines the observed state of NodeFeatureRule

func (*NodeFeatureRuleStatus) DeepCopy

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

func (*NodeFeatureRuleStatus) DeepCopyInto

func (in *NodeFeatureRuleStatus) DeepCopyInto(out *NodeFeatureRuleStatus)

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

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