mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-01-27 10:19:35 +00:00
DRA: generated files for device taints API
This commit is contained in:
@@ -1915,6 +1915,26 @@
|
||||
"watch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"resource": "devicetaintrules",
|
||||
"responseKind": {
|
||||
"group": "",
|
||||
"kind": "DeviceTaintRule",
|
||||
"version": ""
|
||||
},
|
||||
"scope": "Cluster",
|
||||
"singularResource": "devicetaintrule",
|
||||
"verbs": [
|
||||
"create",
|
||||
"delete",
|
||||
"deletecollection",
|
||||
"get",
|
||||
"list",
|
||||
"patch",
|
||||
"update",
|
||||
"watch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"resource": "resourceclaims",
|
||||
"responseKind": {
|
||||
|
||||
@@ -20,6 +20,23 @@
|
||||
"watch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "DeviceTaintRule",
|
||||
"name": "devicetaintrules",
|
||||
"namespaced": false,
|
||||
"singularName": "devicetaintrule",
|
||||
"storageVersionHash": "DJ3UJ0fj8MI=",
|
||||
"verbs": [
|
||||
"create",
|
||||
"delete",
|
||||
"deletecollection",
|
||||
"get",
|
||||
"list",
|
||||
"patch",
|
||||
"update",
|
||||
"watch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "ResourceClaim",
|
||||
"name": "resourceclaims",
|
||||
|
||||
938
api/openapi-spec/swagger.json
generated
938
api/openapi-spec/swagger.json
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -193,6 +193,19 @@
|
||||
},
|
||||
"description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"type": "object"
|
||||
},
|
||||
"taints": {
|
||||
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.api.resource.v1beta1.DeviceTaint"
|
||||
}
|
||||
],
|
||||
"default": {}
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -607,6 +620,19 @@
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
},
|
||||
"tolerations": {
|
||||
"description": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.api.resource.v1beta1.DeviceToleration"
|
||||
}
|
||||
],
|
||||
"default": {}
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -640,6 +666,19 @@
|
||||
"default": "",
|
||||
"description": "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format <main request>/<subrequest>.\n\nMultiple devices may have been allocated per request.",
|
||||
"type": "string"
|
||||
},
|
||||
"tolerations": {
|
||||
"description": "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.api.resource.v1beta1.DeviceToleration"
|
||||
}
|
||||
],
|
||||
"default": {}
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -698,6 +737,19 @@
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
},
|
||||
"tolerations": {
|
||||
"description": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.api.resource.v1beta1.DeviceToleration"
|
||||
}
|
||||
],
|
||||
"default": {}
|
||||
},
|
||||
"type": "array",
|
||||
"x-kubernetes-list-type": "atomic"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -706,6 +758,66 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.api.resource.v1beta1.DeviceTaint": {
|
||||
"description": "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.",
|
||||
"properties": {
|
||||
"effect": {
|
||||
"default": "",
|
||||
"description": "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.",
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"default": "",
|
||||
"description": "The taint key to be applied to a device. Must be a label name.",
|
||||
"type": "string"
|
||||
},
|
||||
"timeAdded": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
|
||||
}
|
||||
],
|
||||
"description": "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set."
|
||||
},
|
||||
"value": {
|
||||
"description": "The taint value corresponding to the taint key. Must be a label value.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key",
|
||||
"effect"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.api.resource.v1beta1.DeviceToleration": {
|
||||
"description": "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
|
||||
"properties": {
|
||||
"effect": {
|
||||
"description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.",
|
||||
"type": "string"
|
||||
},
|
||||
"key": {
|
||||
"description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
|
||||
"type": "string"
|
||||
},
|
||||
"operator": {
|
||||
"default": "Equal",
|
||||
"description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.",
|
||||
"type": "string"
|
||||
},
|
||||
"tolerationSeconds": {
|
||||
"description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>.",
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"description": "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"io.k8s.api.resource.v1beta1.NetworkDeviceData": {
|
||||
"description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.",
|
||||
"properties": {
|
||||
|
||||
224
pkg/apis/resource/v1alpha3/zz_generated.conversion.go
generated
224
pkg/apis/resource/v1alpha3/zz_generated.conversion.go
generated
@@ -242,6 +242,66 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.DeviceTaint)(nil), (*resource.DeviceTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_DeviceTaint_To_resource_DeviceTaint(a.(*resourcev1alpha3.DeviceTaint), b.(*resource.DeviceTaint), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceTaint)(nil), (*resourcev1alpha3.DeviceTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceTaint_To_v1alpha3_DeviceTaint(a.(*resource.DeviceTaint), b.(*resourcev1alpha3.DeviceTaint), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.DeviceTaintRule)(nil), (*resource.DeviceTaintRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_DeviceTaintRule_To_resource_DeviceTaintRule(a.(*resourcev1alpha3.DeviceTaintRule), b.(*resource.DeviceTaintRule), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceTaintRule)(nil), (*resourcev1alpha3.DeviceTaintRule)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceTaintRule_To_v1alpha3_DeviceTaintRule(a.(*resource.DeviceTaintRule), b.(*resourcev1alpha3.DeviceTaintRule), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.DeviceTaintRuleList)(nil), (*resource.DeviceTaintRuleList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_DeviceTaintRuleList_To_resource_DeviceTaintRuleList(a.(*resourcev1alpha3.DeviceTaintRuleList), b.(*resource.DeviceTaintRuleList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceTaintRuleList)(nil), (*resourcev1alpha3.DeviceTaintRuleList)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceTaintRuleList_To_v1alpha3_DeviceTaintRuleList(a.(*resource.DeviceTaintRuleList), b.(*resourcev1alpha3.DeviceTaintRuleList), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.DeviceTaintRuleSpec)(nil), (*resource.DeviceTaintRuleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_DeviceTaintRuleSpec_To_resource_DeviceTaintRuleSpec(a.(*resourcev1alpha3.DeviceTaintRuleSpec), b.(*resource.DeviceTaintRuleSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceTaintRuleSpec)(nil), (*resourcev1alpha3.DeviceTaintRuleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceTaintRuleSpec_To_v1alpha3_DeviceTaintRuleSpec(a.(*resource.DeviceTaintRuleSpec), b.(*resourcev1alpha3.DeviceTaintRuleSpec), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.DeviceTaintSelector)(nil), (*resource.DeviceTaintSelector)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_DeviceTaintSelector_To_resource_DeviceTaintSelector(a.(*resourcev1alpha3.DeviceTaintSelector), b.(*resource.DeviceTaintSelector), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceTaintSelector)(nil), (*resourcev1alpha3.DeviceTaintSelector)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceTaintSelector_To_v1alpha3_DeviceTaintSelector(a.(*resource.DeviceTaintSelector), b.(*resourcev1alpha3.DeviceTaintSelector), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.DeviceToleration)(nil), (*resource.DeviceToleration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_DeviceToleration_To_resource_DeviceToleration(a.(*resourcev1alpha3.DeviceToleration), b.(*resource.DeviceToleration), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceToleration)(nil), (*resourcev1alpha3.DeviceToleration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceToleration_To_v1alpha3_DeviceToleration(a.(*resource.DeviceToleration), b.(*resourcev1alpha3.DeviceToleration), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.NetworkDeviceData)(nil), (*resource.NetworkDeviceData)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData(a.(*resourcev1alpha3.NetworkDeviceData), b.(*resource.NetworkDeviceData), scope)
|
||||
}); err != nil {
|
||||
@@ -466,6 +526,7 @@ func autoConvert_v1alpha3_BasicDevice_To_resource_BasicDevice(in *resourcev1alph
|
||||
} else {
|
||||
out.Capacity = nil
|
||||
}
|
||||
out.Taints = *(*[]resource.DeviceTaint)(unsafe.Pointer(&in.Taints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -489,6 +550,7 @@ func autoConvert_resource_BasicDevice_To_v1alpha3_BasicDevice(in *resource.Basic
|
||||
} else {
|
||||
out.Capacity = nil
|
||||
}
|
||||
out.Taints = *(*[]resourcev1alpha3.DeviceTaint)(unsafe.Pointer(&in.Taints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -825,6 +887,7 @@ func autoConvert_v1alpha3_DeviceRequest_To_resource_DeviceRequest(in *resourcev1
|
||||
out.Count = in.Count
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.FirstAvailable = *(*[]resource.DeviceSubRequest)(unsafe.Pointer(&in.FirstAvailable))
|
||||
out.Tolerations = *(*[]resource.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -841,6 +904,7 @@ func autoConvert_resource_DeviceRequest_To_v1alpha3_DeviceRequest(in *resource.D
|
||||
out.Count = in.Count
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.FirstAvailable = *(*[]resourcev1alpha3.DeviceSubRequest)(unsafe.Pointer(&in.FirstAvailable))
|
||||
out.Tolerations = *(*[]resourcev1alpha3.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -855,6 +919,7 @@ func autoConvert_v1alpha3_DeviceRequestAllocationResult_To_resource_DeviceReques
|
||||
out.Pool = in.Pool
|
||||
out.Device = in.Device
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.Tolerations = *(*[]resource.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -869,6 +934,7 @@ func autoConvert_resource_DeviceRequestAllocationResult_To_v1alpha3_DeviceReques
|
||||
out.Pool = in.Pool
|
||||
out.Device = in.Device
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.Tolerations = *(*[]resourcev1alpha3.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -903,6 +969,7 @@ func autoConvert_v1alpha3_DeviceSubRequest_To_resource_DeviceSubRequest(in *reso
|
||||
out.Selectors = *(*[]resource.DeviceSelector)(unsafe.Pointer(&in.Selectors))
|
||||
out.AllocationMode = resource.DeviceAllocationMode(in.AllocationMode)
|
||||
out.Count = in.Count
|
||||
out.Tolerations = *(*[]resource.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -917,6 +984,7 @@ func autoConvert_resource_DeviceSubRequest_To_v1alpha3_DeviceSubRequest(in *reso
|
||||
out.Selectors = *(*[]resourcev1alpha3.DeviceSelector)(unsafe.Pointer(&in.Selectors))
|
||||
out.AllocationMode = resourcev1alpha3.DeviceAllocationMode(in.AllocationMode)
|
||||
out.Count = in.Count
|
||||
out.Tolerations = *(*[]resourcev1alpha3.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -925,6 +993,162 @@ func Convert_resource_DeviceSubRequest_To_v1alpha3_DeviceSubRequest(in *resource
|
||||
return autoConvert_resource_DeviceSubRequest_To_v1alpha3_DeviceSubRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_DeviceTaint_To_resource_DeviceTaint(in *resourcev1alpha3.DeviceTaint, out *resource.DeviceTaint, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Value = in.Value
|
||||
out.Effect = resource.DeviceTaintEffect(in.Effect)
|
||||
out.TimeAdded = (*v1.Time)(unsafe.Pointer(in.TimeAdded))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha3_DeviceTaint_To_resource_DeviceTaint is an autogenerated conversion function.
|
||||
func Convert_v1alpha3_DeviceTaint_To_resource_DeviceTaint(in *resourcev1alpha3.DeviceTaint, out *resource.DeviceTaint, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha3_DeviceTaint_To_resource_DeviceTaint(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceTaint_To_v1alpha3_DeviceTaint(in *resource.DeviceTaint, out *resourcev1alpha3.DeviceTaint, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Value = in.Value
|
||||
out.Effect = resourcev1alpha3.DeviceTaintEffect(in.Effect)
|
||||
out.TimeAdded = (*v1.Time)(unsafe.Pointer(in.TimeAdded))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceTaint_To_v1alpha3_DeviceTaint is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceTaint_To_v1alpha3_DeviceTaint(in *resource.DeviceTaint, out *resourcev1alpha3.DeviceTaint, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceTaint_To_v1alpha3_DeviceTaint(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_DeviceTaintRule_To_resource_DeviceTaintRule(in *resourcev1alpha3.DeviceTaintRule, out *resource.DeviceTaintRule, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_v1alpha3_DeviceTaintRuleSpec_To_resource_DeviceTaintRuleSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha3_DeviceTaintRule_To_resource_DeviceTaintRule is an autogenerated conversion function.
|
||||
func Convert_v1alpha3_DeviceTaintRule_To_resource_DeviceTaintRule(in *resourcev1alpha3.DeviceTaintRule, out *resource.DeviceTaintRule, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha3_DeviceTaintRule_To_resource_DeviceTaintRule(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceTaintRule_To_v1alpha3_DeviceTaintRule(in *resource.DeviceTaintRule, out *resourcev1alpha3.DeviceTaintRule, s conversion.Scope) error {
|
||||
out.ObjectMeta = in.ObjectMeta
|
||||
if err := Convert_resource_DeviceTaintRuleSpec_To_v1alpha3_DeviceTaintRuleSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceTaintRule_To_v1alpha3_DeviceTaintRule is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceTaintRule_To_v1alpha3_DeviceTaintRule(in *resource.DeviceTaintRule, out *resourcev1alpha3.DeviceTaintRule, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceTaintRule_To_v1alpha3_DeviceTaintRule(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_DeviceTaintRuleList_To_resource_DeviceTaintRuleList(in *resourcev1alpha3.DeviceTaintRuleList, out *resource.DeviceTaintRuleList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]resource.DeviceTaintRule)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha3_DeviceTaintRuleList_To_resource_DeviceTaintRuleList is an autogenerated conversion function.
|
||||
func Convert_v1alpha3_DeviceTaintRuleList_To_resource_DeviceTaintRuleList(in *resourcev1alpha3.DeviceTaintRuleList, out *resource.DeviceTaintRuleList, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha3_DeviceTaintRuleList_To_resource_DeviceTaintRuleList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceTaintRuleList_To_v1alpha3_DeviceTaintRuleList(in *resource.DeviceTaintRuleList, out *resourcev1alpha3.DeviceTaintRuleList, s conversion.Scope) error {
|
||||
out.ListMeta = in.ListMeta
|
||||
out.Items = *(*[]resourcev1alpha3.DeviceTaintRule)(unsafe.Pointer(&in.Items))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceTaintRuleList_To_v1alpha3_DeviceTaintRuleList is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceTaintRuleList_To_v1alpha3_DeviceTaintRuleList(in *resource.DeviceTaintRuleList, out *resourcev1alpha3.DeviceTaintRuleList, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceTaintRuleList_To_v1alpha3_DeviceTaintRuleList(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_DeviceTaintRuleSpec_To_resource_DeviceTaintRuleSpec(in *resourcev1alpha3.DeviceTaintRuleSpec, out *resource.DeviceTaintRuleSpec, s conversion.Scope) error {
|
||||
out.DeviceSelector = (*resource.DeviceTaintSelector)(unsafe.Pointer(in.DeviceSelector))
|
||||
if err := Convert_v1alpha3_DeviceTaint_To_resource_DeviceTaint(&in.Taint, &out.Taint, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha3_DeviceTaintRuleSpec_To_resource_DeviceTaintRuleSpec is an autogenerated conversion function.
|
||||
func Convert_v1alpha3_DeviceTaintRuleSpec_To_resource_DeviceTaintRuleSpec(in *resourcev1alpha3.DeviceTaintRuleSpec, out *resource.DeviceTaintRuleSpec, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha3_DeviceTaintRuleSpec_To_resource_DeviceTaintRuleSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceTaintRuleSpec_To_v1alpha3_DeviceTaintRuleSpec(in *resource.DeviceTaintRuleSpec, out *resourcev1alpha3.DeviceTaintRuleSpec, s conversion.Scope) error {
|
||||
out.DeviceSelector = (*resourcev1alpha3.DeviceTaintSelector)(unsafe.Pointer(in.DeviceSelector))
|
||||
if err := Convert_resource_DeviceTaint_To_v1alpha3_DeviceTaint(&in.Taint, &out.Taint, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceTaintRuleSpec_To_v1alpha3_DeviceTaintRuleSpec is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceTaintRuleSpec_To_v1alpha3_DeviceTaintRuleSpec(in *resource.DeviceTaintRuleSpec, out *resourcev1alpha3.DeviceTaintRuleSpec, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceTaintRuleSpec_To_v1alpha3_DeviceTaintRuleSpec(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_DeviceTaintSelector_To_resource_DeviceTaintSelector(in *resourcev1alpha3.DeviceTaintSelector, out *resource.DeviceTaintSelector, s conversion.Scope) error {
|
||||
out.DeviceClassName = (*string)(unsafe.Pointer(in.DeviceClassName))
|
||||
out.Driver = (*string)(unsafe.Pointer(in.Driver))
|
||||
out.Pool = (*string)(unsafe.Pointer(in.Pool))
|
||||
out.Device = (*string)(unsafe.Pointer(in.Device))
|
||||
out.Selectors = *(*[]resource.DeviceSelector)(unsafe.Pointer(&in.Selectors))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha3_DeviceTaintSelector_To_resource_DeviceTaintSelector is an autogenerated conversion function.
|
||||
func Convert_v1alpha3_DeviceTaintSelector_To_resource_DeviceTaintSelector(in *resourcev1alpha3.DeviceTaintSelector, out *resource.DeviceTaintSelector, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha3_DeviceTaintSelector_To_resource_DeviceTaintSelector(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceTaintSelector_To_v1alpha3_DeviceTaintSelector(in *resource.DeviceTaintSelector, out *resourcev1alpha3.DeviceTaintSelector, s conversion.Scope) error {
|
||||
out.DeviceClassName = (*string)(unsafe.Pointer(in.DeviceClassName))
|
||||
out.Driver = (*string)(unsafe.Pointer(in.Driver))
|
||||
out.Pool = (*string)(unsafe.Pointer(in.Pool))
|
||||
out.Device = (*string)(unsafe.Pointer(in.Device))
|
||||
out.Selectors = *(*[]resourcev1alpha3.DeviceSelector)(unsafe.Pointer(&in.Selectors))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceTaintSelector_To_v1alpha3_DeviceTaintSelector is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceTaintSelector_To_v1alpha3_DeviceTaintSelector(in *resource.DeviceTaintSelector, out *resourcev1alpha3.DeviceTaintSelector, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceTaintSelector_To_v1alpha3_DeviceTaintSelector(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_DeviceToleration_To_resource_DeviceToleration(in *resourcev1alpha3.DeviceToleration, out *resource.DeviceToleration, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Operator = resource.DeviceTolerationOperator(in.Operator)
|
||||
out.Value = in.Value
|
||||
out.Effect = resource.DeviceTaintEffect(in.Effect)
|
||||
out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha3_DeviceToleration_To_resource_DeviceToleration is an autogenerated conversion function.
|
||||
func Convert_v1alpha3_DeviceToleration_To_resource_DeviceToleration(in *resourcev1alpha3.DeviceToleration, out *resource.DeviceToleration, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha3_DeviceToleration_To_resource_DeviceToleration(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceToleration_To_v1alpha3_DeviceToleration(in *resource.DeviceToleration, out *resourcev1alpha3.DeviceToleration, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Operator = resourcev1alpha3.DeviceTolerationOperator(in.Operator)
|
||||
out.Value = in.Value
|
||||
out.Effect = resourcev1alpha3.DeviceTaintEffect(in.Effect)
|
||||
out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceToleration_To_v1alpha3_DeviceToleration is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceToleration_To_v1alpha3_DeviceToleration(in *resource.DeviceToleration, out *resourcev1alpha3.DeviceToleration, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceToleration_To_v1alpha3_DeviceToleration(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData(in *resourcev1alpha3.NetworkDeviceData, out *resource.NetworkDeviceData, s conversion.Scope) error {
|
||||
out.InterfaceName = in.InterfaceName
|
||||
out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs))
|
||||
|
||||
71
pkg/apis/resource/v1alpha3/zz_generated.defaults.go
generated
71
pkg/apis/resource/v1alpha3/zz_generated.defaults.go
generated
@@ -30,6 +30,10 @@ import (
|
||||
// Public to allow building arbitrary schemes.
|
||||
// All generated defaulters are covering - they call all nested defaulters.
|
||||
func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.DeviceTaintRule{}, func(obj interface{}) { SetObjectDefaults_DeviceTaintRule(obj.(*resourcev1alpha3.DeviceTaintRule)) })
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.DeviceTaintRuleList{}, func(obj interface{}) {
|
||||
SetObjectDefaults_DeviceTaintRuleList(obj.(*resourcev1alpha3.DeviceTaintRuleList))
|
||||
})
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*resourcev1alpha3.ResourceClaim)) })
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*resourcev1alpha3.ResourceClaimList)) })
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.ResourceClaimTemplate{}, func(obj interface{}) {
|
||||
@@ -38,9 +42,22 @@ func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.ResourceClaimTemplateList{}, func(obj interface{}) {
|
||||
SetObjectDefaults_ResourceClaimTemplateList(obj.(*resourcev1alpha3.ResourceClaimTemplateList))
|
||||
})
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.ResourceSlice{}, func(obj interface{}) { SetObjectDefaults_ResourceSlice(obj.(*resourcev1alpha3.ResourceSlice)) })
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1alpha3.ResourceSliceList{}, func(obj interface{}) { SetObjectDefaults_ResourceSliceList(obj.(*resourcev1alpha3.ResourceSliceList)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetObjectDefaults_DeviceTaintRule(in *resourcev1alpha3.DeviceTaintRule) {
|
||||
SetDefaults_DeviceTaint(&in.Spec.Taint)
|
||||
}
|
||||
|
||||
func SetObjectDefaults_DeviceTaintRuleList(in *resourcev1alpha3.DeviceTaintRuleList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_DeviceTaintRule(a)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ResourceClaim(in *resourcev1alpha3.ResourceClaim) {
|
||||
for i := range in.Spec.Devices.Requests {
|
||||
a := &in.Spec.Devices.Requests[i]
|
||||
@@ -48,6 +65,29 @@ func SetObjectDefaults_ResourceClaim(in *resourcev1alpha3.ResourceClaim) {
|
||||
for j := range a.FirstAvailable {
|
||||
b := &a.FirstAvailable[j]
|
||||
SetDefaults_DeviceSubRequest(b)
|
||||
for k := range b.Tolerations {
|
||||
c := &b.Tolerations[k]
|
||||
if c.Operator == "" {
|
||||
c.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
for j := range a.Tolerations {
|
||||
b := &a.Tolerations[j]
|
||||
if b.Operator == "" {
|
||||
b.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.Status.Allocation != nil {
|
||||
for i := range in.Status.Allocation.Devices.Results {
|
||||
a := &in.Status.Allocation.Devices.Results[i]
|
||||
for j := range a.Tolerations {
|
||||
b := &a.Tolerations[j]
|
||||
if b.Operator == "" {
|
||||
b.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +106,18 @@ func SetObjectDefaults_ResourceClaimTemplate(in *resourcev1alpha3.ResourceClaimT
|
||||
for j := range a.FirstAvailable {
|
||||
b := &a.FirstAvailable[j]
|
||||
SetDefaults_DeviceSubRequest(b)
|
||||
for k := range b.Tolerations {
|
||||
c := &b.Tolerations[k]
|
||||
if c.Operator == "" {
|
||||
c.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
for j := range a.Tolerations {
|
||||
b := &a.Tolerations[j]
|
||||
if b.Operator == "" {
|
||||
b.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,3 +128,22 @@ func SetObjectDefaults_ResourceClaimTemplateList(in *resourcev1alpha3.ResourceCl
|
||||
SetObjectDefaults_ResourceClaimTemplate(a)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ResourceSlice(in *resourcev1alpha3.ResourceSlice) {
|
||||
for i := range in.Spec.Devices {
|
||||
a := &in.Spec.Devices[i]
|
||||
if a.Basic != nil {
|
||||
for j := range a.Basic.Taints {
|
||||
b := &a.Basic.Taints[j]
|
||||
SetDefaults_DeviceTaint(b)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ResourceSliceList(in *resourcev1alpha3.ResourceSliceList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_ResourceSlice(a)
|
||||
}
|
||||
}
|
||||
|
||||
82
pkg/apis/resource/v1beta1/zz_generated.conversion.go
generated
82
pkg/apis/resource/v1beta1/zz_generated.conversion.go
generated
@@ -251,6 +251,26 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.DeviceTaint)(nil), (*resource.DeviceTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_DeviceTaint_To_resource_DeviceTaint(a.(*resourcev1beta1.DeviceTaint), b.(*resource.DeviceTaint), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceTaint)(nil), (*resourcev1beta1.DeviceTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceTaint_To_v1beta1_DeviceTaint(a.(*resource.DeviceTaint), b.(*resourcev1beta1.DeviceTaint), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.DeviceToleration)(nil), (*resource.DeviceToleration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_DeviceToleration_To_resource_DeviceToleration(a.(*resourcev1beta1.DeviceToleration), b.(*resource.DeviceToleration), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resource.DeviceToleration)(nil), (*resourcev1beta1.DeviceToleration)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_resource_DeviceToleration_To_v1beta1_DeviceToleration(a.(*resource.DeviceToleration), b.(*resourcev1beta1.DeviceToleration), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.NetworkDeviceData)(nil), (*resource.NetworkDeviceData)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData(a.(*resourcev1beta1.NetworkDeviceData), b.(*resource.NetworkDeviceData), scope)
|
||||
}); err != nil {
|
||||
@@ -453,6 +473,7 @@ func Convert_resource_AllocationResult_To_v1beta1_AllocationResult(in *resource.
|
||||
func autoConvert_v1beta1_BasicDevice_To_resource_BasicDevice(in *resourcev1beta1.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error {
|
||||
out.Attributes = *(*map[resource.QualifiedName]resource.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
|
||||
out.Capacity = *(*map[resource.QualifiedName]resource.DeviceCapacity)(unsafe.Pointer(&in.Capacity))
|
||||
out.Taints = *(*[]resource.DeviceTaint)(unsafe.Pointer(&in.Taints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -464,6 +485,7 @@ func Convert_v1beta1_BasicDevice_To_resource_BasicDevice(in *resourcev1beta1.Bas
|
||||
func autoConvert_resource_BasicDevice_To_v1beta1_BasicDevice(in *resource.BasicDevice, out *resourcev1beta1.BasicDevice, s conversion.Scope) error {
|
||||
out.Attributes = *(*map[resourcev1beta1.QualifiedName]resourcev1beta1.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
|
||||
out.Capacity = *(*map[resourcev1beta1.QualifiedName]resourcev1beta1.DeviceCapacity)(unsafe.Pointer(&in.Capacity))
|
||||
out.Taints = *(*[]resourcev1beta1.DeviceTaint)(unsafe.Pointer(&in.Taints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -804,6 +826,7 @@ func autoConvert_v1beta1_DeviceRequest_To_resource_DeviceRequest(in *resourcev1b
|
||||
out.Count = in.Count
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.FirstAvailable = *(*[]resource.DeviceSubRequest)(unsafe.Pointer(&in.FirstAvailable))
|
||||
out.Tolerations = *(*[]resource.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -820,6 +843,7 @@ func autoConvert_resource_DeviceRequest_To_v1beta1_DeviceRequest(in *resource.De
|
||||
out.Count = in.Count
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.FirstAvailable = *(*[]resourcev1beta1.DeviceSubRequest)(unsafe.Pointer(&in.FirstAvailable))
|
||||
out.Tolerations = *(*[]resourcev1beta1.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -834,6 +858,7 @@ func autoConvert_v1beta1_DeviceRequestAllocationResult_To_resource_DeviceRequest
|
||||
out.Pool = in.Pool
|
||||
out.Device = in.Device
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.Tolerations = *(*[]resource.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -848,6 +873,7 @@ func autoConvert_resource_DeviceRequestAllocationResult_To_v1beta1_DeviceRequest
|
||||
out.Pool = in.Pool
|
||||
out.Device = in.Device
|
||||
out.AdminAccess = (*bool)(unsafe.Pointer(in.AdminAccess))
|
||||
out.Tolerations = *(*[]resourcev1beta1.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -882,6 +908,7 @@ func autoConvert_v1beta1_DeviceSubRequest_To_resource_DeviceSubRequest(in *resou
|
||||
out.Selectors = *(*[]resource.DeviceSelector)(unsafe.Pointer(&in.Selectors))
|
||||
out.AllocationMode = resource.DeviceAllocationMode(in.AllocationMode)
|
||||
out.Count = in.Count
|
||||
out.Tolerations = *(*[]resource.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -896,6 +923,7 @@ func autoConvert_resource_DeviceSubRequest_To_v1beta1_DeviceSubRequest(in *resou
|
||||
out.Selectors = *(*[]resourcev1beta1.DeviceSelector)(unsafe.Pointer(&in.Selectors))
|
||||
out.AllocationMode = resourcev1beta1.DeviceAllocationMode(in.AllocationMode)
|
||||
out.Count = in.Count
|
||||
out.Tolerations = *(*[]resourcev1beta1.DeviceToleration)(unsafe.Pointer(&in.Tolerations))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -904,6 +932,60 @@ func Convert_resource_DeviceSubRequest_To_v1beta1_DeviceSubRequest(in *resource.
|
||||
return autoConvert_resource_DeviceSubRequest_To_v1beta1_DeviceSubRequest(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_DeviceTaint_To_resource_DeviceTaint(in *resourcev1beta1.DeviceTaint, out *resource.DeviceTaint, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Value = in.Value
|
||||
out.Effect = resource.DeviceTaintEffect(in.Effect)
|
||||
out.TimeAdded = (*v1.Time)(unsafe.Pointer(in.TimeAdded))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_DeviceTaint_To_resource_DeviceTaint is an autogenerated conversion function.
|
||||
func Convert_v1beta1_DeviceTaint_To_resource_DeviceTaint(in *resourcev1beta1.DeviceTaint, out *resource.DeviceTaint, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_DeviceTaint_To_resource_DeviceTaint(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceTaint_To_v1beta1_DeviceTaint(in *resource.DeviceTaint, out *resourcev1beta1.DeviceTaint, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Value = in.Value
|
||||
out.Effect = resourcev1beta1.DeviceTaintEffect(in.Effect)
|
||||
out.TimeAdded = (*v1.Time)(unsafe.Pointer(in.TimeAdded))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceTaint_To_v1beta1_DeviceTaint is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceTaint_To_v1beta1_DeviceTaint(in *resource.DeviceTaint, out *resourcev1beta1.DeviceTaint, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceTaint_To_v1beta1_DeviceTaint(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_DeviceToleration_To_resource_DeviceToleration(in *resourcev1beta1.DeviceToleration, out *resource.DeviceToleration, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Operator = resource.DeviceTolerationOperator(in.Operator)
|
||||
out.Value = in.Value
|
||||
out.Effect = resource.DeviceTaintEffect(in.Effect)
|
||||
out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_DeviceToleration_To_resource_DeviceToleration is an autogenerated conversion function.
|
||||
func Convert_v1beta1_DeviceToleration_To_resource_DeviceToleration(in *resourcev1beta1.DeviceToleration, out *resource.DeviceToleration, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_DeviceToleration_To_resource_DeviceToleration(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_resource_DeviceToleration_To_v1beta1_DeviceToleration(in *resource.DeviceToleration, out *resourcev1beta1.DeviceToleration, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Operator = resourcev1beta1.DeviceTolerationOperator(in.Operator)
|
||||
out.Value = in.Value
|
||||
out.Effect = resourcev1beta1.DeviceTaintEffect(in.Effect)
|
||||
out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_resource_DeviceToleration_To_v1beta1_DeviceToleration is an autogenerated conversion function.
|
||||
func Convert_resource_DeviceToleration_To_v1beta1_DeviceToleration(in *resource.DeviceToleration, out *resourcev1beta1.DeviceToleration, s conversion.Scope) error {
|
||||
return autoConvert_resource_DeviceToleration_To_v1beta1_DeviceToleration(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData(in *resourcev1beta1.NetworkDeviceData, out *resource.NetworkDeviceData, s conversion.Scope) error {
|
||||
out.InterfaceName = in.InterfaceName
|
||||
out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs))
|
||||
|
||||
56
pkg/apis/resource/v1beta1/zz_generated.defaults.go
generated
56
pkg/apis/resource/v1beta1/zz_generated.defaults.go
generated
@@ -38,6 +38,8 @@ func RegisterDefaults(scheme *runtime.Scheme) error {
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1beta1.ResourceClaimTemplateList{}, func(obj interface{}) {
|
||||
SetObjectDefaults_ResourceClaimTemplateList(obj.(*resourcev1beta1.ResourceClaimTemplateList))
|
||||
})
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1beta1.ResourceSlice{}, func(obj interface{}) { SetObjectDefaults_ResourceSlice(obj.(*resourcev1beta1.ResourceSlice)) })
|
||||
scheme.AddTypeDefaultingFunc(&resourcev1beta1.ResourceSliceList{}, func(obj interface{}) { SetObjectDefaults_ResourceSliceList(obj.(*resourcev1beta1.ResourceSliceList)) })
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -48,6 +50,29 @@ func SetObjectDefaults_ResourceClaim(in *resourcev1beta1.ResourceClaim) {
|
||||
for j := range a.FirstAvailable {
|
||||
b := &a.FirstAvailable[j]
|
||||
SetDefaults_DeviceSubRequest(b)
|
||||
for k := range b.Tolerations {
|
||||
c := &b.Tolerations[k]
|
||||
if c.Operator == "" {
|
||||
c.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
for j := range a.Tolerations {
|
||||
b := &a.Tolerations[j]
|
||||
if b.Operator == "" {
|
||||
b.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.Status.Allocation != nil {
|
||||
for i := range in.Status.Allocation.Devices.Results {
|
||||
a := &in.Status.Allocation.Devices.Results[i]
|
||||
for j := range a.Tolerations {
|
||||
b := &a.Tolerations[j]
|
||||
if b.Operator == "" {
|
||||
b.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +91,18 @@ func SetObjectDefaults_ResourceClaimTemplate(in *resourcev1beta1.ResourceClaimTe
|
||||
for j := range a.FirstAvailable {
|
||||
b := &a.FirstAvailable[j]
|
||||
SetDefaults_DeviceSubRequest(b)
|
||||
for k := range b.Tolerations {
|
||||
c := &b.Tolerations[k]
|
||||
if c.Operator == "" {
|
||||
c.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
for j := range a.Tolerations {
|
||||
b := &a.Tolerations[j]
|
||||
if b.Operator == "" {
|
||||
b.Operator = "Equal"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,3 +113,22 @@ func SetObjectDefaults_ResourceClaimTemplateList(in *resourcev1beta1.ResourceCla
|
||||
SetObjectDefaults_ResourceClaimTemplate(a)
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ResourceSlice(in *resourcev1beta1.ResourceSlice) {
|
||||
for i := range in.Spec.Devices {
|
||||
a := &in.Spec.Devices[i]
|
||||
if a.Basic != nil {
|
||||
for j := range a.Basic.Taints {
|
||||
b := &a.Basic.Taints[j]
|
||||
SetDefaults_DeviceTaint(b)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func SetObjectDefaults_ResourceSliceList(in *resourcev1beta1.ResourceSliceList) {
|
||||
for i := range in.Items {
|
||||
a := &in.Items[i]
|
||||
SetObjectDefaults_ResourceSlice(a)
|
||||
}
|
||||
}
|
||||
|
||||
194
pkg/apis/resource/zz_generated.deepcopy.go
generated
194
pkg/apis/resource/zz_generated.deepcopy.go
generated
@@ -99,6 +99,13 @@ func (in *BasicDevice) DeepCopyInto(out *BasicDevice) {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]DeviceTaint, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -489,6 +496,13 @@ func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -510,6 +524,13 @@ func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocati
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -554,6 +575,13 @@ func (in *DeviceSubRequest) DeepCopyInto(out *DeviceSubRequest) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -567,6 +595,172 @@ func (in *DeviceSubRequest) DeepCopy() *DeviceSubRequest {
|
||||
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)
|
||||
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 *DeviceTaintSelector) DeepCopyInto(out *DeviceTaintSelector) {
|
||||
*out = *in
|
||||
if in.DeviceClassName != nil {
|
||||
in, out := &in.DeviceClassName, &out.DeviceClassName
|
||||
*out = new(string)
|
||||
**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
|
||||
}
|
||||
if in.Selectors != nil {
|
||||
in, out := &in.Selectors, &out.Selectors
|
||||
*out = make([]DeviceSelector, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceToleration) DeepCopyInto(out *DeviceToleration) {
|
||||
*out = *in
|
||||
if in.TolerationSeconds != nil {
|
||||
in, out := &in.TolerationSeconds, &out.TolerationSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceToleration.
|
||||
func (in *DeviceToleration) DeepCopy() *DeviceToleration {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceToleration)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
|
||||
*out = *in
|
||||
|
||||
554
pkg/generated/openapi/zz_generated.openapi.go
generated
554
pkg/generated/openapi/zz_generated.openapi.go
generated
@@ -934,6 +934,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
"k8s.io/api/resource/v1alpha3.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1alpha3_DeviceRequestAllocationResult(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceSelector": schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceSubRequest": schema_k8sio_api_resource_v1alpha3_DeviceSubRequest(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaint": schema_k8sio_api_resource_v1alpha3_DeviceTaint(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaintRule": schema_k8sio_api_resource_v1alpha3_DeviceTaintRule(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaintRuleList": schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaintRuleSpec": schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleSpec(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaintSelector": schema_k8sio_api_resource_v1alpha3_DeviceTaintSelector(ref),
|
||||
"k8s.io/api/resource/v1alpha3.DeviceToleration": schema_k8sio_api_resource_v1alpha3_DeviceToleration(ref),
|
||||
"k8s.io/api/resource/v1alpha3.NetworkDeviceData": schema_k8sio_api_resource_v1alpha3_NetworkDeviceData(ref),
|
||||
"k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1alpha3_OpaqueDeviceConfiguration(ref),
|
||||
"k8s.io/api/resource/v1alpha3.ResourceClaim": schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref),
|
||||
@@ -969,6 +975,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
"k8s.io/api/resource/v1beta1.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref),
|
||||
"k8s.io/api/resource/v1beta1.DeviceSelector": schema_k8sio_api_resource_v1beta1_DeviceSelector(ref),
|
||||
"k8s.io/api/resource/v1beta1.DeviceSubRequest": schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref),
|
||||
"k8s.io/api/resource/v1beta1.DeviceTaint": schema_k8sio_api_resource_v1beta1_DeviceTaint(ref),
|
||||
"k8s.io/api/resource/v1beta1.DeviceToleration": schema_k8sio_api_resource_v1beta1_DeviceToleration(ref),
|
||||
"k8s.io/api/resource/v1beta1.NetworkDeviceData": schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref),
|
||||
"k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref),
|
||||
"k8s.io/api/resource/v1beta1.ResourceClaim": schema_k8sio_api_resource_v1beta1_ResourceClaim(ref),
|
||||
@@ -47134,11 +47142,30 @@ func schema_k8sio_api_resource_v1alpha3_BasicDevice(ref common.ReferenceCallback
|
||||
},
|
||||
},
|
||||
},
|
||||
"taints": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaint"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceAttribute", "k8s.io/apimachinery/pkg/api/resource.Quantity"},
|
||||
"k8s.io/api/resource/v1alpha3.DeviceAttribute", "k8s.io/api/resource/v1alpha3.DeviceTaint", "k8s.io/apimachinery/pkg/api/resource.Quantity"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47763,12 +47790,31 @@ func schema_k8sio_api_resource_v1alpha3_DeviceRequest(ref common.ReferenceCallba
|
||||
},
|
||||
},
|
||||
},
|
||||
"tolerations": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceToleration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"name"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceSelector", "k8s.io/api/resource/v1alpha3.DeviceSubRequest"},
|
||||
"k8s.io/api/resource/v1alpha3.DeviceSelector", "k8s.io/api/resource/v1alpha3.DeviceSubRequest", "k8s.io/api/resource/v1alpha3.DeviceToleration"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47818,10 +47864,31 @@ func schema_k8sio_api_resource_v1alpha3_DeviceRequestAllocationResult(ref common
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"tolerations": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceToleration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"request", "driver", "pool", "device"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceToleration"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47902,15 +47969,317 @@ func schema_k8sio_api_resource_v1alpha3_DeviceSubRequest(ref common.ReferenceCal
|
||||
Format: "int64",
|
||||
},
|
||||
},
|
||||
"tolerations": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceToleration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"name", "deviceClassName"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceSelector", "k8s.io/api/resource/v1alpha3.DeviceToleration"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_DeviceTaint(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"key": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The taint key to be applied to a device. Must be a label name.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"value": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The taint value corresponding to the taint key. Must be a label value.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"effect": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.\n\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the device taint.\n - `\"NoSchedule\"` 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.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"NoExecute", "NoSchedule"},
|
||||
},
|
||||
},
|
||||
"timeAdded": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.",
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"key", "effect"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_DeviceTaintRule(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"kind": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Kind is a string value representing the REST resource this object represents. 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{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"apiVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "APIVersion defines the versioned schema of this representation of an object. 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{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"metadata": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Standard object metadata",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
|
||||
},
|
||||
},
|
||||
"spec": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Spec specifies the selector and one taint.\n\nChanging the spec automatically increments the metadata.generation number.",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaintRuleSpec"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"spec"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaintRuleSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "DeviceTaintRuleList is a collection of DeviceTaintRules.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"kind": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Kind is a string value representing the REST resource this object represents. 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{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"apiVersion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "APIVersion defines the versioned schema of this representation of an object. 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{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"metadata": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Standard list metadata",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
|
||||
},
|
||||
},
|
||||
"items": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Items is the list of DeviceTaintRules.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaintRule"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"items"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaintRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_DeviceTaintRuleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "DeviceTaintRuleSpec specifies the selector and one taint.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"deviceSelector": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.",
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaintSelector"),
|
||||
},
|
||||
},
|
||||
"taint": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The taint that gets applied to matching devices.",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceTaint"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"taint"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceTaint", "k8s.io/api/resource/v1alpha3.DeviceTaintSelector"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_DeviceTaintSelector(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to. The empty selector matches all devices. Without a selector, no devices are matched.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"deviceClassName": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If DeviceClassName is set, the selectors defined there must be satisfied by a device to be selected. This field corresponds to class.metadata.name.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"driver": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If driver is set, only devices from that driver are selected. This fields corresponds to slice.spec.driver.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"pool": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"device": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"selectors": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Selectors contains the same selection criteria as a ResourceClaim. Currently, CEL expressions are supported. All of these selectors must be satisfied.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1alpha3.DeviceSelector"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1alpha3.DeviceSelector"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_DeviceToleration(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"key": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"operator": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.\n\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`",
|
||||
Default: "Equal",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"Equal", "Exists"},
|
||||
},
|
||||
},
|
||||
"value": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"effect": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.\n\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the device taint.\n - `\"NoSchedule\"` 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.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"NoExecute", "NoSchedule"},
|
||||
},
|
||||
},
|
||||
"tolerationSeconds": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>.",
|
||||
Type: []string{"integer"},
|
||||
Format: "int64",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1alpha3_NetworkDeviceData(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
@@ -48693,11 +49062,30 @@ func schema_k8sio_api_resource_v1beta1_BasicDevice(ref common.ReferenceCallback)
|
||||
},
|
||||
},
|
||||
},
|
||||
"taints": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1beta1.DeviceTaint"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1beta1.DeviceAttribute", "k8s.io/api/resource/v1beta1.DeviceCapacity"},
|
||||
"k8s.io/api/resource/v1beta1.DeviceAttribute", "k8s.io/api/resource/v1beta1.DeviceCapacity", "k8s.io/api/resource/v1beta1.DeviceTaint"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49344,12 +49732,31 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequest(ref common.ReferenceCallbac
|
||||
},
|
||||
},
|
||||
},
|
||||
"tolerations": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1beta1.DeviceToleration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"name"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1beta1.DeviceSelector", "k8s.io/api/resource/v1beta1.DeviceSubRequest"},
|
||||
"k8s.io/api/resource/v1beta1.DeviceSelector", "k8s.io/api/resource/v1beta1.DeviceSubRequest", "k8s.io/api/resource/v1beta1.DeviceToleration"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49399,10 +49806,31 @@ func schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref common.
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"tolerations": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1beta1.DeviceToleration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"request", "driver", "pool", "device"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1beta1.DeviceToleration"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49483,12 +49911,128 @@ func schema_k8sio_api_resource_v1beta1_DeviceSubRequest(ref common.ReferenceCall
|
||||
Format: "int64",
|
||||
},
|
||||
},
|
||||
"tolerations": {
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-kubernetes-list-type": "atomic",
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/api/resource/v1beta1.DeviceToleration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"name", "deviceClassName"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/resource/v1beta1.DeviceSelector"},
|
||||
"k8s.io/api/resource/v1beta1.DeviceSelector", "k8s.io/api/resource/v1beta1.DeviceToleration"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1beta1_DeviceTaint(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"key": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The taint key to be applied to a device. Must be a label name.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"value": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The taint value corresponding to the taint key. Must be a label value.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"effect": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "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.\n\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the device taint.\n - `\"NoSchedule\"` 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.",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"NoExecute", "NoSchedule"},
|
||||
},
|
||||
},
|
||||
"timeAdded": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.",
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"key", "effect"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_api_resource_v1beta1_DeviceToleration(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"key": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"operator": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.\n\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`",
|
||||
Default: "Equal",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"Equal", "Exists"},
|
||||
},
|
||||
},
|
||||
"value": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"effect": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.\n\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the device taint.\n - `\"NoSchedule\"` 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.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"NoExecute", "NoSchedule"},
|
||||
},
|
||||
},
|
||||
"tolerationSeconds": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>.",
|
||||
Type: []string{"integer"},
|
||||
Format: "int64",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2173
staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go
generated
2173
staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@@ -113,6 +113,18 @@ message BasicDevice {
|
||||
//
|
||||
// +optional
|
||||
map<string, .k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 2;
|
||||
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 8.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceTaint taints = 3;
|
||||
}
|
||||
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
@@ -520,6 +532,32 @@ message DeviceRequest {
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPrioritizedList
|
||||
repeated DeviceSubRequest firstAvailable = 7;
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 8;
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResult contains the allocation result for one request.
|
||||
@@ -571,6 +609,19 @@ message DeviceRequestAllocationResult {
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
optional bool adminAccess = 5;
|
||||
|
||||
// A copy of all tolerations specified in the request at the time
|
||||
// when the device got allocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 6;
|
||||
}
|
||||
|
||||
// DeviceSelector must have exactly one field set.
|
||||
@@ -652,6 +703,190 @@ message DeviceSubRequest {
|
||||
// +optional
|
||||
// +oneOf=AllocationMode
|
||||
optional int64 count = 5;
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 7;
|
||||
}
|
||||
|
||||
// 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.
|
||||
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 NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// +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;
|
||||
}
|
||||
|
||||
// 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 satified 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;
|
||||
}
|
||||
|
||||
// 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 DeviceClassName is set, the selectors defined there must be
|
||||
// satisfied by a device to be selected. This field corresponds
|
||||
// to class.metadata.name.
|
||||
//
|
||||
// +optional
|
||||
optional string deviceClassName = 1;
|
||||
|
||||
// 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;
|
||||
|
||||
// Selectors contains the same selection criteria as a ResourceClaim.
|
||||
// Currently, CEL expressions are supported. All of these selectors
|
||||
// must be satisfied.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceSelector selectors = 5;
|
||||
}
|
||||
|
||||
// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
|
||||
// the triple <key,value,effect> using the matching operator <operator>.
|
||||
message DeviceToleration {
|
||||
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
|
||||
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +optional
|
||||
optional string key = 1;
|
||||
|
||||
// Operator represents a key's relationship to the value.
|
||||
// Valid operators are Exists and Equal. Defaults to Equal.
|
||||
// Exists is equivalent to wildcard for value, so that a ResourceClaim can
|
||||
// tolerate all taints of a particular category.
|
||||
//
|
||||
// +optional
|
||||
// +default="Equal"
|
||||
optional string operator = 2;
|
||||
|
||||
// Value is the taint value the toleration matches to.
|
||||
// If the operator is Exists, the value must be empty, otherwise just a regular string.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
optional string value = 3;
|
||||
|
||||
// Effect indicates the taint effect to match. Empty means match all taint effects.
|
||||
// When specified, allowed values are NoSchedule and NoExecute.
|
||||
//
|
||||
// +optional
|
||||
optional string effect = 4;
|
||||
|
||||
// TolerationSeconds represents the period of time the toleration (which must be
|
||||
// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
|
||||
// it is not set, which means tolerate the taint forever (do not evict). Zero and
|
||||
// negative values will be treated as 0 (evict immediately) by the system.
|
||||
// If larger than zero, the time when the pod needs to be evicted is calculated as <time when
|
||||
// taint was adedd> + <toleration seconds>.
|
||||
//
|
||||
// +optional
|
||||
optional int64 tolerationSeconds = 5;
|
||||
}
|
||||
|
||||
// NetworkDeviceData provides network-related details for the allocated device.
|
||||
|
||||
@@ -55,6 +55,7 @@ var map_BasicDevice = map[string]string{
|
||||
"": "BasicDevice defines one device instance.",
|
||||
"attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"taints": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (BasicDevice) SwaggerDoc() map[string]string {
|
||||
@@ -198,6 +199,7 @@ var map_DeviceRequest = map[string]string{
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.",
|
||||
"adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"firstAvailable": "FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used.\n\nThis field may only be set in the entries of DeviceClaim.Requests.\n\nDRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.",
|
||||
"tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceRequest) SwaggerDoc() map[string]string {
|
||||
@@ -211,6 +213,7 @@ var map_DeviceRequestAllocationResult = map[string]string{
|
||||
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
|
||||
"device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
|
||||
"adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"tolerations": "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string {
|
||||
@@ -233,12 +236,81 @@ var map_DeviceSubRequest = map[string]string{
|
||||
"selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.",
|
||||
"allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
|
||||
"tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceSubRequest) SwaggerDoc() map[string]string {
|
||||
return map_DeviceSubRequest
|
||||
}
|
||||
|
||||
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. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.",
|
||||
"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.",
|
||||
}
|
||||
|
||||
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 satified 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_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.",
|
||||
"deviceClassName": "If DeviceClassName is set, the selectors defined there must be satisfied by a device to be selected. This field corresponds to class.metadata.name.",
|
||||
"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.",
|
||||
"selectors": "Selectors contains the same selection criteria as a ResourceClaim. Currently, CEL expressions are supported. All of these selectors must be satisfied.",
|
||||
}
|
||||
|
||||
func (DeviceTaintSelector) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintSelector
|
||||
}
|
||||
|
||||
var map_DeviceToleration = map[string]string{
|
||||
"": "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
|
||||
"key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
|
||||
"operator": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.",
|
||||
"value": "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
|
||||
"effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.",
|
||||
"tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>.",
|
||||
}
|
||||
|
||||
func (DeviceToleration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceToleration
|
||||
}
|
||||
|
||||
var map_NetworkDeviceData = map[string]string{
|
||||
"": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.",
|
||||
"interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.",
|
||||
|
||||
@@ -100,6 +100,13 @@ func (in *BasicDevice) DeepCopyInto(out *BasicDevice) {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]DeviceTaint, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -473,6 +480,13 @@ func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -494,6 +508,13 @@ func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocati
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -538,6 +559,13 @@ func (in *DeviceSubRequest) DeepCopyInto(out *DeviceSubRequest) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -551,6 +579,172 @@ func (in *DeviceSubRequest) DeepCopy() *DeviceSubRequest {
|
||||
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)
|
||||
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 *DeviceTaintSelector) DeepCopyInto(out *DeviceTaintSelector) {
|
||||
*out = *in
|
||||
if in.DeviceClassName != nil {
|
||||
in, out := &in.DeviceClassName, &out.DeviceClassName
|
||||
*out = new(string)
|
||||
**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
|
||||
}
|
||||
if in.Selectors != nil {
|
||||
in, out := &in.Selectors, &out.Selectors
|
||||
*out = make([]DeviceSelector, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceToleration) DeepCopyInto(out *DeviceToleration) {
|
||||
*out = *in
|
||||
if in.TolerationSeconds != nil {
|
||||
in, out := &in.TolerationSeconds, &out.TolerationSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceToleration.
|
||||
func (in *DeviceToleration) DeepCopy() *DeviceToleration {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceToleration)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
|
||||
*out = *in
|
||||
|
||||
@@ -73,6 +73,42 @@ func (in *DeviceClassList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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 *ResourceClaim) APILifecycleIntroduced() (major, minor int) {
|
||||
|
||||
1137
staging/src/k8s.io/api/resource/v1beta1/generated.pb.go
generated
1137
staging/src/k8s.io/api/resource/v1beta1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@@ -113,6 +113,18 @@ message BasicDevice {
|
||||
//
|
||||
// +optional
|
||||
map<string, DeviceCapacity> capacity = 2;
|
||||
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 8.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceTaint taints = 3;
|
||||
}
|
||||
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
@@ -529,6 +541,32 @@ message DeviceRequest {
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPrioritizedList
|
||||
repeated DeviceSubRequest firstAvailable = 7;
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 8;
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResult contains the allocation result for one request.
|
||||
@@ -580,6 +618,19 @@ message DeviceRequestAllocationResult {
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
optional bool adminAccess = 5;
|
||||
|
||||
// A copy of all tolerations specified in the request at the time
|
||||
// when the device got allocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 6;
|
||||
}
|
||||
|
||||
// DeviceSelector must have exactly one field set.
|
||||
@@ -661,6 +712,105 @@ message DeviceSubRequest {
|
||||
// +optional
|
||||
// +oneOf=AllocationMode
|
||||
optional int64 count = 5;
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 7;
|
||||
}
|
||||
|
||||
// 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 NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// +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;
|
||||
}
|
||||
|
||||
// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
|
||||
// the triple <key,value,effect> using the matching operator <operator>.
|
||||
message DeviceToleration {
|
||||
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
|
||||
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +optional
|
||||
optional string key = 1;
|
||||
|
||||
// Operator represents a key's relationship to the value.
|
||||
// Valid operators are Exists and Equal. Defaults to Equal.
|
||||
// Exists is equivalent to wildcard for value, so that a ResourceClaim can
|
||||
// tolerate all taints of a particular category.
|
||||
//
|
||||
// +optional
|
||||
// +default="Equal"
|
||||
optional string operator = 2;
|
||||
|
||||
// Value is the taint value the toleration matches to.
|
||||
// If the operator is Exists, the value must be empty, otherwise just a regular string.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
optional string value = 3;
|
||||
|
||||
// Effect indicates the taint effect to match. Empty means match all taint effects.
|
||||
// When specified, allowed values are NoSchedule and NoExecute.
|
||||
//
|
||||
// +optional
|
||||
optional string effect = 4;
|
||||
|
||||
// TolerationSeconds represents the period of time the toleration (which must be
|
||||
// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
|
||||
// it is not set, which means tolerate the taint forever (do not evict). Zero and
|
||||
// negative values will be treated as 0 (evict immediately) by the system.
|
||||
// If larger than zero, the time when the pod needs to be evicted is calculated as <time when
|
||||
// taint was adedd> + <toleration seconds>.
|
||||
//
|
||||
// +optional
|
||||
optional int64 tolerationSeconds = 5;
|
||||
}
|
||||
|
||||
// NetworkDeviceData provides network-related details for the allocated device.
|
||||
|
||||
@@ -55,6 +55,7 @@ var map_BasicDevice = map[string]string{
|
||||
"": "BasicDevice defines one device instance.",
|
||||
"attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"taints": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (BasicDevice) SwaggerDoc() map[string]string {
|
||||
@@ -207,6 +208,7 @@ var map_DeviceRequest = map[string]string{
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.",
|
||||
"adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"firstAvailable": "FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used.\n\nThis field may only be set in the entries of DeviceClaim.Requests.\n\nDRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.",
|
||||
"tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceRequest) SwaggerDoc() map[string]string {
|
||||
@@ -220,6 +222,7 @@ var map_DeviceRequestAllocationResult = map[string]string{
|
||||
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
|
||||
"device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
|
||||
"adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"tolerations": "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string {
|
||||
@@ -242,12 +245,38 @@ var map_DeviceSubRequest = map[string]string{
|
||||
"selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered.",
|
||||
"allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This subrequest is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
|
||||
"tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceSubRequest) SwaggerDoc() map[string]string {
|
||||
return map_DeviceSubRequest
|
||||
}
|
||||
|
||||
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. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.",
|
||||
"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_DeviceToleration = map[string]string{
|
||||
"": "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
|
||||
"key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
|
||||
"operator": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.",
|
||||
"value": "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
|
||||
"effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.",
|
||||
"tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>.",
|
||||
}
|
||||
|
||||
func (DeviceToleration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceToleration
|
||||
}
|
||||
|
||||
var map_NetworkDeviceData = map[string]string{
|
||||
"": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.",
|
||||
"interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.",
|
||||
|
||||
@@ -99,6 +99,13 @@ func (in *BasicDevice) DeepCopyInto(out *BasicDevice) {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]DeviceTaint, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -489,6 +496,13 @@ func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -510,6 +524,13 @@ func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocati
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -554,6 +575,13 @@ func (in *DeviceSubRequest) DeepCopyInto(out *DeviceSubRequest) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -567,6 +595,47 @@ func (in *DeviceSubRequest) DeepCopy() *DeviceSubRequest {
|
||||
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 *DeviceToleration) DeepCopyInto(out *DeviceToleration) {
|
||||
*out = *in
|
||||
if in.TolerationSeconds != nil {
|
||||
in, out := &in.TolerationSeconds, &out.TolerationSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceToleration.
|
||||
func (in *DeviceToleration) DeepCopy() *DeviceToleration {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceToleration)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
|
||||
*out = *in
|
||||
|
||||
67
staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.DeviceTaintRule.json
vendored
Normal file
67
staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.DeviceTaintRule.json
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"kind": "DeviceTaintRule",
|
||||
"apiVersion": "resource.k8s.io/v1alpha3",
|
||||
"metadata": {
|
||||
"name": "nameValue",
|
||||
"generateName": "generateNameValue",
|
||||
"namespace": "namespaceValue",
|
||||
"selfLink": "selfLinkValue",
|
||||
"uid": "uidValue",
|
||||
"resourceVersion": "resourceVersionValue",
|
||||
"generation": 7,
|
||||
"creationTimestamp": "2008-01-01T01:01:01Z",
|
||||
"deletionTimestamp": "2009-01-01T01:01:01Z",
|
||||
"deletionGracePeriodSeconds": 10,
|
||||
"labels": {
|
||||
"labelsKey": "labelsValue"
|
||||
},
|
||||
"annotations": {
|
||||
"annotationsKey": "annotationsValue"
|
||||
},
|
||||
"ownerReferences": [
|
||||
{
|
||||
"apiVersion": "apiVersionValue",
|
||||
"kind": "kindValue",
|
||||
"name": "nameValue",
|
||||
"uid": "uidValue",
|
||||
"controller": true,
|
||||
"blockOwnerDeletion": true
|
||||
}
|
||||
],
|
||||
"finalizers": [
|
||||
"finalizersValue"
|
||||
],
|
||||
"managedFields": [
|
||||
{
|
||||
"manager": "managerValue",
|
||||
"operation": "operationValue",
|
||||
"apiVersion": "apiVersionValue",
|
||||
"time": "2004-01-01T01:01:01Z",
|
||||
"fieldsType": "fieldsTypeValue",
|
||||
"fieldsV1": {},
|
||||
"subresource": "subresourceValue"
|
||||
}
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"deviceSelector": {
|
||||
"deviceClassName": "deviceClassNameValue",
|
||||
"driver": "driverValue",
|
||||
"pool": "poolValue",
|
||||
"device": "deviceValue",
|
||||
"selectors": [
|
||||
{
|
||||
"cel": {
|
||||
"expression": "expressionValue"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"taint": {
|
||||
"key": "keyValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"timeAdded": "2004-01-01T01:01:01Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.DeviceTaintRule.pb
vendored
Normal file
BIN
staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.DeviceTaintRule.pb
vendored
Normal file
Binary file not shown.
48
staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.DeviceTaintRule.yaml
vendored
Normal file
48
staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.DeviceTaintRule.yaml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: resource.k8s.io/v1alpha3
|
||||
kind: DeviceTaintRule
|
||||
metadata:
|
||||
annotations:
|
||||
annotationsKey: annotationsValue
|
||||
creationTimestamp: "2008-01-01T01:01:01Z"
|
||||
deletionGracePeriodSeconds: 10
|
||||
deletionTimestamp: "2009-01-01T01:01:01Z"
|
||||
finalizers:
|
||||
- finalizersValue
|
||||
generateName: generateNameValue
|
||||
generation: 7
|
||||
labels:
|
||||
labelsKey: labelsValue
|
||||
managedFields:
|
||||
- apiVersion: apiVersionValue
|
||||
fieldsType: fieldsTypeValue
|
||||
fieldsV1: {}
|
||||
manager: managerValue
|
||||
operation: operationValue
|
||||
subresource: subresourceValue
|
||||
time: "2004-01-01T01:01:01Z"
|
||||
name: nameValue
|
||||
namespace: namespaceValue
|
||||
ownerReferences:
|
||||
- apiVersion: apiVersionValue
|
||||
blockOwnerDeletion: true
|
||||
controller: true
|
||||
kind: kindValue
|
||||
name: nameValue
|
||||
uid: uidValue
|
||||
resourceVersion: resourceVersionValue
|
||||
selfLink: selfLinkValue
|
||||
uid: uidValue
|
||||
spec:
|
||||
deviceSelector:
|
||||
device: deviceValue
|
||||
deviceClassName: deviceClassNameValue
|
||||
driver: driverValue
|
||||
pool: poolValue
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
taint:
|
||||
effect: effectValue
|
||||
key: keyValue
|
||||
timeAdded: "2004-01-01T01:01:01Z"
|
||||
value: valueValue
|
||||
@@ -71,7 +71,25 @@
|
||||
}
|
||||
],
|
||||
"allocationMode": "allocationModeValue",
|
||||
"count": 5
|
||||
"count": 5,
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -115,7 +133,16 @@
|
||||
"driver": "driverValue",
|
||||
"pool": "poolValue",
|
||||
"device": "deviceValue",
|
||||
"adminAccess": true
|
||||
"adminAccess": true,
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"config": [
|
||||
|
||||
Binary file not shown.
@@ -63,10 +63,22 @@ spec:
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
name: nameValue
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
status:
|
||||
allocation:
|
||||
devices:
|
||||
@@ -89,6 +101,12 @@ status:
|
||||
driver: driverValue
|
||||
pool: poolValue
|
||||
request: requestValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
nodeSelector:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
|
||||
@@ -114,7 +114,25 @@
|
||||
}
|
||||
],
|
||||
"allocationMode": "allocationModeValue",
|
||||
"count": 5
|
||||
"count": 5,
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -96,7 +96,19 @@ spec:
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
name: nameValue
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
|
||||
@@ -90,7 +90,15 @@
|
||||
},
|
||||
"capacity": {
|
||||
"capacityKey": "0"
|
||||
}
|
||||
},
|
||||
"taints": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"timeAdded": "2004-01-01T01:01:01Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Binary file not shown.
@@ -44,6 +44,11 @@ spec:
|
||||
version: versionValue
|
||||
capacity:
|
||||
capacityKey: "0"
|
||||
taints:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
timeAdded: "2004-01-01T01:01:01Z"
|
||||
value: valueValue
|
||||
name: nameValue
|
||||
driver: driverValue
|
||||
nodeName: nodeNameValue
|
||||
|
||||
@@ -71,7 +71,25 @@
|
||||
}
|
||||
],
|
||||
"allocationMode": "allocationModeValue",
|
||||
"count": 5
|
||||
"count": 5,
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -115,7 +133,16 @@
|
||||
"driver": "driverValue",
|
||||
"pool": "poolValue",
|
||||
"device": "deviceValue",
|
||||
"adminAccess": true
|
||||
"adminAccess": true,
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"config": [
|
||||
|
||||
Binary file not shown.
@@ -63,10 +63,22 @@ spec:
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
name: nameValue
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
status:
|
||||
allocation:
|
||||
devices:
|
||||
@@ -89,6 +101,12 @@ status:
|
||||
driver: driverValue
|
||||
pool: poolValue
|
||||
request: requestValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
nodeSelector:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
|
||||
@@ -114,7 +114,25 @@
|
||||
}
|
||||
],
|
||||
"allocationMode": "allocationModeValue",
|
||||
"count": 5
|
||||
"count": 5,
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tolerations": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"operator": "operatorValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"tolerationSeconds": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -96,7 +96,19 @@ spec:
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
name: nameValue
|
||||
selectors:
|
||||
- cel:
|
||||
expression: expressionValue
|
||||
tolerations:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
operator: operatorValue
|
||||
tolerationSeconds: 5
|
||||
value: valueValue
|
||||
|
||||
@@ -92,7 +92,15 @@
|
||||
"capacityKey": {
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"taints": [
|
||||
{
|
||||
"key": "keyValue",
|
||||
"value": "valueValue",
|
||||
"effect": "effectValue",
|
||||
"timeAdded": "2004-01-01T01:01:01Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Binary file not shown.
@@ -45,6 +45,11 @@ spec:
|
||||
capacity:
|
||||
capacityKey:
|
||||
value: "0"
|
||||
taints:
|
||||
- effect: effectValue
|
||||
key: keyValue
|
||||
timeAdded: "2004-01-01T01:01:01Z"
|
||||
value: valueValue
|
||||
name: nameValue
|
||||
driver: driverValue
|
||||
nodeName: nodeNameValue
|
||||
|
||||
@@ -12581,6 +12581,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: taints
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@@ -12759,6 +12765,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult
|
||||
map:
|
||||
fields:
|
||||
@@ -12781,6 +12793,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@@ -12810,6 +12828,96 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: timeAdded
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRule
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
type:
|
||||
scalar: string
|
||||
- name: kind
|
||||
type:
|
||||
scalar: string
|
||||
- name: metadata
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||
default: {}
|
||||
- name: spec
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
|
||||
map:
|
||||
fields:
|
||||
- name: deviceSelector
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintSelector
|
||||
- name: taint
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintSelector
|
||||
map:
|
||||
fields:
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
- name: deviceClassName
|
||||
type:
|
||||
scalar: string
|
||||
- name: driver
|
||||
type:
|
||||
scalar: string
|
||||
- name: pool
|
||||
type:
|
||||
scalar: string
|
||||
- name: selectors
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
- name: operator
|
||||
type:
|
||||
scalar: string
|
||||
default: Equal
|
||||
- name: tolerationSeconds
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha3.NetworkDeviceData
|
||||
map:
|
||||
fields:
|
||||
@@ -13043,6 +13151,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceCapacity
|
||||
- name: taints
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceTaint
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.CELDeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@@ -13227,6 +13341,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult
|
||||
map:
|
||||
fields:
|
||||
@@ -13249,6 +13369,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@@ -13278,6 +13404,48 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceTaint
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: timeAdded
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
- name: operator
|
||||
type:
|
||||
scalar: string
|
||||
default: Equal
|
||||
- name: tolerationSeconds
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1beta1.NetworkDeviceData
|
||||
map:
|
||||
fields:
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
type BasicDeviceApplyConfiguration struct {
|
||||
Attributes map[resourcev1alpha3.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
|
||||
Capacity map[resourcev1alpha3.QualifiedName]resource.Quantity `json:"capacity,omitempty"`
|
||||
Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"`
|
||||
}
|
||||
|
||||
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
|
||||
@@ -63,3 +64,16 @@ func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1alpha
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTaints adds the given value to the Taints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Taints field.
|
||||
func (b *BasicDeviceApplyConfiguration) WithTaints(values ...*DeviceTaintApplyConfiguration) *BasicDeviceApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTaints")
|
||||
}
|
||||
b.Taints = append(b.Taints, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ type DeviceRequestApplyConfiguration struct {
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
|
||||
@@ -105,3 +106,16 @@ func (b *DeviceRequestApplyConfiguration) WithFirstAvailable(values ...*DeviceSu
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *DeviceRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@ package v1alpha3
|
||||
// DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use
|
||||
// with apply.
|
||||
type DeviceRequestAllocationResultApplyConfiguration struct {
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@@ -73,3 +74,16 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value
|
||||
b.AdminAccess = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ type DeviceSubRequestApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1alpha3.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@@ -82,3 +83,16 @@ func (b *DeviceSubRequestApplyConfiguration) WithCount(value int64) *DeviceSubRe
|
||||
b.Count = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintApplyConfiguration represents a declarative configuration of the DeviceTaint type for use
|
||||
// with apply.
|
||||
type DeviceTaintApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1alpha3.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TimeAdded *v1.Time `json:"timeAdded,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintApplyConfiguration constructs a declarative configuration of the DeviceTaint type for use with
|
||||
// apply.
|
||||
func DeviceTaint() *DeviceTaintApplyConfiguration {
|
||||
return &DeviceTaintApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Key field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithKey(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithValue(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Effect field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithEffect(value resourcev1alpha3.DeviceTaintEffect) *DeviceTaintApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeAdded sets the TimeAdded field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TimeAdded field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithTimeAdded(value v1.Time) *DeviceTaintApplyConfiguration {
|
||||
b.TimeAdded = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleApplyConfiguration represents a declarative configuration of the DeviceTaintRule type for use
|
||||
// with apply.
|
||||
type DeviceTaintRuleApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *DeviceTaintRuleSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintRule constructs a declarative configuration of the DeviceTaintRule type for use with
|
||||
// apply.
|
||||
func DeviceTaintRule(name string) *DeviceTaintRuleApplyConfiguration {
|
||||
b := &DeviceTaintRuleApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("DeviceTaintRule")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDeviceTaintRule extracts the applied configuration owned by fieldManager from
|
||||
// deviceTaintRule. If no managedFields are found in deviceTaintRule for fieldManager, a
|
||||
// DeviceTaintRuleApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// deviceTaintRule must be a unmodified DeviceTaintRule API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDeviceTaintRule provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDeviceTaintRule(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
return extractDeviceTaintRule(deviceTaintRule, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractDeviceTaintRuleStatus is the same as ExtractDeviceTaintRule except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractDeviceTaintRuleStatus(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
return extractDeviceTaintRule(deviceTaintRule, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractDeviceTaintRule(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string, subresource string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
b := &DeviceTaintRuleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(deviceTaintRule, internal.Parser().Type("io.k8s.api.resource.v1alpha3.DeviceTaintRule"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(deviceTaintRule.Name)
|
||||
|
||||
b.WithKind("DeviceTaintRule")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithKind(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithAPIVersion(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithName(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithGenerateName(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithNamespace(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithUID(value types.UID) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithResourceVersion(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithGeneration(value int64) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithLabels(entries map[string]string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithAnnotations(entries map[string]string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithFinalizers(values ...string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *DeviceTaintRuleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithSpec(value *DeviceTaintRuleSpecApplyConfiguration) *DeviceTaintRuleApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// DeviceTaintRuleSpecApplyConfiguration represents a declarative configuration of the DeviceTaintRuleSpec type for use
|
||||
// with apply.
|
||||
type DeviceTaintRuleSpecApplyConfiguration struct {
|
||||
DeviceSelector *DeviceTaintSelectorApplyConfiguration `json:"deviceSelector,omitempty"`
|
||||
Taint *DeviceTaintApplyConfiguration `json:"taint,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintRuleSpecApplyConfiguration constructs a declarative configuration of the DeviceTaintRuleSpec type for use with
|
||||
// apply.
|
||||
func DeviceTaintRuleSpec() *DeviceTaintRuleSpecApplyConfiguration {
|
||||
return &DeviceTaintRuleSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDeviceSelector sets the DeviceSelector field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeviceSelector field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleSpecApplyConfiguration) WithDeviceSelector(value *DeviceTaintSelectorApplyConfiguration) *DeviceTaintRuleSpecApplyConfiguration {
|
||||
b.DeviceSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTaint sets the Taint field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Taint field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleSpecApplyConfiguration) WithTaint(value *DeviceTaintApplyConfiguration) *DeviceTaintRuleSpecApplyConfiguration {
|
||||
b.Taint = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// DeviceTaintSelectorApplyConfiguration represents a declarative configuration of the DeviceTaintSelector type for use
|
||||
// with apply.
|
||||
type DeviceTaintSelectorApplyConfiguration struct {
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintSelectorApplyConfiguration constructs a declarative configuration of the DeviceTaintSelector type for use with
|
||||
// apply.
|
||||
func DeviceTaintSelector() *DeviceTaintSelectorApplyConfiguration {
|
||||
return &DeviceTaintSelectorApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDeviceClassName sets the DeviceClassName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeviceClassName field is set to the value of the last call.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithDeviceClassName(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.DeviceClassName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDriver sets the Driver field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Driver field is set to the value of the last call.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithDriver(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.Driver = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPool sets the Pool field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Pool field is set to the value of the last call.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithPool(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.Pool = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDevice sets the Device field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Device field is set to the value of the last call.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithDevice(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.Device = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSelectors adds the given value to the Selectors field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Selectors field.
|
||||
func (b *DeviceTaintSelectorApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceTaintSelectorApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSelectors")
|
||||
}
|
||||
b.Selectors = append(b.Selectors, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
)
|
||||
|
||||
// DeviceTolerationApplyConfiguration represents a declarative configuration of the DeviceToleration type for use
|
||||
// with apply.
|
||||
type DeviceTolerationApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Operator *resourcev1alpha3.DeviceTolerationOperator `json:"operator,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1alpha3.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTolerationApplyConfiguration constructs a declarative configuration of the DeviceToleration type for use with
|
||||
// apply.
|
||||
func DeviceToleration() *DeviceTolerationApplyConfiguration {
|
||||
return &DeviceTolerationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Key field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithKey(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOperator sets the Operator field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Operator field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithOperator(value resourcev1alpha3.DeviceTolerationOperator) *DeviceTolerationApplyConfiguration {
|
||||
b.Operator = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithValue(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Effect field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithEffect(value resourcev1alpha3.DeviceTaintEffect) *DeviceTolerationApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerationSeconds sets the TolerationSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TolerationSeconds field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithTolerationSeconds(value int64) *DeviceTolerationApplyConfiguration {
|
||||
b.TolerationSeconds = &value
|
||||
return b
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
type BasicDeviceApplyConfiguration struct {
|
||||
Attributes map[resourcev1beta1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
|
||||
Capacity map[resourcev1beta1.QualifiedName]DeviceCapacityApplyConfiguration `json:"capacity,omitempty"`
|
||||
Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"`
|
||||
}
|
||||
|
||||
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
|
||||
@@ -62,3 +63,16 @@ func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1beta1
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTaints adds the given value to the Taints field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Taints field.
|
||||
func (b *BasicDeviceApplyConfiguration) WithTaints(values ...*DeviceTaintApplyConfiguration) *BasicDeviceApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTaints")
|
||||
}
|
||||
b.Taints = append(b.Taints, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ type DeviceRequestApplyConfiguration struct {
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
|
||||
@@ -105,3 +106,16 @@ func (b *DeviceRequestApplyConfiguration) WithFirstAvailable(values ...*DeviceSu
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *DeviceRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -21,11 +21,12 @@ package v1beta1
|
||||
// DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use
|
||||
// with apply.
|
||||
type DeviceRequestAllocationResultApplyConfiguration struct {
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@@ -73,3 +74,16 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value
|
||||
b.AdminAccess = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ type DeviceSubRequestApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1beta1.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@@ -82,3 +83,16 @@ func (b *DeviceSubRequestApplyConfiguration) WithCount(value int64) *DeviceSubRe
|
||||
b.Count = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Tolerations field.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
resourcev1beta1 "k8s.io/api/resource/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintApplyConfiguration represents a declarative configuration of the DeviceTaint type for use
|
||||
// with apply.
|
||||
type DeviceTaintApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1beta1.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TimeAdded *v1.Time `json:"timeAdded,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintApplyConfiguration constructs a declarative configuration of the DeviceTaint type for use with
|
||||
// apply.
|
||||
func DeviceTaint() *DeviceTaintApplyConfiguration {
|
||||
return &DeviceTaintApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Key field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithKey(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithValue(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Effect field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithEffect(value resourcev1beta1.DeviceTaintEffect) *DeviceTaintApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeAdded sets the TimeAdded field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TimeAdded field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithTimeAdded(value v1.Time) *DeviceTaintApplyConfiguration {
|
||||
b.TimeAdded = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
resourcev1beta1 "k8s.io/api/resource/v1beta1"
|
||||
)
|
||||
|
||||
// DeviceTolerationApplyConfiguration represents a declarative configuration of the DeviceToleration type for use
|
||||
// with apply.
|
||||
type DeviceTolerationApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Operator *resourcev1beta1.DeviceTolerationOperator `json:"operator,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1beta1.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTolerationApplyConfiguration constructs a declarative configuration of the DeviceToleration type for use with
|
||||
// apply.
|
||||
func DeviceToleration() *DeviceTolerationApplyConfiguration {
|
||||
return &DeviceTolerationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Key field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithKey(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOperator sets the Operator field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Operator field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithOperator(value resourcev1beta1.DeviceTolerationOperator) *DeviceTolerationApplyConfiguration {
|
||||
b.Operator = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Value field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithValue(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Effect field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithEffect(value resourcev1beta1.DeviceTaintEffect) *DeviceTolerationApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerationSeconds sets the TolerationSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TolerationSeconds field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithTolerationSeconds(value int64) *DeviceTolerationApplyConfiguration {
|
||||
b.TolerationSeconds = &value
|
||||
return b
|
||||
}
|
||||
@@ -1640,6 +1640,16 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSubRequest"):
|
||||
return &resourcev1alpha3.DeviceSubRequestApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaint"):
|
||||
return &resourcev1alpha3.DeviceTaintApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRuleSpec"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleSpecApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
|
||||
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceToleration"):
|
||||
return &resourcev1alpha3.DeviceTolerationApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
||||
return &resourcev1alpha3.NetworkDeviceDataApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||
@@ -1704,6 +1714,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsresourcev1beta1.DeviceSelectorApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceSubRequest"):
|
||||
return &applyconfigurationsresourcev1beta1.DeviceSubRequestApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceTaint"):
|
||||
return &applyconfigurationsresourcev1beta1.DeviceTaintApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceToleration"):
|
||||
return &applyconfigurationsresourcev1beta1.DeviceTolerationApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
||||
return &applyconfigurationsresourcev1beta1.NetworkDeviceDataApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||
|
||||
@@ -387,6 +387,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=resource.k8s.io, Version=v1alpha3
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceClasses().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceTaintRules().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
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 informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
resourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleInformer provides access to a shared informer and lister for
|
||||
// DeviceTaintRules.
|
||||
type DeviceTaintRuleInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() resourcev1alpha3.DeviceTaintRuleLister
|
||||
}
|
||||
|
||||
type deviceTaintRuleInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewDeviceTaintRuleInformer constructs a new informer for DeviceTaintRule type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewDeviceTaintRuleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDeviceTaintRuleInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDeviceTaintRuleInformer constructs a new informer for DeviceTaintRule type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDeviceTaintRuleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&apiresourcev1alpha3.DeviceTaintRule{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *deviceTaintRuleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDeviceTaintRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *deviceTaintRuleInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apiresourcev1alpha3.DeviceTaintRule{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *deviceTaintRuleInformer) Lister() resourcev1alpha3.DeviceTaintRuleLister {
|
||||
return resourcev1alpha3.NewDeviceTaintRuleLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -26,6 +26,8 @@ import (
|
||||
type Interface interface {
|
||||
// DeviceClasses returns a DeviceClassInformer.
|
||||
DeviceClasses() DeviceClassInformer
|
||||
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
||||
DeviceTaintRules() DeviceTaintRuleInformer
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
ResourceClaims() ResourceClaimInformer
|
||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||
@@ -50,6 +52,11 @@ func (v *version) DeviceClasses() DeviceClassInformer {
|
||||
return &deviceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
||||
func (v *version) DeviceTaintRules() DeviceTaintRuleInformer {
|
||||
return &deviceTaintRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
func (v *version) ResourceClaims() ResourceClaimInformer {
|
||||
return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsresourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// DeviceTaintRulesGetter has a method to return a DeviceTaintRuleInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DeviceTaintRulesGetter interface {
|
||||
DeviceTaintRules() DeviceTaintRuleInterface
|
||||
}
|
||||
|
||||
// DeviceTaintRuleInterface has methods to work with DeviceTaintRule resources.
|
||||
type DeviceTaintRuleInterface interface {
|
||||
Create(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.CreateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
Update(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.DeviceTaintRuleList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
Apply(ctx context.Context, deviceTaintRule *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
DeviceTaintRuleExpansion
|
||||
}
|
||||
|
||||
// deviceTaintRules implements DeviceTaintRuleInterface
|
||||
type deviceTaintRules struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.DeviceTaintRule, *resourcev1alpha3.DeviceTaintRuleList, *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration]
|
||||
}
|
||||
|
||||
// newDeviceTaintRules returns a DeviceTaintRules
|
||||
func newDeviceTaintRules(c *ResourceV1alpha3Client) *deviceTaintRules {
|
||||
return &deviceTaintRules{
|
||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.DeviceTaintRule, *resourcev1alpha3.DeviceTaintRuleList, *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration](
|
||||
"devicetaintrules",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *resourcev1alpha3.DeviceTaintRule { return &resourcev1alpha3.DeviceTaintRule{} },
|
||||
func() *resourcev1alpha3.DeviceTaintRuleList { return &resourcev1alpha3.DeviceTaintRuleList{} },
|
||||
gentype.PrefersProtobuf[*resourcev1alpha3.DeviceTaintRule](),
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
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 client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
|
||||
)
|
||||
|
||||
// fakeDeviceTaintRules implements DeviceTaintRuleInterface
|
||||
type fakeDeviceTaintRules struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1alpha3.DeviceTaintRule, *v1alpha3.DeviceTaintRuleList, *resourcev1alpha3.DeviceTaintRuleApplyConfiguration]
|
||||
Fake *FakeResourceV1alpha3
|
||||
}
|
||||
|
||||
func newFakeDeviceTaintRules(fake *FakeResourceV1alpha3) typedresourcev1alpha3.DeviceTaintRuleInterface {
|
||||
return &fakeDeviceTaintRules{
|
||||
gentype.NewFakeClientWithListAndApply[*v1alpha3.DeviceTaintRule, *v1alpha3.DeviceTaintRuleList, *resourcev1alpha3.DeviceTaintRuleApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"),
|
||||
v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"),
|
||||
func() *v1alpha3.DeviceTaintRule { return &v1alpha3.DeviceTaintRule{} },
|
||||
func() *v1alpha3.DeviceTaintRuleList { return &v1alpha3.DeviceTaintRuleList{} },
|
||||
func(dst, src *v1alpha3.DeviceTaintRuleList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha3.DeviceTaintRuleList) []*v1alpha3.DeviceTaintRule {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha3.DeviceTaintRuleList, items []*v1alpha3.DeviceTaintRule) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,10 @@ func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface {
|
||||
return newFakeDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha3) DeviceTaintRules() v1alpha3.DeviceTaintRuleInterface {
|
||||
return newFakeDeviceTaintRules(c)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.ResourceClaimInterface {
|
||||
return newFakeResourceClaims(c, namespace)
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ package v1alpha3
|
||||
|
||||
type DeviceClassExpansion interface{}
|
||||
|
||||
type DeviceTaintRuleExpansion interface{}
|
||||
|
||||
type ResourceClaimExpansion interface{}
|
||||
|
||||
type ResourceClaimTemplateExpansion interface{}
|
||||
|
||||
@@ -29,6 +29,7 @@ import (
|
||||
type ResourceV1alpha3Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
DeviceClassesGetter
|
||||
DeviceTaintRulesGetter
|
||||
ResourceClaimsGetter
|
||||
ResourceClaimTemplatesGetter
|
||||
ResourceSlicesGetter
|
||||
@@ -43,6 +44,10 @@ func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface {
|
||||
return newDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha3Client) DeviceTaintRules() DeviceTaintRuleInterface {
|
||||
return newDeviceTaintRules(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||
return newResourceClaims(c, namespace)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
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 lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
listers "k8s.io/client-go/listers"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleLister helps list DeviceTaintRules.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeviceTaintRuleLister interface {
|
||||
// List lists all DeviceTaintRules in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*resourcev1alpha3.DeviceTaintRule, err error)
|
||||
// Get retrieves the DeviceTaintRule from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
DeviceTaintRuleListerExpansion
|
||||
}
|
||||
|
||||
// deviceTaintRuleLister implements the DeviceTaintRuleLister interface.
|
||||
type deviceTaintRuleLister struct {
|
||||
listers.ResourceIndexer[*resourcev1alpha3.DeviceTaintRule]
|
||||
}
|
||||
|
||||
// NewDeviceTaintRuleLister returns a new DeviceTaintRuleLister.
|
||||
func NewDeviceTaintRuleLister(indexer cache.Indexer) DeviceTaintRuleLister {
|
||||
return &deviceTaintRuleLister{listers.New[*resourcev1alpha3.DeviceTaintRule](indexer, resourcev1alpha3.Resource("devicetaintrule"))}
|
||||
}
|
||||
@@ -22,6 +22,10 @@ package v1alpha3
|
||||
// DeviceClassLister.
|
||||
type DeviceClassListerExpansion interface{}
|
||||
|
||||
// DeviceTaintRuleListerExpansion allows custom methods to be added to
|
||||
// DeviceTaintRuleLister.
|
||||
type DeviceTaintRuleListerExpansion interface{}
|
||||
|
||||
// ResourceClaimListerExpansion allows custom methods to be added to
|
||||
// ResourceClaimLister.
|
||||
type ResourceClaimListerExpansion interface{}
|
||||
|
||||
@@ -24,8 +24,9 @@ package api
|
||||
import (
|
||||
unsafe "unsafe"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1beta1 "k8s.io/api/resource/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
@@ -77,6 +78,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DeviceTaint)(nil), (*v1beta1.DeviceTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_api_DeviceTaint_To_v1beta1_DeviceTaint(a.(*DeviceTaint), b.(*v1beta1.DeviceTaint), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*v1beta1.DeviceTaint)(nil), (*DeviceTaint)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_DeviceTaint_To_api_DeviceTaint(a.(*v1beta1.DeviceTaint), b.(*DeviceTaint), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*ResourcePool)(nil), (*v1beta1.ResourcePool)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_api_ResourcePool_To_v1beta1_ResourcePool(a.(*ResourcePool), b.(*v1beta1.ResourcePool), scope)
|
||||
}); err != nil {
|
||||
@@ -123,6 +134,7 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||
func autoConvert_api_BasicDevice_To_v1beta1_BasicDevice(in *BasicDevice, out *v1beta1.BasicDevice, s conversion.Scope) error {
|
||||
out.Attributes = *(*map[v1beta1.QualifiedName]v1beta1.DeviceAttribute)(unsafe.Pointer(&in.Attributes))
|
||||
out.Capacity = *(*map[v1beta1.QualifiedName]v1beta1.DeviceCapacity)(unsafe.Pointer(&in.Capacity))
|
||||
out.Taints = *(*[]v1beta1.DeviceTaint)(unsafe.Pointer(&in.Taints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -134,6 +146,7 @@ func Convert_api_BasicDevice_To_v1beta1_BasicDevice(in *BasicDevice, out *v1beta
|
||||
func autoConvert_v1beta1_BasicDevice_To_api_BasicDevice(in *v1beta1.BasicDevice, out *BasicDevice, s conversion.Scope) error {
|
||||
out.Attributes = *(*map[QualifiedName]DeviceAttribute)(unsafe.Pointer(&in.Attributes))
|
||||
out.Capacity = *(*map[QualifiedName]DeviceCapacity)(unsafe.Pointer(&in.Capacity))
|
||||
out.Taints = *(*[]v1beta1.DeviceTaint)(unsafe.Pointer(&in.Taints))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -214,6 +227,32 @@ func Convert_v1beta1_DeviceCapacity_To_api_DeviceCapacity(in *v1beta1.DeviceCapa
|
||||
return autoConvert_v1beta1_DeviceCapacity_To_api_DeviceCapacity(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_DeviceTaint_To_v1beta1_DeviceTaint(in *DeviceTaint, out *v1beta1.DeviceTaint, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Value = in.Value
|
||||
out.Effect = v1beta1.DeviceTaintEffect(in.Effect)
|
||||
out.TimeAdded = (*v1.Time)(unsafe.Pointer(in.TimeAdded))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_DeviceTaint_To_v1beta1_DeviceTaint is an autogenerated conversion function.
|
||||
func Convert_api_DeviceTaint_To_v1beta1_DeviceTaint(in *DeviceTaint, out *v1beta1.DeviceTaint, s conversion.Scope) error {
|
||||
return autoConvert_api_DeviceTaint_To_v1beta1_DeviceTaint(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_DeviceTaint_To_api_DeviceTaint(in *v1beta1.DeviceTaint, out *DeviceTaint, s conversion.Scope) error {
|
||||
out.Key = in.Key
|
||||
out.Value = in.Value
|
||||
out.Effect = DeviceTaintEffect(in.Effect)
|
||||
out.TimeAdded = (*v1.Time)(unsafe.Pointer(in.TimeAdded))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_DeviceTaint_To_api_DeviceTaint is an autogenerated conversion function.
|
||||
func Convert_v1beta1_DeviceTaint_To_api_DeviceTaint(in *v1beta1.DeviceTaint, out *DeviceTaint, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_DeviceTaint_To_api_DeviceTaint(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_ResourcePool_To_v1beta1_ResourcePool(in *ResourcePool, out *v1beta1.ResourcePool, s conversion.Scope) error {
|
||||
if err := Convert_api_UniqueString_To_string(&in.Name, &out.Name, s); err != nil {
|
||||
return err
|
||||
@@ -278,7 +317,7 @@ func autoConvert_api_ResourceSliceSpec_To_v1beta1_ResourceSliceSpec(in *Resource
|
||||
if err := Convert_api_UniqueString_To_string(&in.NodeName, &out.NodeName, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
|
||||
out.NodeSelector = (*corev1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
|
||||
out.AllNodes = in.AllNodes
|
||||
if in.Devices != nil {
|
||||
in, out := &in.Devices, &out.Devices
|
||||
@@ -309,7 +348,7 @@ func autoConvert_v1beta1_ResourceSliceSpec_To_api_ResourceSliceSpec(in *v1beta1.
|
||||
if err := Convert_string_To_api_UniqueString(&in.NodeName, &out.NodeName, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
|
||||
out.NodeSelector = (*corev1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
|
||||
out.AllNodes = in.AllNodes
|
||||
if in.Devices != nil {
|
||||
in, out := &in.Devices, &out.Devices
|
||||
|
||||
Reference in New Issue
Block a user