build source
This commit is contained in:
commit
ee1fec43ed
4171 changed files with 1351288 additions and 0 deletions
35
vendor/k8s.io/api/resource/v1alpha3/devicetaint.go
generated
vendored
Normal file
35
vendor/k8s.io/api/resource/v1alpha3/devicetaint.go
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Copyright 2025 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "fmt"
|
||||
|
||||
var _ fmt.Stringer = DeviceTaint{}
|
||||
|
||||
// String converts to a string in the format '<key>=<value>:<effect>', '<key>=<value>:', '<key>:<effect>', or '<key>'.
|
||||
func (t DeviceTaint) String() string {
|
||||
if len(t.Effect) == 0 {
|
||||
if len(t.Value) == 0 {
|
||||
return fmt.Sprintf("%v", t.Key)
|
||||
}
|
||||
return fmt.Sprintf("%v=%v:", t.Key, t.Value)
|
||||
}
|
||||
if len(t.Value) == 0 {
|
||||
return fmt.Sprintf("%v:%v", t.Key, t.Effect)
|
||||
}
|
||||
return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
|
||||
}
|
||||
26
vendor/k8s.io/api/resource/v1alpha3/doc.go
generated
vendored
Normal file
26
vendor/k8s.io/api/resource/v1alpha3/doc.go
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:prerelease-lifecycle-gen=true
|
||||
// +k8s:openapi-model-package=io.k8s.api.resource.v1alpha3
|
||||
|
||||
// +groupName=resource.k8s.io
|
||||
|
||||
// Package v1alpha3 is the v1alpha3 version of the resource API.
|
||||
package v1alpha3
|
||||
1677
vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
generated
vendored
Normal file
1677
vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
239
vendor/k8s.io/api/resource/v1alpha3/generated.proto
generated
vendored
Normal file
239
vendor/k8s.io/api/resource/v1alpha3/generated.proto
generated
vendored
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package k8s.io.api.resource.v1alpha3;
|
||||
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "k8s.io/api/resource/v1alpha3";
|
||||
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
message CELDeviceSelector {
|
||||
// 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
|
||||
optional string expression = 1;
|
||||
}
|
||||
|
||||
// DeviceSelector must have exactly one field set.
|
||||
message DeviceSelector {
|
||||
// CEL contains a CEL expression for selecting a device.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=SelectorType
|
||||
optional CELDeviceSelector cel = 1;
|
||||
}
|
||||
|
||||
// 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
|
||||
message DeviceTaint {
|
||||
// The taint key to be applied to a device.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +required
|
||||
optional string key = 1;
|
||||
|
||||
// The taint value corresponding to the taint key.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
optional string value = 2;
|
||||
|
||||
// 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 None, NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here. More effects may get added in the future.
|
||||
// Consumers must treat unknown effects like None.
|
||||
//
|
||||
// +required
|
||||
optional string effect = 3;
|
||||
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message DeviceTaintRule {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec specifies the selector and one taint.
|
||||
//
|
||||
// Changing the spec automatically increments the metadata.generation number.
|
||||
optional DeviceTaintRuleSpec spec = 2;
|
||||
|
||||
// Status provides information about what was requested in the spec.
|
||||
//
|
||||
// +optional
|
||||
optional DeviceTaintRuleStatus status = 3;
|
||||
}
|
||||
|
||||
// DeviceTaintRuleList is a collection of DeviceTaintRules.
|
||||
message DeviceTaintRuleList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of DeviceTaintRules.
|
||||
repeated DeviceTaintRule items = 2;
|
||||
}
|
||||
|
||||
// DeviceTaintRuleSpec specifies the selector and one taint.
|
||||
message DeviceTaintRuleSpec {
|
||||
// DeviceSelector defines which device(s) the taint is applied to.
|
||||
// All selector criteria must be satisfied for a device to
|
||||
// match. The empty selector matches all devices. Without
|
||||
// a selector, no devices are matches.
|
||||
//
|
||||
// +optional
|
||||
optional DeviceTaintSelector deviceSelector = 1;
|
||||
|
||||
// The taint that gets applied to matching devices.
|
||||
//
|
||||
// +required
|
||||
optional DeviceTaint taint = 2;
|
||||
}
|
||||
|
||||
// DeviceTaintRuleStatus provides information about an on-going pod eviction.
|
||||
message DeviceTaintRuleStatus {
|
||||
// Conditions provide information about the state of the DeviceTaintRule
|
||||
// and the cluster at some point in time,
|
||||
// in a machine-readable and human-readable format.
|
||||
//
|
||||
// The following condition is currently defined as part of this API, more may
|
||||
// get added:
|
||||
// - Type: EvictionInProgress
|
||||
// - Status: True if there are currently pods which need to be evicted, False otherwise
|
||||
// (includes the effects which don't cause eviction).
|
||||
// - Reason: not specified, may change
|
||||
// - Message: includes information about number of pending pods and already evicted pods
|
||||
// in a human-readable format, updated periodically, may change
|
||||
//
|
||||
// For `effect: None`, the condition above gets set once for each change to
|
||||
// the spec, with the message containing information about what would happen
|
||||
// if the effect was `NoExecute`. This feedback can be used to decide whether
|
||||
// changing the effect to `NoExecute` will work as intended. It only gets
|
||||
// set once to avoid having to constantly update the status.
|
||||
//
|
||||
// Must have 8 or fewer entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=type
|
||||
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1;
|
||||
}
|
||||
|
||||
// DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to.
|
||||
// The empty selector matches all devices. Without a selector, no devices
|
||||
// are matched.
|
||||
message DeviceTaintSelector {
|
||||
// If driver is set, only devices from that driver are selected.
|
||||
// This fields corresponds to slice.spec.driver.
|
||||
//
|
||||
// +optional
|
||||
optional string driver = 2;
|
||||
|
||||
// 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
|
||||
optional string pool = 3;
|
||||
|
||||
// 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
|
||||
optional string device = 4;
|
||||
}
|
||||
|
||||
38
vendor/k8s.io/api/resource/v1alpha3/generated.protomessage.pb.go
generated
vendored
Normal file
38
vendor/k8s.io/api/resource/v1alpha3/generated.protomessage.pb.go
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
//go:build kubernetes_protomessage_one_more_release
|
||||
// +build kubernetes_protomessage_one_more_release
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by go-to-protobuf. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
func (*CELDeviceSelector) ProtoMessage() {}
|
||||
|
||||
func (*DeviceSelector) ProtoMessage() {}
|
||||
|
||||
func (*DeviceTaint) ProtoMessage() {}
|
||||
|
||||
func (*DeviceTaintRule) ProtoMessage() {}
|
||||
|
||||
func (*DeviceTaintRuleList) ProtoMessage() {}
|
||||
|
||||
func (*DeviceTaintRuleSpec) ProtoMessage() {}
|
||||
|
||||
func (*DeviceTaintRuleStatus) ProtoMessage() {}
|
||||
|
||||
func (*DeviceTaintSelector) ProtoMessage() {}
|
||||
54
vendor/k8s.io/api/resource/v1alpha3/register.go
generated
vendored
Normal file
54
vendor/k8s.io/api/resource/v1alpha3/register.go
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "resource.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
// Adds the list of known types to the given scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&DeviceTaintRule{},
|
||||
&DeviceTaintRuleList{},
|
||||
)
|
||||
|
||||
// Add the watch version that applies
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
334
vendor/k8s.io/api/resource/v1alpha3/types.go
generated
vendored
Normal file
334
vendor/k8s.io/api/resource/v1alpha3/types.go
generated
vendored
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
/*
|
||||
Copyright 2022 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceSelector must have exactly one field set.
|
||||
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"`
|
||||
}
|
||||
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
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"`
|
||||
}
|
||||
|
||||
// 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 CELSelectorExpressionMaxCost = 1000000
|
||||
|
||||
// CELSelectorExpressionMaxLength is the maximum length of a CEL selector expression string.
|
||||
const CELSelectorExpressionMaxLength = 10 * 1024
|
||||
|
||||
// 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
|
||||
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 None, NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here. More effects may get added in the future.
|
||||
// Consumers must treat unknown effects like None.
|
||||
//
|
||||
// +required
|
||||
Effect DeviceTaintEffect `json:"effect" protobuf:"bytes,3,name=effect,casttype=DeviceTaintEffect"`
|
||||
|
||||
// ^^^^
|
||||
//
|
||||
// Implementing PreferNoSchedule would depend on a scoring solution for DRA.
|
||||
// It might get added as part of that.
|
||||
//
|
||||
// A possible future new effect is NoExecuteWithPodDisruptionBudget:
|
||||
// honor the pod disruption budget instead of simply deleting pods.
|
||||
// This is currently undecided, it could also be a separate field.
|
||||
//
|
||||
// Validation must be prepared to allow unknown enums in stored objects,
|
||||
// which will enable adding new enums within a single release without
|
||||
// ratcheting.
|
||||
|
||||
// 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"`
|
||||
|
||||
// ^^^
|
||||
//
|
||||
// This field was defined as "It is only written for NoExecute taints." for node taints.
|
||||
// But in practice, Kubernetes never did anything with it (no validation, no defaulting,
|
||||
// ignored during pod eviction in pkg/controller/tainteviction).
|
||||
}
|
||||
|
||||
// +enum
|
||||
type DeviceTaintEffect string
|
||||
|
||||
const (
|
||||
// No effect, the taint is purely informational.
|
||||
DeviceTaintEffectNone DeviceTaintEffect = "None"
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.33
|
||||
|
||||
// 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.
|
||||
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"`
|
||||
|
||||
// Status provides information about what was requested in the spec.
|
||||
//
|
||||
// +optional
|
||||
Status DeviceTaintRuleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// DeviceTaintRuleSpec specifies the selector and one taint.
|
||||
type DeviceTaintRuleSpec struct {
|
||||
// DeviceSelector defines which device(s) the taint is applied to.
|
||||
// All selector criteria must be satisfied 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"`
|
||||
}
|
||||
|
||||
// DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to.
|
||||
// The empty selector matches all devices. Without a selector, no devices
|
||||
// are matched.
|
||||
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
|
||||
//
|
||||
// Tombstoned since 1.35 because it turned out that supporting this in all cases
|
||||
// would depend on copying the device attributes into the ResourceClaim allocation
|
||||
// result. Without that the eviction controller cannot evaluate these CEL expressions.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
// Tombstoned since 1.35 because it turned out that supporting this in all cases
|
||||
// would depend on copying the device attributes into the ResourceClaim allocation
|
||||
// result. Without that the eviction controller cannot evaluate these CEL expressions.
|
||||
//
|
||||
// Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,5,rep,name=selectors"`
|
||||
}
|
||||
|
||||
// DeviceTaintRuleStatus provides information about an on-going pod eviction.
|
||||
type DeviceTaintRuleStatus struct {
|
||||
// Conditions provide information about the state of the DeviceTaintRule
|
||||
// and the cluster at some point in time,
|
||||
// in a machine-readable and human-readable format.
|
||||
//
|
||||
// The following condition is currently defined as part of this API, more may
|
||||
// get added:
|
||||
// - Type: EvictionInProgress
|
||||
// - Status: True if there are currently pods which need to be evicted, False otherwise
|
||||
// (includes the effects which don't cause eviction).
|
||||
// - Reason: not specified, may change
|
||||
// - Message: includes information about number of pending pods and already evicted pods
|
||||
// in a human-readable format, updated periodically, may change
|
||||
//
|
||||
// For `effect: None`, the condition above gets set once for each change to
|
||||
// the spec, with the message containing information about what would happen
|
||||
// if the effect was `NoExecute`. This feedback can be used to decide whether
|
||||
// changing the effect to `NoExecute` will work as intended. It only gets
|
||||
// set once to avoid having to constantly update the status.
|
||||
//
|
||||
// Must have 8 or fewer entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=type
|
||||
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||
}
|
||||
|
||||
// DeviceTaintRuleStatusMaxConditions is the maximum number of conditions in DeviceTaintRuleStatus.
|
||||
const DeviceTaintRuleStatusMaxConditions = 8
|
||||
|
||||
// DeviceTaintConditionEvictionInProgress is the publicly documented condition type for the DeviceTaintRuleStatus.
|
||||
const DeviceTaintConditionEvictionInProgress = "EvictionInProgress"
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.33
|
||||
|
||||
// DeviceTaintRuleList is a collection of DeviceTaintRules.
|
||||
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"`
|
||||
}
|
||||
111
vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go
generated
vendored
Normal file
111
vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go
generated
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-codegen.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_CELDeviceSelector = map[string]string{
|
||||
"": "CELDeviceSelector contains a CEL expression for selecting a device.",
|
||||
"expression": "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.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: 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:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe 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.\n\nThe 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.\n\nIf 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.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor 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:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe 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.",
|
||||
}
|
||||
|
||||
func (CELDeviceSelector) SwaggerDoc() map[string]string {
|
||||
return map_CELDeviceSelector
|
||||
}
|
||||
|
||||
var map_DeviceSelector = map[string]string{
|
||||
"": "DeviceSelector must have exactly one field set.",
|
||||
"cel": "CEL contains a CEL expression for selecting a device.",
|
||||
}
|
||||
|
||||
func (DeviceSelector) SwaggerDoc() map[string]string {
|
||||
return map_DeviceSelector
|
||||
}
|
||||
|
||||
var map_DeviceTaint = map[string]string{
|
||||
"": "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.",
|
||||
"key": "The taint key to be applied to a device. Must be a label name.",
|
||||
"value": "The taint value corresponding to the taint key. Must be a label value.",
|
||||
"effect": "The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them.\n\nValid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None.",
|
||||
"timeAdded": "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.",
|
||||
}
|
||||
|
||||
func (DeviceTaint) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaint
|
||||
}
|
||||
|
||||
var map_DeviceTaintRule = map[string]string{
|
||||
"": "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.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Spec specifies the selector and one taint.\n\nChanging the spec automatically increments the metadata.generation number.",
|
||||
"status": "Status provides information about what was requested in the spec.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRule) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRule
|
||||
}
|
||||
|
||||
var map_DeviceTaintRuleList = map[string]string{
|
||||
"": "DeviceTaintRuleList is a collection of DeviceTaintRules.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of DeviceTaintRules.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRuleList) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRuleList
|
||||
}
|
||||
|
||||
var map_DeviceTaintRuleSpec = map[string]string{
|
||||
"": "DeviceTaintRuleSpec specifies the selector and one taint.",
|
||||
"deviceSelector": "DeviceSelector defines which device(s) the taint is applied to. All selector criteria must be satisfied for a device to match. The empty selector matches all devices. Without a selector, no devices are matches.",
|
||||
"taint": "The taint that gets applied to matching devices.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRuleSpec) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRuleSpec
|
||||
}
|
||||
|
||||
var map_DeviceTaintRuleStatus = map[string]string{
|
||||
"": "DeviceTaintRuleStatus provides information about an on-going pod eviction.",
|
||||
"conditions": "Conditions provide information about the state of the DeviceTaintRule and the cluster at some point in time, in a machine-readable and human-readable format.\n\nThe following condition is currently defined as part of this API, more may get added: - Type: EvictionInProgress - Status: True if there are currently pods which need to be evicted, False otherwise\n (includes the effects which don't cause eviction).\n- Reason: not specified, may change - Message: includes information about number of pending pods and already evicted pods\n in a human-readable format, updated periodically, may change\n\nFor `effect: None`, the condition above gets set once for each change to the spec, with the message containing information about what would happen if the effect was `NoExecute`. This feedback can be used to decide whether changing the effect to `NoExecute` will work as intended. It only gets set once to avoid having to constantly update the status.\n\nMust have 8 or fewer entries.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRuleStatus) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRuleStatus
|
||||
}
|
||||
|
||||
var map_DeviceTaintSelector = map[string]string{
|
||||
"": "DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to. The empty selector matches all devices. Without a selector, no devices are matched.",
|
||||
"driver": "If driver is set, only devices from that driver are selected. This fields corresponds to slice.spec.driver.",
|
||||
"pool": "If pool is set, only devices in that pool are selected.\n\nAlso 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.",
|
||||
"device": "If device is set, only devices with that name are selected. This field corresponds to slice.spec.devices[].name.\n\nSetting also driver and pool may be required to avoid ambiguity, but is not required.",
|
||||
}
|
||||
|
||||
func (DeviceTaintSelector) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintSelector
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
221
vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go
generated
vendored
Normal file
221
vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go
generated
vendored
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector.
|
||||
func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CELDeviceSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector) {
|
||||
*out = *in
|
||||
if in.CEL != nil {
|
||||
in, out := &in.CEL, &out.CEL
|
||||
*out = new(CELDeviceSelector)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector.
|
||||
func (in *DeviceSelector) DeepCopy() *DeviceSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaint) DeepCopyInto(out *DeviceTaint) {
|
||||
*out = *in
|
||||
if in.TimeAdded != nil {
|
||||
in, out := &in.TimeAdded, &out.TimeAdded
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaint.
|
||||
func (in *DeviceTaint) DeepCopy() *DeviceTaint {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaint)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRule) DeepCopyInto(out *DeviceTaintRule) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRule.
|
||||
func (in *DeviceTaintRule) DeepCopy() *DeviceTaintRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DeviceTaintRule) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRuleList) DeepCopyInto(out *DeviceTaintRuleList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]DeviceTaintRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRuleList.
|
||||
func (in *DeviceTaintRuleList) DeepCopy() *DeviceTaintRuleList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRuleList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DeviceTaintRuleList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRuleSpec) DeepCopyInto(out *DeviceTaintRuleSpec) {
|
||||
*out = *in
|
||||
if in.DeviceSelector != nil {
|
||||
in, out := &in.DeviceSelector, &out.DeviceSelector
|
||||
*out = new(DeviceTaintSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.Taint.DeepCopyInto(&out.Taint)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRuleSpec.
|
||||
func (in *DeviceTaintRuleSpec) DeepCopy() *DeviceTaintRuleSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRuleSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRuleStatus) DeepCopyInto(out *DeviceTaintRuleStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]v1.Condition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRuleStatus.
|
||||
func (in *DeviceTaintRuleStatus) DeepCopy() *DeviceTaintRuleStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRuleStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintSelector) DeepCopyInto(out *DeviceTaintSelector) {
|
||||
*out = *in
|
||||
if in.Driver != nil {
|
||||
in, out := &in.Driver, &out.Driver
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Pool != nil {
|
||||
in, out := &in.Pool, &out.Pool
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Device != nil {
|
||||
in, out := &in.Device, &out.Device
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintSelector.
|
||||
func (in *DeviceTaintSelector) DeepCopy() *DeviceTaintSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
62
vendor/k8s.io/api/resource/v1alpha3/zz_generated.model_name.go
generated
vendored
Normal file
62
vendor/k8s.io/api/resource/v1alpha3/zz_generated.model_name.go
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by openapi-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in CELDeviceSelector) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.CELDeviceSelector"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceSelector) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceSelector"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceTaint) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceTaint"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceTaintRule) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceTaintRule"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceTaintRuleList) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceTaintRuleList"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceTaintRuleSpec) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceTaintRuleStatus) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceTaintRuleStatus"
|
||||
}
|
||||
|
||||
// OpenAPIModelName returns the OpenAPI model name for this type.
|
||||
func (in DeviceTaintSelector) OpenAPIModelName() string {
|
||||
return "io.k8s.api.resource.v1alpha3.DeviceTaintSelector"
|
||||
}
|
||||
58
vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go
generated
vendored
Normal file
58
vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by prerelease-lifecycle-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// 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 (in *DeviceTaintRule) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 33
|
||||
}
|
||||
|
||||
// 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 (in *DeviceTaintRule) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 36
|
||||
}
|
||||
|
||||
// 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 (in *DeviceTaintRule) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 39
|
||||
}
|
||||
|
||||
// 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 (in *DeviceTaintRuleList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 33
|
||||
}
|
||||
|
||||
// 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 (in *DeviceTaintRuleList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 36
|
||||
}
|
||||
|
||||
// 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 (in *DeviceTaintRuleList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 39
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue