1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Update auto-generated code

This commit is contained in:
Markus Lehtonen 2024-03-11 12:16:45 +02:00
parent 163f4f0e7b
commit a562a6188a
34 changed files with 281 additions and 226 deletions

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.12.1 controller-gen.kubebuilder.io/version: v0.14.0
name: nodefeatures.nfd.k8s-sigs.io name: nodefeatures.nfd.k8s-sigs.io
spec: spec:
group: nfd.k8s-sigs.io group: nfd.k8s-sigs.io
@ -17,18 +17,24 @@ spec:
- name: v1alpha1 - name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
description: NodeFeature resource holds the features discovered for one node description: |-
in the cluster. NodeFeature resource holds the features discovered for one node in the
cluster.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -113,7 +119,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.12.1 controller-gen.kubebuilder.io/version: v0.14.0
name: nodefeaturerules.nfd.k8s-sigs.io name: nodefeaturerules.nfd.k8s-sigs.io
spec: spec:
group: nfd.k8s-sigs.io group: nfd.k8s-sigs.io
@ -129,18 +135,24 @@ spec:
- name: v1alpha1 - name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
description: NodeFeatureRule resource specifies a configuration for feature-based description: |-
NodeFeatureRule resource specifies a configuration for feature-based
customization of node objects, such as node labeling. customization of node objects, such as node labeling.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -169,10 +181,10 @@ spec:
description: Labels to create if the rule matches. description: Labels to create if the rule matches.
type: object type: object
labelsTemplate: labelsTemplate:
description: LabelsTemplate specifies a template to expand for description: |-
dynamically generating multiple labels. Data (after template LabelsTemplate specifies a template to expand for dynamically generating
expansion) must be keys with an optional value (<key>[=<value>]) multiple labels. Data (after template expansion) must be keys with an
separated by newlines. optional value (<key>[=<value>]) separated by newlines.
type: string type: string
matchAny: matchAny:
description: MatchAny specifies a list of matchers one of which description: MatchAny specifies a list of matchers one of which
@ -184,10 +196,10 @@ spec:
description: MatchFeatures specifies a set of matcher description: MatchFeatures specifies a set of matcher
terms all of which must match. terms all of which must match.
items: items:
description: FeatureMatcherTerm defines requirements description: |-
against one feature set. All requirements (specified FeatureMatcherTerm defines requirements against one feature set. All
as MatchExpressions) are evaluated against each element requirements (specified as MatchExpressions) are evaluated against each
in the feature set. element in the feature set.
properties: properties:
feature: feature:
description: Feature is the name of the feature description: Feature is the name of the feature
@ -195,11 +207,10 @@ spec:
type: string type: string
matchExpressions: matchExpressions:
additionalProperties: additionalProperties:
description: MatchExpression specifies an expression description: |-
to evaluate against a set of input values. It MatchExpression specifies an expression to evaluate against a set of input
contains an operator that is applied when matching values. It contains an operator that is applied when matching the input and
the input and an array of values that the operator an array of values that the operator evaluates the input against.
evaluates the input against.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -216,29 +227,26 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that description: |-
the operand evaluates the input against. Value is the list of values that the operand evaluates the input
Value should be empty if the operator is against. Value should be empty if the operator is Exists, DoesNotExist,
Exists, DoesNotExist, IsTrue or IsFalse. IsTrue or IsFalse. Value should contain exactly one element if the
Value should contain exactly one element operator is Gt or Lt and exactly two elements if the operator is GtLt.
if the operator is Gt or Lt and exactly In other cases Value should contain at least one element.
two elements if the operator is GtLt. In
other cases Value should contain at least
one element.
items: items:
type: string type: string
type: array type: array
required: required:
- op - op
type: object type: object
description: MatchExpressions is the set of per-element description: |-
expressions evaluated. These match against the MatchExpressions is the set of per-element expressions evaluated. These
value of the specified elements. match against the value of the specified elements.
type: object type: object
matchName: matchName:
description: MatchName in an expression that is description: |-
matched against the name of each element in the MatchName in an expression that is matched against the name of each
feature set. element in the feature set.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -255,14 +263,12 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that description: |-
the operand evaluates the input against. Value Value is the list of values that the operand evaluates the input
should be empty if the operator is Exists, against. Value should be empty if the operator is Exists, DoesNotExist,
DoesNotExist, IsTrue or IsFalse. Value should IsTrue or IsFalse. Value should contain exactly one element if the
contain exactly one element if the operator operator is Gt or Lt and exactly two elements if the operator is GtLt.
is Gt or Lt and exactly two elements if the In other cases Value should contain at least one element.
operator is GtLt. In other cases Value should
contain at least one element.
items: items:
type: string type: string
type: array type: array
@ -281,9 +287,10 @@ spec:
description: MatchFeatures specifies a set of matcher terms description: MatchFeatures specifies a set of matcher terms
all of which must match. all of which must match.
items: items:
description: FeatureMatcherTerm defines requirements against description: |-
one feature set. All requirements (specified as MatchExpressions) FeatureMatcherTerm defines requirements against one feature set. All
are evaluated against each element in the feature set. requirements (specified as MatchExpressions) are evaluated against each
element in the feature set.
properties: properties:
feature: feature:
description: Feature is the name of the feature set to description: Feature is the name of the feature set to
@ -291,11 +298,10 @@ spec:
type: string type: string
matchExpressions: matchExpressions:
additionalProperties: additionalProperties:
description: MatchExpression specifies an expression description: |-
to evaluate against a set of input values. It contains MatchExpression specifies an expression to evaluate against a set of input
an operator that is applied when matching the input values. It contains an operator that is applied when matching the input and
and an array of values that the operator evaluates an array of values that the operator evaluates the input against.
the input against.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -312,26 +318,26 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that the description: |-
operand evaluates the input against. Value should Value is the list of values that the operand evaluates the input
be empty if the operator is Exists, DoesNotExist, against. Value should be empty if the operator is Exists, DoesNotExist,
IsTrue or IsFalse. Value should contain exactly IsTrue or IsFalse. Value should contain exactly one element if the
one element if the operator is Gt or Lt and exactly operator is Gt or Lt and exactly two elements if the operator is GtLt.
two elements if the operator is GtLt. In other In other cases Value should contain at least one element.
cases Value should contain at least one element.
items: items:
type: string type: string
type: array type: array
required: required:
- op - op
type: object type: object
description: MatchExpressions is the set of per-element description: |-
expressions evaluated. These match against the value MatchExpressions is the set of per-element expressions evaluated. These
of the specified elements. match against the value of the specified elements.
type: object type: object
matchName: matchName:
description: MatchName in an expression that is matched description: |-
against the name of each element in the feature set. MatchName in an expression that is matched against the name of each
element in the feature set.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -348,13 +354,12 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that the description: |-
operand evaluates the input against. Value should Value is the list of values that the operand evaluates the input
be empty if the operator is Exists, DoesNotExist, against. Value should be empty if the operator is Exists, DoesNotExist,
IsTrue or IsFalse. Value should contain exactly IsTrue or IsFalse. Value should contain exactly one element if the
one element if the operator is Gt or Lt and exactly operator is Gt or Lt and exactly two elements if the operator is GtLt.
two elements if the operator is GtLt. In other cases In other cases Value should contain at least one element.
Value should contain at least one element.
items: items:
type: string type: string
type: array type: array
@ -371,21 +376,24 @@ spec:
taints: taints:
description: Taints to create if the rule matches. description: Taints to create if the rule matches.
items: items:
description: The node this Taint is attached to has the "effect" description: |-
on any pod that does not tolerate the Taint. The node this Taint is attached to has the "effect" on
any pod that does not tolerate the Taint.
properties: properties:
effect: effect:
description: Required. The effect of the taint on pods description: |-
that do not tolerate the taint. Valid effects are NoSchedule, Required. The effect of the taint on pods
PreferNoSchedule and NoExecute. that do not tolerate the taint.
Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
type: string type: string
key: key:
description: Required. The taint key to be applied to description: Required. The taint key to be applied to
a node. a node.
type: string type: string
timeAdded: timeAdded:
description: TimeAdded represents the time at which the description: |-
taint was added. It is only written for NoExecute taints. TimeAdded represents the time at which the taint was added.
It is only written for NoExecute taints.
format: date-time format: date-time
type: string type: string
value: value:
@ -400,17 +408,17 @@ spec:
vars: vars:
additionalProperties: additionalProperties:
type: string type: string
description: Vars is the variables to store if the rule matches. description: |-
Variables do not directly inflict any changes in the node Vars is the variables to store if the rule matches. Variables do not
object. However, they can be referenced from other rules enabling directly inflict any changes in the node object. However, they can be
more complex rule hierarchies, without exposing intermediary referenced from other rules enabling more complex rule hierarchies,
output values as labels. without exposing intermediary output values as labels.
type: object type: object
varsTemplate: varsTemplate:
description: VarsTemplate specifies a template to expand for description: |-
dynamically generating multiple variables. Data (after template VarsTemplate specifies a template to expand for dynamically generating
expansion) must be keys with an optional value (<key>[=<value>]) multiple variables. Data (after template expansion) must be keys with an
separated by newlines. optional value (<key>[=<value>]) separated by newlines.
type: string type: string
required: required:
- name - name

View file

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.12.1 controller-gen.kubebuilder.io/version: v0.14.0
name: nodefeatures.nfd.k8s-sigs.io name: nodefeatures.nfd.k8s-sigs.io
spec: spec:
group: nfd.k8s-sigs.io group: nfd.k8s-sigs.io
@ -17,18 +17,24 @@ spec:
- name: v1alpha1 - name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
description: NodeFeature resource holds the features discovered for one node description: |-
in the cluster. NodeFeature resource holds the features discovered for one node in the
cluster.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -113,7 +119,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.12.1 controller-gen.kubebuilder.io/version: v0.14.0
name: nodefeaturerules.nfd.k8s-sigs.io name: nodefeaturerules.nfd.k8s-sigs.io
spec: spec:
group: nfd.k8s-sigs.io group: nfd.k8s-sigs.io
@ -129,18 +135,24 @@ spec:
- name: v1alpha1 - name: v1alpha1
schema: schema:
openAPIV3Schema: openAPIV3Schema:
description: NodeFeatureRule resource specifies a configuration for feature-based description: |-
NodeFeatureRule resource specifies a configuration for feature-based
customization of node objects, such as node labeling. customization of node objects, such as node labeling.
properties: properties:
apiVersion: apiVersion:
description: 'APIVersion defines the versioned schema of this representation description: |-
of an object. Servers should convert recognized schemas to the latest APIVersion defines the versioned schema of this representation of an object.
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string type: string
kind: kind:
description: 'Kind is a string value representing the REST resource this description: |-
object represents. Servers may infer this from the endpoint the client Kind is a string value representing the REST resource this object represents.
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string type: string
metadata: metadata:
type: object type: object
@ -169,10 +181,10 @@ spec:
description: Labels to create if the rule matches. description: Labels to create if the rule matches.
type: object type: object
labelsTemplate: labelsTemplate:
description: LabelsTemplate specifies a template to expand for description: |-
dynamically generating multiple labels. Data (after template LabelsTemplate specifies a template to expand for dynamically generating
expansion) must be keys with an optional value (<key>[=<value>]) multiple labels. Data (after template expansion) must be keys with an
separated by newlines. optional value (<key>[=<value>]) separated by newlines.
type: string type: string
matchAny: matchAny:
description: MatchAny specifies a list of matchers one of which description: MatchAny specifies a list of matchers one of which
@ -184,10 +196,10 @@ spec:
description: MatchFeatures specifies a set of matcher description: MatchFeatures specifies a set of matcher
terms all of which must match. terms all of which must match.
items: items:
description: FeatureMatcherTerm defines requirements description: |-
against one feature set. All requirements (specified FeatureMatcherTerm defines requirements against one feature set. All
as MatchExpressions) are evaluated against each element requirements (specified as MatchExpressions) are evaluated against each
in the feature set. element in the feature set.
properties: properties:
feature: feature:
description: Feature is the name of the feature description: Feature is the name of the feature
@ -195,11 +207,10 @@ spec:
type: string type: string
matchExpressions: matchExpressions:
additionalProperties: additionalProperties:
description: MatchExpression specifies an expression description: |-
to evaluate against a set of input values. It MatchExpression specifies an expression to evaluate against a set of input
contains an operator that is applied when matching values. It contains an operator that is applied when matching the input and
the input and an array of values that the operator an array of values that the operator evaluates the input against.
evaluates the input against.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -216,29 +227,26 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that description: |-
the operand evaluates the input against. Value is the list of values that the operand evaluates the input
Value should be empty if the operator is against. Value should be empty if the operator is Exists, DoesNotExist,
Exists, DoesNotExist, IsTrue or IsFalse. IsTrue or IsFalse. Value should contain exactly one element if the
Value should contain exactly one element operator is Gt or Lt and exactly two elements if the operator is GtLt.
if the operator is Gt or Lt and exactly In other cases Value should contain at least one element.
two elements if the operator is GtLt. In
other cases Value should contain at least
one element.
items: items:
type: string type: string
type: array type: array
required: required:
- op - op
type: object type: object
description: MatchExpressions is the set of per-element description: |-
expressions evaluated. These match against the MatchExpressions is the set of per-element expressions evaluated. These
value of the specified elements. match against the value of the specified elements.
type: object type: object
matchName: matchName:
description: MatchName in an expression that is description: |-
matched against the name of each element in the MatchName in an expression that is matched against the name of each
feature set. element in the feature set.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -255,14 +263,12 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that description: |-
the operand evaluates the input against. Value Value is the list of values that the operand evaluates the input
should be empty if the operator is Exists, against. Value should be empty if the operator is Exists, DoesNotExist,
DoesNotExist, IsTrue or IsFalse. Value should IsTrue or IsFalse. Value should contain exactly one element if the
contain exactly one element if the operator operator is Gt or Lt and exactly two elements if the operator is GtLt.
is Gt or Lt and exactly two elements if the In other cases Value should contain at least one element.
operator is GtLt. In other cases Value should
contain at least one element.
items: items:
type: string type: string
type: array type: array
@ -281,9 +287,10 @@ spec:
description: MatchFeatures specifies a set of matcher terms description: MatchFeatures specifies a set of matcher terms
all of which must match. all of which must match.
items: items:
description: FeatureMatcherTerm defines requirements against description: |-
one feature set. All requirements (specified as MatchExpressions) FeatureMatcherTerm defines requirements against one feature set. All
are evaluated against each element in the feature set. requirements (specified as MatchExpressions) are evaluated against each
element in the feature set.
properties: properties:
feature: feature:
description: Feature is the name of the feature set to description: Feature is the name of the feature set to
@ -291,11 +298,10 @@ spec:
type: string type: string
matchExpressions: matchExpressions:
additionalProperties: additionalProperties:
description: MatchExpression specifies an expression description: |-
to evaluate against a set of input values. It contains MatchExpression specifies an expression to evaluate against a set of input
an operator that is applied when matching the input values. It contains an operator that is applied when matching the input and
and an array of values that the operator evaluates an array of values that the operator evaluates the input against.
the input against.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -312,26 +318,26 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that the description: |-
operand evaluates the input against. Value should Value is the list of values that the operand evaluates the input
be empty if the operator is Exists, DoesNotExist, against. Value should be empty if the operator is Exists, DoesNotExist,
IsTrue or IsFalse. Value should contain exactly IsTrue or IsFalse. Value should contain exactly one element if the
one element if the operator is Gt or Lt and exactly operator is Gt or Lt and exactly two elements if the operator is GtLt.
two elements if the operator is GtLt. In other In other cases Value should contain at least one element.
cases Value should contain at least one element.
items: items:
type: string type: string
type: array type: array
required: required:
- op - op
type: object type: object
description: MatchExpressions is the set of per-element description: |-
expressions evaluated. These match against the value MatchExpressions is the set of per-element expressions evaluated. These
of the specified elements. match against the value of the specified elements.
type: object type: object
matchName: matchName:
description: MatchName in an expression that is matched description: |-
against the name of each element in the feature set. MatchName in an expression that is matched against the name of each
element in the feature set.
properties: properties:
op: op:
description: Op is the operator to be applied. description: Op is the operator to be applied.
@ -348,13 +354,12 @@ spec:
- IsFalse - IsFalse
type: string type: string
value: value:
description: Value is the list of values that the description: |-
operand evaluates the input against. Value should Value is the list of values that the operand evaluates the input
be empty if the operator is Exists, DoesNotExist, against. Value should be empty if the operator is Exists, DoesNotExist,
IsTrue or IsFalse. Value should contain exactly IsTrue or IsFalse. Value should contain exactly one element if the
one element if the operator is Gt or Lt and exactly operator is Gt or Lt and exactly two elements if the operator is GtLt.
two elements if the operator is GtLt. In other cases In other cases Value should contain at least one element.
Value should contain at least one element.
items: items:
type: string type: string
type: array type: array
@ -371,21 +376,24 @@ spec:
taints: taints:
description: Taints to create if the rule matches. description: Taints to create if the rule matches.
items: items:
description: The node this Taint is attached to has the "effect" description: |-
on any pod that does not tolerate the Taint. The node this Taint is attached to has the "effect" on
any pod that does not tolerate the Taint.
properties: properties:
effect: effect:
description: Required. The effect of the taint on pods description: |-
that do not tolerate the taint. Valid effects are NoSchedule, Required. The effect of the taint on pods
PreferNoSchedule and NoExecute. that do not tolerate the taint.
Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
type: string type: string
key: key:
description: Required. The taint key to be applied to description: Required. The taint key to be applied to
a node. a node.
type: string type: string
timeAdded: timeAdded:
description: TimeAdded represents the time at which the description: |-
taint was added. It is only written for NoExecute taints. TimeAdded represents the time at which the taint was added.
It is only written for NoExecute taints.
format: date-time format: date-time
type: string type: string
value: value:
@ -400,17 +408,17 @@ spec:
vars: vars:
additionalProperties: additionalProperties:
type: string type: string
description: Vars is the variables to store if the rule matches. description: |-
Variables do not directly inflict any changes in the node Vars is the variables to store if the rule matches. Variables do not
object. However, they can be referenced from other rules enabling directly inflict any changes in the node object. However, they can be
more complex rule hierarchies, without exposing intermediary referenced from other rules enabling more complex rule hierarchies,
output values as labels. without exposing intermediary output values as labels.
type: object type: object
varsTemplate: varsTemplate:
description: VarsTemplate specifies a template to expand for description: |-
dynamically generating multiple variables. Data (after template VarsTemplate specifies a template to expand for dynamically generating
expansion) must be keys with an optional value (<key>[=<value>]) multiple variables. Data (after template expansion) must be keys with an
separated by newlines. optional value (<key>[=<value>]) separated by newlines.
type: string type: string
required: required:
- name - name

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,4 @@
//go:build !ignore_autogenerated //go:build !ignore_autogenerated
// +build !ignore_autogenerated
// Code generated by controller-gen. DO NOT EDIT. // Code generated by controller-gen. DO NOT EDIT.
@ -67,7 +66,8 @@ func (in *FeatureMatcherTerm) DeepCopyInto(out *FeatureMatcherTerm) {
if val == nil { if val == nil {
(*out)[key] = nil (*out)[key] = nil
} else { } else {
in, out := &val, &outVal inVal := (*in)[key]
in, out := &inVal, &outVal
*out = new(MatchExpression) *out = new(MatchExpression)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }
@ -246,7 +246,8 @@ func (in MatchExpressionSet) DeepCopyInto(out *MatchExpressionSet) {
if val == nil { if val == nil {
(*out)[key] = nil (*out)[key] = nil
} else { } else {
in, out := &val, &outVal inVal := (*in)[key]
in, out := &inVal, &outVal
*out = new(MatchExpression) *out = new(MatchExpression)
(*in).DeepCopyInto(*out) (*in).DeepCopyInto(*out)
} }

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -42,6 +42,7 @@ type sharedInformerFactory struct {
lock sync.Mutex lock sync.Mutex
defaultResync time.Duration defaultResync time.Duration
customResync map[reflect.Type]time.Duration customResync map[reflect.Type]time.Duration
transform cache.TransformFunc
informers map[reflect.Type]cache.SharedIndexInformer informers map[reflect.Type]cache.SharedIndexInformer
// startedInformers is used for tracking which informers have been started. // startedInformers is used for tracking which informers have been started.
@ -80,6 +81,14 @@ func WithNamespace(namespace string) SharedInformerOption {
} }
} }
// WithTransform sets a transform on all informers.
func WithTransform(transform cache.TransformFunc) SharedInformerOption {
return func(factory *sharedInformerFactory) *sharedInformerFactory {
factory.transform = transform
return factory
}
}
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. // NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces.
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
return NewSharedInformerFactoryWithOptions(client, defaultResync) return NewSharedInformerFactoryWithOptions(client, defaultResync)
@ -184,6 +193,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal
} }
informer = newFunc(f.client, resyncPeriod) informer = newFunc(f.client, resyncPeriod)
informer.SetTransform(f.transform)
f.informers[informerType] = informer f.informers[informerType] = informer
return informer return informer

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
Copyright 2023 The Kubernetes Authors. Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -16,7 +16,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.23.0 // protoc-gen-go v1.23.0
// protoc v4.23.4 // protoc v4.25.3
// source: labeler.proto // source: labeler.proto
package labeler package labeler

View file

@ -1,4 +1,4 @@
// Code generated by mockery v2.32.0. DO NOT EDIT. // Code generated by mockery v2.42.0. DO NOT EDIT.
package labeler package labeler
@ -26,6 +26,10 @@ func (_m *MockLabelerClient) SetLabels(ctx context.Context, in *SetLabelsRequest
_ca = append(_ca, _va...) _ca = append(_ca, _va...)
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for SetLabels")
}
var r0 *SetLabelsReply var r0 *SetLabelsReply
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *SetLabelsRequest, ...grpc.CallOption) (*SetLabelsReply, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, *SetLabelsRequest, ...grpc.CallOption) (*SetLabelsReply, error)); ok {

View file

@ -1,4 +1,4 @@
// Code generated by mockery v2.32.0. DO NOT EDIT. // Code generated by mockery v2.42.0. DO NOT EDIT.
package mocks package mocks
@ -28,6 +28,10 @@ func (_m *PodResourcesListerClient) Get(ctx context.Context, in *v1.GetPodResour
_ca = append(_ca, _va...) _ca = append(_ca, _va...)
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *v1.GetPodResourcesResponse var r0 *v1.GetPodResourcesResponse
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *v1.GetPodResourcesRequest, ...grpc.CallOption) (*v1.GetPodResourcesResponse, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, *v1.GetPodResourcesRequest, ...grpc.CallOption) (*v1.GetPodResourcesResponse, error)); ok {
@ -61,6 +65,10 @@ func (_m *PodResourcesListerClient) GetAllocatableResources(ctx context.Context,
_ca = append(_ca, _va...) _ca = append(_ca, _va...)
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetAllocatableResources")
}
var r0 *v1.AllocatableResourcesResponse var r0 *v1.AllocatableResourcesResponse
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *v1.AllocatableResourcesRequest, ...grpc.CallOption) (*v1.AllocatableResourcesResponse, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, *v1.AllocatableResourcesRequest, ...grpc.CallOption) (*v1.AllocatableResourcesResponse, error)); ok {
@ -94,6 +102,10 @@ func (_m *PodResourcesListerClient) List(ctx context.Context, in *v1.ListPodReso
_ca = append(_ca, _va...) _ca = append(_ca, _va...)
ret := _m.Called(_ca...) ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 *v1.ListPodResourcesResponse var r0 *v1.ListPodResourcesResponse
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *v1.ListPodResourcesRequest, ...grpc.CallOption) (*v1.ListPodResourcesResponse, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, *v1.ListPodResourcesRequest, ...grpc.CallOption) (*v1.ListPodResourcesResponse, error)); ok {

View file

@ -1,4 +1,4 @@
// Code generated by mockery v2.32.0. DO NOT EDIT. // Code generated by mockery v2.42.0. DO NOT EDIT.
package source package source
@ -13,6 +13,10 @@ type MockLabelSource struct {
func (_m *MockLabelSource) GetLabels() (FeatureLabels, error) { func (_m *MockLabelSource) GetLabels() (FeatureLabels, error) {
ret := _m.Called() ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetLabels")
}
var r0 FeatureLabels var r0 FeatureLabels
var r1 error var r1 error
if rf, ok := ret.Get(0).(func() (FeatureLabels, error)); ok { if rf, ok := ret.Get(0).(func() (FeatureLabels, error)); ok {
@ -39,6 +43,10 @@ func (_m *MockLabelSource) GetLabels() (FeatureLabels, error) {
func (_m *MockLabelSource) Name() string { func (_m *MockLabelSource) Name() string {
ret := _m.Called() ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Name")
}
var r0 string var r0 string
if rf, ok := ret.Get(0).(func() string); ok { if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf() r0 = rf()
@ -53,6 +61,10 @@ func (_m *MockLabelSource) Name() string {
func (_m *MockLabelSource) Priority() int { func (_m *MockLabelSource) Priority() int {
ret := _m.Called() ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Priority")
}
var r0 int var r0 int
if rf, ok := ret.Get(0).(func() int); ok { if rf, ok := ret.Get(0).(func() int); ok {
r0 = rf() r0 = rf()