apik8s.io/api/resource/v1alpha3 Index | Files

package v1alpha3

import "k8s.io/api/resource/v1alpha3"

Package v1alpha3 is the v1alpha3 version of the resource API.

Index

Constants

const CELSelectorExpressionMaxCost = 1000000

CELSelectorExpressionMaxCost specifies the cost limit for a single CEL selector evaluation.

There is no overall budget for selecting a device, so the actual time required for that is proportional to the number of CEL selectors and how often they need to be evaluated, which can vary depending on several factors (number of devices, cluster utilization, additional constraints).

Validation against this limit and CELSelectorExpressionMaxLength happens only when setting an expression for the first time or when changing it. If the limits are changed in a future Kubernetes release, existing users are guaranteed that existing expressions will continue to be valid.

However, the kube-scheduler also applies this cost limit at runtime, so it could happen that a valid expression fails at runtime after an up- or downgrade. This can also happen without version skew when the cost estimate underestimated the actual cost. That this might happen is the reason why kube-scheduler enforces the runtime limit instead of relying on validation.

According to https://github.com/kubernetes/kubernetes/blob/4aeaf1e99e82da8334c0d6dddd848a194cd44b4f/staging/src/k8s.io/apiserver/pkg/apis/cel/config.go#L20-L22, this gives roughly 0.1 second for each expression evaluation. However, this depends on how fast the machine is.

const CELSelectorExpressionMaxLength = 10 * 1024

CELSelectorExpressionMaxLength is the maximum length of a CEL selector expression string.

const GroupName = "resource.k8s.io"

GroupName is the group name use in this package

Variables

var (
	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
var (
	// We only register manually written functions here. The registration of the
	// generated functions takes place in the generated files. The separation
	// makes the code compile even when the generated files are missing.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CELDeviceSelector

type CELDeviceSelector struct {
	// Expression is a CEL expression which evaluates a single device. It
	// must evaluate to true when the device under consideration satisfies
	// the desired criteria, and false when it does not. Any other result
	// is an error and causes allocation of devices to abort.
	//
	// The expression's input is an object named "device", which carries
	// the following properties:
	//  - driver (string): the name of the driver which defines this device.
	//  - attributes (map[string]object): the device's attributes, grouped by prefix
	//    (e.g. device.attributes["dra.example.com"] evaluates to an object with all
	//    of the attributes which were prefixed by "dra.example.com".
	//  - capacity (map[string]object): the device's capacities, grouped by prefix.
	//
	// Example: Consider a device with driver="dra.example.com", which exposes
	// two attributes named "model" and "ext.example.com/family" and which
	// exposes one capacity named "modules". This input to this expression
	// would have the following fields:
	//
	//     device.driver
	//     device.attributes["dra.example.com"].model
	//     device.attributes["ext.example.com"].family
	//     device.capacity["dra.example.com"].modules
	//
	// The device.driver field can be used to check for a specific driver,
	// either as a high-level precondition (i.e. you only want to consider
	// devices from this driver) or as part of a multi-clause expression
	// that is meant to consider devices from different drivers.
	//
	// The value type of each attribute is defined by the device
	// definition, and users who write these expressions must consult the
	// documentation for their specific drivers. The value type of each
	// capacity is Quantity.
	//
	// If an unknown prefix is used as a lookup in either device.attributes
	// or device.capacity, an empty map will be returned. Any reference to
	// an unknown field will cause an evaluation error and allocation to
	// abort.
	//
	// A robust expression should check for the existence of attributes
	// before referencing them.
	//
	// For ease of use, the cel.bind() function is enabled, and can be used
	// to simplify expressions that access multiple attributes with the
	// same domain. For example:
	//
	//     cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
	//
	// The length of the expression must be smaller or equal to 10 Ki. The
	// cost of evaluating it is also limited based on the estimated number
	// of logical steps.
	//
	// +required
	Expression string `json:"expression" protobuf:"bytes,1,name=expression"`
}

CELDeviceSelector contains a CEL expression for selecting a device.

func (*CELDeviceSelector) DeepCopy

func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector

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

func (*CELDeviceSelector) DeepCopyInto

func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector)

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

func (*CELDeviceSelector) Descriptor

func (*CELDeviceSelector) Descriptor() ([]byte, []int)

func (*CELDeviceSelector) Marshal

func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error)

func (*CELDeviceSelector) MarshalTo

func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error)

func (*CELDeviceSelector) MarshalToSizedBuffer

func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CELDeviceSelector) ProtoMessage

func (*CELDeviceSelector) ProtoMessage()

func (*CELDeviceSelector) Reset

func (m *CELDeviceSelector) Reset()

func (*CELDeviceSelector) Size

func (m *CELDeviceSelector) Size() (n int)

func (*CELDeviceSelector) String

func (this *CELDeviceSelector) String() string

func (CELDeviceSelector) SwaggerDoc

func (CELDeviceSelector) SwaggerDoc() map[string]string

func (*CELDeviceSelector) Unmarshal

func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error

func (*CELDeviceSelector) XXX_DiscardUnknown

func (m *CELDeviceSelector) XXX_DiscardUnknown()

func (*CELDeviceSelector) XXX_Marshal

func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CELDeviceSelector) XXX_Merge

func (m *CELDeviceSelector) XXX_Merge(src proto.Message)

func (*CELDeviceSelector) XXX_Size

func (m *CELDeviceSelector) XXX_Size() int

func (*CELDeviceSelector) XXX_Unmarshal

func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error

type DeviceSelector

type DeviceSelector struct {
	// CEL contains a CEL expression for selecting a device.
	//
	// +optional
	// +oneOf=SelectorType
	CEL *CELDeviceSelector `json:"cel,omitempty" protobuf:"bytes,1,opt,name=cel"`
}

DeviceSelector must have exactly one field set.

func (*DeviceSelector) DeepCopy

func (in *DeviceSelector) DeepCopy() *DeviceSelector

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

func (*DeviceSelector) DeepCopyInto

func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector)

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

func (*DeviceSelector) Descriptor

func (*DeviceSelector) Descriptor() ([]byte, []int)

func (*DeviceSelector) Marshal

func (m *DeviceSelector) Marshal() (dAtA []byte, err error)

func (*DeviceSelector) MarshalTo

func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error)

func (*DeviceSelector) MarshalToSizedBuffer

func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceSelector) ProtoMessage

func (*DeviceSelector) ProtoMessage()

func (*DeviceSelector) Reset

func (m *DeviceSelector) Reset()

func (*DeviceSelector) Size

func (m *DeviceSelector) Size() (n int)

func (*DeviceSelector) String

func (this *DeviceSelector) String() string

func (DeviceSelector) SwaggerDoc

func (DeviceSelector) SwaggerDoc() map[string]string

func (*DeviceSelector) Unmarshal

func (m *DeviceSelector) Unmarshal(dAtA []byte) error

func (*DeviceSelector) XXX_DiscardUnknown

func (m *DeviceSelector) XXX_DiscardUnknown()

func (*DeviceSelector) XXX_Marshal

func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceSelector) XXX_Merge

func (m *DeviceSelector) XXX_Merge(src proto.Message)

func (*DeviceSelector) XXX_Size

func (m *DeviceSelector) XXX_Size() int

func (*DeviceSelector) XXX_Unmarshal

func (m *DeviceSelector) XXX_Unmarshal(b []byte) error

type DeviceTaint

type DeviceTaint struct {
	// The taint key to be applied to a device.
	// Must be a label name.
	//
	// +required
	Key string `json:"key" protobuf:"bytes,1,name=key"`

	// The taint value corresponding to the taint key.
	// Must be a label value.
	//
	// +optional
	Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`

	// The effect of the taint on claims that do not tolerate the taint
	// and through such claims on the pods using them.
	// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
	// nodes is not valid here.
	//
	// +required
	Effect DeviceTaintEffect `json:"effect" protobuf:"bytes,3,name=effect,casttype=DeviceTaintEffect"`

	// TimeAdded represents the time at which the taint was added.
	// Added automatically during create or update if not set.
	//
	// +optional
	TimeAdded *metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
}

The device this taint is attached to has the "effect" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.

+protobuf.options.(gogoproto.goproto_stringer)=false

func (*DeviceTaint) DeepCopy

func (in *DeviceTaint) DeepCopy() *DeviceTaint

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

func (*DeviceTaint) DeepCopyInto

func (in *DeviceTaint) DeepCopyInto(out *DeviceTaint)

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

func (*DeviceTaint) Descriptor

func (*DeviceTaint) Descriptor() ([]byte, []int)

func (*DeviceTaint) Marshal

func (m *DeviceTaint) Marshal() (dAtA []byte, err error)

func (*DeviceTaint) MarshalTo

func (m *DeviceTaint) MarshalTo(dAtA []byte) (int, error)

func (*DeviceTaint) MarshalToSizedBuffer

func (m *DeviceTaint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceTaint) ProtoMessage

func (*DeviceTaint) ProtoMessage()

func (*DeviceTaint) Reset

func (m *DeviceTaint) Reset()

func (*DeviceTaint) Size

func (m *DeviceTaint) Size() (n int)

func (DeviceTaint) String

func (t DeviceTaint) String() string

String converts to a string in the format '<key>=<value>:<effect>', '<key>=<value>:', '<key>:<effect>', or '<key>'.

func (DeviceTaint) SwaggerDoc

func (DeviceTaint) SwaggerDoc() map[string]string

func (*DeviceTaint) Unmarshal

func (m *DeviceTaint) Unmarshal(dAtA []byte) error

func (*DeviceTaint) XXX_DiscardUnknown

func (m *DeviceTaint) XXX_DiscardUnknown()

func (*DeviceTaint) XXX_Marshal

func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceTaint) XXX_Merge

func (m *DeviceTaint) XXX_Merge(src proto.Message)

func (*DeviceTaint) XXX_Size

func (m *DeviceTaint) XXX_Size() int

func (*DeviceTaint) XXX_Unmarshal

func (m *DeviceTaint) XXX_Unmarshal(b []byte) error

type DeviceTaintEffect

type DeviceTaintEffect string

+enum

const (
	// Do not allow new pods to schedule which use a tainted device unless they tolerate the taint,
	// but allow all pods submitted to Kubelet without going through the scheduler
	// to start, and allow all already-running pods to continue running.
	DeviceTaintEffectNoSchedule DeviceTaintEffect = "NoSchedule"

	// Evict any already-running pods that do not tolerate the device taint.
	DeviceTaintEffectNoExecute DeviceTaintEffect = "NoExecute"
)

type DeviceTaintRule

type DeviceTaintRule struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec specifies the selector and one taint.
	//
	// Changing the spec automatically increments the metadata.generation number.
	Spec DeviceTaintRuleSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

DeviceTaintRule adds one taint to all devices which match the selector. This has the same effect as if the taint was specified directly in the ResourceSlice by the DRA driver.

func (*DeviceTaintRule) APILifecycleDeprecated

func (in *DeviceTaintRule) APILifecycleDeprecated() (major, minor int)

APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.

func (*DeviceTaintRule) APILifecycleIntroduced

func (in *DeviceTaintRule) APILifecycleIntroduced() (major, minor int)

APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.

func (*DeviceTaintRule) APILifecycleRemoved

func (in *DeviceTaintRule) APILifecycleRemoved() (major, minor int)

APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.

func (*DeviceTaintRule) DeepCopy

func (in *DeviceTaintRule) DeepCopy() *DeviceTaintRule

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

func (*DeviceTaintRule) DeepCopyInto

func (in *DeviceTaintRule) DeepCopyInto(out *DeviceTaintRule)

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

func (*DeviceTaintRule) DeepCopyObject

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

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

func (*DeviceTaintRule) Descriptor

func (*DeviceTaintRule) Descriptor() ([]byte, []int)

func (*DeviceTaintRule) Marshal

func (m *DeviceTaintRule) Marshal() (dAtA []byte, err error)

func (*DeviceTaintRule) MarshalTo

func (m *DeviceTaintRule) MarshalTo(dAtA []byte) (int, error)

func (*DeviceTaintRule) MarshalToSizedBuffer

func (m *DeviceTaintRule) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceTaintRule) ProtoMessage

func (*DeviceTaintRule) ProtoMessage()

func (*DeviceTaintRule) Reset

func (m *DeviceTaintRule) Reset()

func (*DeviceTaintRule) Size

func (m *DeviceTaintRule) Size() (n int)

func (*DeviceTaintRule) String

func (this *DeviceTaintRule) String() string

func (DeviceTaintRule) SwaggerDoc

func (DeviceTaintRule) SwaggerDoc() map[string]string

func (*DeviceTaintRule) Unmarshal

func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error

func (*DeviceTaintRule) XXX_DiscardUnknown

func (m *DeviceTaintRule) XXX_DiscardUnknown()

func (*DeviceTaintRule) XXX_Marshal

func (m *DeviceTaintRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceTaintRule) XXX_Merge

func (m *DeviceTaintRule) XXX_Merge(src proto.Message)

func (*DeviceTaintRule) XXX_Size

func (m *DeviceTaintRule) XXX_Size() int

func (*DeviceTaintRule) XXX_Unmarshal

func (m *DeviceTaintRule) XXX_Unmarshal(b []byte) error

type DeviceTaintRuleList

type DeviceTaintRuleList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Items is the list of DeviceTaintRules.
	Items []DeviceTaintRule `json:"items" protobuf:"bytes,2,rep,name=items"`
}

DeviceTaintRuleList is a collection of DeviceTaintRules.

func (*DeviceTaintRuleList) APILifecycleDeprecated

func (in *DeviceTaintRuleList) APILifecycleDeprecated() (major, minor int)

APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.

func (*DeviceTaintRuleList) APILifecycleIntroduced

func (in *DeviceTaintRuleList) APILifecycleIntroduced() (major, minor int)

APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.

func (*DeviceTaintRuleList) APILifecycleRemoved

func (in *DeviceTaintRuleList) APILifecycleRemoved() (major, minor int)

APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.

func (*DeviceTaintRuleList) DeepCopy

func (in *DeviceTaintRuleList) DeepCopy() *DeviceTaintRuleList

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

func (*DeviceTaintRuleList) DeepCopyInto

func (in *DeviceTaintRuleList) DeepCopyInto(out *DeviceTaintRuleList)

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

func (*DeviceTaintRuleList) DeepCopyObject

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

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

func (*DeviceTaintRuleList) Descriptor

func (*DeviceTaintRuleList) Descriptor() ([]byte, []int)

func (*DeviceTaintRuleList) Marshal

func (m *DeviceTaintRuleList) Marshal() (dAtA []byte, err error)

func (*DeviceTaintRuleList) MarshalTo

func (m *DeviceTaintRuleList) MarshalTo(dAtA []byte) (int, error)

func (*DeviceTaintRuleList) MarshalToSizedBuffer

func (m *DeviceTaintRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceTaintRuleList) ProtoMessage

func (*DeviceTaintRuleList) ProtoMessage()

func (*DeviceTaintRuleList) Reset

func (m *DeviceTaintRuleList) Reset()

func (*DeviceTaintRuleList) Size

func (m *DeviceTaintRuleList) Size() (n int)

func (*DeviceTaintRuleList) String

func (this *DeviceTaintRuleList) String() string

func (DeviceTaintRuleList) SwaggerDoc

func (DeviceTaintRuleList) SwaggerDoc() map[string]string

func (*DeviceTaintRuleList) Unmarshal

func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error

func (*DeviceTaintRuleList) XXX_DiscardUnknown

func (m *DeviceTaintRuleList) XXX_DiscardUnknown()

func (*DeviceTaintRuleList) XXX_Marshal

func (m *DeviceTaintRuleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceTaintRuleList) XXX_Merge

func (m *DeviceTaintRuleList) XXX_Merge(src proto.Message)

func (*DeviceTaintRuleList) XXX_Size

func (m *DeviceTaintRuleList) XXX_Size() int

func (*DeviceTaintRuleList) XXX_Unmarshal

func (m *DeviceTaintRuleList) XXX_Unmarshal(b []byte) error

type DeviceTaintRuleSpec

type DeviceTaintRuleSpec struct {
	// DeviceSelector defines which device(s) the taint is applied to.
	// All selector criteria must be satified for a device to
	// match. The empty selector matches all devices. Without
	// a selector, no devices are matches.
	//
	// +optional
	DeviceSelector *DeviceTaintSelector `json:"deviceSelector,omitempty" protobuf:"bytes,1,opt,name=deviceSelector"`

	// The taint that gets applied to matching devices.
	//
	// +required
	Taint DeviceTaint `json:"taint,omitempty" protobuf:"bytes,2,rep,name=taint"`
}

DeviceTaintRuleSpec specifies the selector and one taint.

func (*DeviceTaintRuleSpec) DeepCopy

func (in *DeviceTaintRuleSpec) DeepCopy() *DeviceTaintRuleSpec

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

func (*DeviceTaintRuleSpec) DeepCopyInto

func (in *DeviceTaintRuleSpec) DeepCopyInto(out *DeviceTaintRuleSpec)

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

func (*DeviceTaintRuleSpec) Descriptor

func (*DeviceTaintRuleSpec) Descriptor() ([]byte, []int)

func (*DeviceTaintRuleSpec) Marshal

func (m *DeviceTaintRuleSpec) Marshal() (dAtA []byte, err error)

func (*DeviceTaintRuleSpec) MarshalTo

func (m *DeviceTaintRuleSpec) MarshalTo(dAtA []byte) (int, error)

func (*DeviceTaintRuleSpec) MarshalToSizedBuffer

func (m *DeviceTaintRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceTaintRuleSpec) ProtoMessage

func (*DeviceTaintRuleSpec) ProtoMessage()

func (*DeviceTaintRuleSpec) Reset

func (m *DeviceTaintRuleSpec) Reset()

func (*DeviceTaintRuleSpec) Size

func (m *DeviceTaintRuleSpec) Size() (n int)

func (*DeviceTaintRuleSpec) String

func (this *DeviceTaintRuleSpec) String() string

func (DeviceTaintRuleSpec) SwaggerDoc

func (DeviceTaintRuleSpec) SwaggerDoc() map[string]string

func (*DeviceTaintRuleSpec) Unmarshal

func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error

func (*DeviceTaintRuleSpec) XXX_DiscardUnknown

func (m *DeviceTaintRuleSpec) XXX_DiscardUnknown()

func (*DeviceTaintRuleSpec) XXX_Marshal

func (m *DeviceTaintRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceTaintRuleSpec) XXX_Merge

func (m *DeviceTaintRuleSpec) XXX_Merge(src proto.Message)

func (*DeviceTaintRuleSpec) XXX_Size

func (m *DeviceTaintRuleSpec) XXX_Size() int

func (*DeviceTaintRuleSpec) XXX_Unmarshal

func (m *DeviceTaintRuleSpec) XXX_Unmarshal(b []byte) error

type DeviceTaintSelector

type DeviceTaintSelector struct {
	// If DeviceClassName is set, the selectors defined there must be
	// satisfied by a device to be selected. This field corresponds
	// to class.metadata.name.
	//
	// +optional
	DeviceClassName *string `json:"deviceClassName,omitempty" protobuf:"bytes,1,opt,name=deviceClassName"`

	// If driver is set, only devices from that driver are selected.
	// This fields corresponds to slice.spec.driver.
	//
	// +optional
	Driver *string `json:"driver,omitempty" protobuf:"bytes,2,opt,name=driver"`

	// If pool is set, only devices in that pool are selected.
	//
	// Also setting the driver name may be useful to avoid
	// ambiguity when different drivers use the same pool name,
	// but this is not required because selecting pools from
	// different drivers may also be useful, for example when
	// drivers with node-local devices use the node name as
	// their pool name.
	//
	// +optional
	Pool *string `json:"pool,omitempty" protobuf:"bytes,3,opt,name=pool"`

	// If device is set, only devices with that name are selected.
	// This field corresponds to slice.spec.devices[].name.
	//
	// Setting also driver and pool may be required to avoid ambiguity,
	// but is not required.
	//
	// +optional
	Device *string `json:"device,omitempty" protobuf:"bytes,4,opt,name=device"`

	// Selectors contains the same selection criteria as a ResourceClaim.
	// Currently, CEL expressions are supported. All of these selectors
	// must be satisfied.
	//
	// +optional
	// +listType=atomic
	Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,5,rep,name=selectors"`
}

DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to. The empty selector matches all devices. Without a selector, no devices are matched.

func (*DeviceTaintSelector) DeepCopy

func (in *DeviceTaintSelector) DeepCopy() *DeviceTaintSelector

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

func (*DeviceTaintSelector) DeepCopyInto

func (in *DeviceTaintSelector) DeepCopyInto(out *DeviceTaintSelector)

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

func (*DeviceTaintSelector) Descriptor

func (*DeviceTaintSelector) Descriptor() ([]byte, []int)

func (*DeviceTaintSelector) Marshal

func (m *DeviceTaintSelector) Marshal() (dAtA []byte, err error)

func (*DeviceTaintSelector) MarshalTo

func (m *DeviceTaintSelector) MarshalTo(dAtA []byte) (int, error)

func (*DeviceTaintSelector) MarshalToSizedBuffer

func (m *DeviceTaintSelector) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceTaintSelector) ProtoMessage

func (*DeviceTaintSelector) ProtoMessage()

func (*DeviceTaintSelector) Reset

func (m *DeviceTaintSelector) Reset()

func (*DeviceTaintSelector) Size

func (m *DeviceTaintSelector) Size() (n int)

func (*DeviceTaintSelector) String

func (this *DeviceTaintSelector) String() string

func (DeviceTaintSelector) SwaggerDoc

func (DeviceTaintSelector) SwaggerDoc() map[string]string

func (*DeviceTaintSelector) Unmarshal

func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error

func (*DeviceTaintSelector) XXX_DiscardUnknown

func (m *DeviceTaintSelector) XXX_DiscardUnknown()

func (*DeviceTaintSelector) XXX_Marshal

func (m *DeviceTaintSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceTaintSelector) XXX_Merge

func (m *DeviceTaintSelector) XXX_Merge(src proto.Message)

func (*DeviceTaintSelector) XXX_Size

func (m *DeviceTaintSelector) XXX_Size() int

func (*DeviceTaintSelector) XXX_Unmarshal

func (m *DeviceTaintSelector) XXX_Unmarshal(b []byte) error

Source Files

devicetaint.go doc.go generated.pb.go register.go types.go types_swagger_doc_generated.go zz_generated.deepcopy.go zz_generated.prerelease-lifecycle.go

Version
v0.34.0-alpha.1
Published
Jun 16, 2025
Platform
js/wasm
Imports
10 packages
Last checked
4 hours ago

Tools for package owners.