mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-17 08:41:53 +00:00
DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled by it (claim.spec.controller, claim.status.deallocationRequested, claim.status.allocation.controller, class.spec.suitableNodes), the PodSchedulingContext type, and all code related to the feature. The feature gets removed because there is no path towards beta and GA and DRA with "structured parameters" should be able to replace it. Kubernetes-commit: f84eb5ecf894fa0fc4e0d05da52ef51d4cd723d9
This commit is contained in:
parent
235936510e
commit
d366fa7737
@ -12247,9 +12247,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1alpha3.AllocationResult
|
||||
map:
|
||||
fields:
|
||||
- name: controller
|
||||
type:
|
||||
scalar: string
|
||||
- name: devices
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationResult
|
||||
@ -12404,9 +12401,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: suitableNodes
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeSelector
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceConstraint
|
||||
map:
|
||||
fields:
|
||||
@ -12481,50 +12475,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: parameters
|
||||
type:
|
||||
namedType: __untyped_atomic_
|
||||
- name: io.k8s.api.resource.v1alpha3.PodSchedulingContext
|
||||
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.PodSchedulingContextSpec
|
||||
default: {}
|
||||
- name: status
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec
|
||||
map:
|
||||
fields:
|
||||
- name: potentialNodes
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: selectedNode
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus
|
||||
map:
|
||||
fields:
|
||||
- name: resourceClaims
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- name
|
||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaim
|
||||
map:
|
||||
fields:
|
||||
@ -12564,25 +12514,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus
|
||||
map:
|
||||
fields:
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: unsuitableNodes
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec
|
||||
map:
|
||||
fields:
|
||||
- name: controller
|
||||
type:
|
||||
scalar: string
|
||||
- name: devices
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceClaim
|
||||
@ -12593,9 +12527,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocation
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.AllocationResult
|
||||
- name: deallocationRequested
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: reservedFor
|
||||
type:
|
||||
list:
|
||||
|
@ -27,7 +27,6 @@ import (
|
||||
type AllocationResultApplyConfiguration struct {
|
||||
Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"`
|
||||
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
|
||||
Controller *string `json:"controller,omitempty"`
|
||||
}
|
||||
|
||||
// AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with
|
||||
@ -51,11 +50,3 @@ func (b *AllocationResultApplyConfiguration) WithNodeSelector(value *v1.NodeSele
|
||||
b.NodeSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithController sets the Controller 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 Controller field is set to the value of the last call.
|
||||
func (b *AllocationResultApplyConfiguration) WithController(value string) *AllocationResultApplyConfiguration {
|
||||
b.Controller = &value
|
||||
return b
|
||||
}
|
||||
|
@ -18,16 +18,11 @@ limitations under the License.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
)
|
||||
|
||||
// DeviceClassSpecApplyConfiguration represents a declarative configuration of the DeviceClassSpec type for use
|
||||
// with apply.
|
||||
type DeviceClassSpecApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
|
||||
SuitableNodes *v1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with
|
||||
@ -61,11 +56,3 @@ func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassCon
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSuitableNodes sets the SuitableNodes 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 SuitableNodes field is set to the value of the last call.
|
||||
func (b *DeviceClassSpecApplyConfiguration) WithSuitableNodes(value *v1.NodeSelectorApplyConfiguration) *DeviceClassSpecApplyConfiguration {
|
||||
b.SuitableNodes = value
|
||||
return b
|
||||
}
|
||||
|
@ -1,264 +0,0 @@
|
||||
/*
|
||||
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"
|
||||
)
|
||||
|
||||
// PodSchedulingContextApplyConfiguration represents a declarative configuration of the PodSchedulingContext type for use
|
||||
// with apply.
|
||||
type PodSchedulingContextApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *PodSchedulingContextSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *PodSchedulingContextStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// PodSchedulingContext constructs a declarative configuration of the PodSchedulingContext type for use with
|
||||
// apply.
|
||||
func PodSchedulingContext(name, namespace string) *PodSchedulingContextApplyConfiguration {
|
||||
b := &PodSchedulingContextApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("PodSchedulingContext")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodSchedulingContext extracts the applied configuration owned by fieldManager from
|
||||
// podSchedulingContext. If no managedFields are found in podSchedulingContext for fieldManager, a
|
||||
// PodSchedulingContextApplyConfiguration 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.
|
||||
// podSchedulingContext must be a unmodified PodSchedulingContext API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodSchedulingContext 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 ExtractPodSchedulingContext(podSchedulingContext *resourcev1alpha3.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) {
|
||||
return extractPodSchedulingContext(podSchedulingContext, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractPodSchedulingContextStatus is the same as ExtractPodSchedulingContext except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractPodSchedulingContextStatus(podSchedulingContext *resourcev1alpha3.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) {
|
||||
return extractPodSchedulingContext(podSchedulingContext, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractPodSchedulingContext(podSchedulingContext *resourcev1alpha3.PodSchedulingContext, fieldManager string, subresource string) (*PodSchedulingContextApplyConfiguration, error) {
|
||||
b := &PodSchedulingContextApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podSchedulingContext, internal.Parser().Type("io.k8s.api.resource.v1alpha3.PodSchedulingContext"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podSchedulingContext.Name)
|
||||
b.WithNamespace(podSchedulingContext.Namespace)
|
||||
|
||||
b.WithKind("PodSchedulingContext")
|
||||
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 *PodSchedulingContextApplyConfiguration) WithKind(value string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithAPIVersion(value string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithName(value string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithGenerateName(value string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithNamespace(value string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithUID(value types.UID) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithResourceVersion(value string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithGeneration(value int64) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithLabels(entries map[string]string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithAnnotations(entries map[string]string) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodSchedulingContextApplyConfiguration {
|
||||
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 *PodSchedulingContextApplyConfiguration) WithFinalizers(values ...string) *PodSchedulingContextApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *PodSchedulingContextApplyConfiguration) 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 *PodSchedulingContextApplyConfiguration) WithSpec(value *PodSchedulingContextSpecApplyConfiguration) *PodSchedulingContextApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status 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 Status field is set to the value of the last call.
|
||||
func (b *PodSchedulingContextApplyConfiguration) WithStatus(value *PodSchedulingContextStatusApplyConfiguration) *PodSchedulingContextApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *PodSchedulingContextApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// PodSchedulingContextSpecApplyConfiguration represents a declarative configuration of the PodSchedulingContextSpec type for use
|
||||
// with apply.
|
||||
type PodSchedulingContextSpecApplyConfiguration struct {
|
||||
SelectedNode *string `json:"selectedNode,omitempty"`
|
||||
PotentialNodes []string `json:"potentialNodes,omitempty"`
|
||||
}
|
||||
|
||||
// PodSchedulingContextSpecApplyConfiguration constructs a declarative configuration of the PodSchedulingContextSpec type for use with
|
||||
// apply.
|
||||
func PodSchedulingContextSpec() *PodSchedulingContextSpecApplyConfiguration {
|
||||
return &PodSchedulingContextSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithSelectedNode sets the SelectedNode 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 SelectedNode field is set to the value of the last call.
|
||||
func (b *PodSchedulingContextSpecApplyConfiguration) WithSelectedNode(value string) *PodSchedulingContextSpecApplyConfiguration {
|
||||
b.SelectedNode = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPotentialNodes adds the given value to the PotentialNodes 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 PotentialNodes field.
|
||||
func (b *PodSchedulingContextSpecApplyConfiguration) WithPotentialNodes(values ...string) *PodSchedulingContextSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.PotentialNodes = append(b.PotentialNodes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// PodSchedulingContextStatusApplyConfiguration represents a declarative configuration of the PodSchedulingContextStatus type for use
|
||||
// with apply.
|
||||
type PodSchedulingContextStatusApplyConfiguration struct {
|
||||
ResourceClaims []ResourceClaimSchedulingStatusApplyConfiguration `json:"resourceClaims,omitempty"`
|
||||
}
|
||||
|
||||
// PodSchedulingContextStatusApplyConfiguration constructs a declarative configuration of the PodSchedulingContextStatus type for use with
|
||||
// apply.
|
||||
func PodSchedulingContextStatus() *PodSchedulingContextStatusApplyConfiguration {
|
||||
return &PodSchedulingContextStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithResourceClaims adds the given value to the ResourceClaims 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 ResourceClaims field.
|
||||
func (b *PodSchedulingContextStatusApplyConfiguration) WithResourceClaims(values ...*ResourceClaimSchedulingStatusApplyConfiguration) *PodSchedulingContextStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithResourceClaims")
|
||||
}
|
||||
b.ResourceClaims = append(b.ResourceClaims, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
/*
|
||||
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
|
||||
|
||||
// ResourceClaimSchedulingStatusApplyConfiguration represents a declarative configuration of the ResourceClaimSchedulingStatus type for use
|
||||
// with apply.
|
||||
type ResourceClaimSchedulingStatusApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
UnsuitableNodes []string `json:"unsuitableNodes,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceClaimSchedulingStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimSchedulingStatus type for use with
|
||||
// apply.
|
||||
func ResourceClaimSchedulingStatus() *ResourceClaimSchedulingStatusApplyConfiguration {
|
||||
return &ResourceClaimSchedulingStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *ResourceClaimSchedulingStatusApplyConfiguration) WithName(value string) *ResourceClaimSchedulingStatusApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUnsuitableNodes adds the given value to the UnsuitableNodes 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 UnsuitableNodes field.
|
||||
func (b *ResourceClaimSchedulingStatusApplyConfiguration) WithUnsuitableNodes(values ...string) *ResourceClaimSchedulingStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
b.UnsuitableNodes = append(b.UnsuitableNodes, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
@ -21,8 +21,7 @@ package v1alpha3
|
||||
// ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use
|
||||
// with apply.
|
||||
type ResourceClaimSpecApplyConfiguration struct {
|
||||
Devices *DeviceClaimApplyConfiguration `json:"devices,omitempty"`
|
||||
Controller *string `json:"controller,omitempty"`
|
||||
Devices *DeviceClaimApplyConfiguration `json:"devices,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with
|
||||
@ -38,11 +37,3 @@ func (b *ResourceClaimSpecApplyConfiguration) WithDevices(value *DeviceClaimAppl
|
||||
b.Devices = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithController sets the Controller 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 Controller field is set to the value of the last call.
|
||||
func (b *ResourceClaimSpecApplyConfiguration) WithController(value string) *ResourceClaimSpecApplyConfiguration {
|
||||
b.Controller = &value
|
||||
return b
|
||||
}
|
||||
|
@ -21,9 +21,8 @@ package v1alpha3
|
||||
// ResourceClaimStatusApplyConfiguration represents a declarative configuration of the ResourceClaimStatus type for use
|
||||
// with apply.
|
||||
type ResourceClaimStatusApplyConfiguration struct {
|
||||
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
||||
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
||||
DeallocationRequested *bool `json:"deallocationRequested,omitempty"`
|
||||
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
||||
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
|
||||
@ -52,11 +51,3 @@ func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*Resou
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeallocationRequested sets the DeallocationRequested 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 DeallocationRequested field is set to the value of the last call.
|
||||
func (b *ResourceClaimStatusApplyConfiguration) WithDeallocationRequested(value bool) *ResourceClaimStatusApplyConfiguration {
|
||||
b.DeallocationRequested = &value
|
||||
return b
|
||||
}
|
||||
|
@ -1602,18 +1602,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||
return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContext"):
|
||||
return &resourcev1alpha3.PodSchedulingContextApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"):
|
||||
return &resourcev1alpha3.PodSchedulingContextSpecApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContextStatus"):
|
||||
return &resourcev1alpha3.PodSchedulingContextStatusApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"):
|
||||
return &resourcev1alpha3.ResourceClaimApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
|
||||
return &resourcev1alpha3.ResourceClaimConsumerReferenceApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"):
|
||||
return &resourcev1alpha3.ResourceClaimSchedulingStatusApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
|
||||
return &resourcev1alpha3.ResourceClaimSpecApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimStatus"):
|
||||
|
@ -374,8 +374,6 @@ 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("podschedulingcontexts"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().PodSchedulingContexts().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||
|
@ -26,8 +26,6 @@ import (
|
||||
type Interface interface {
|
||||
// DeviceClasses returns a DeviceClassInformer.
|
||||
DeviceClasses() DeviceClassInformer
|
||||
// PodSchedulingContexts returns a PodSchedulingContextInformer.
|
||||
PodSchedulingContexts() PodSchedulingContextInformer
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
ResourceClaims() ResourceClaimInformer
|
||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||
@ -52,11 +50,6 @@ func (v *version) DeviceClasses() DeviceClassInformer {
|
||||
return &deviceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// PodSchedulingContexts returns a PodSchedulingContextInformer.
|
||||
func (v *version) PodSchedulingContexts() PodSchedulingContextInformer {
|
||||
return &podSchedulingContextInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
func (v *version) ResourceClaims() ResourceClaimInformer {
|
||||
return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
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"
|
||||
)
|
||||
|
||||
// PodSchedulingContextInformer provides access to a shared informer and lister for
|
||||
// PodSchedulingContexts.
|
||||
type PodSchedulingContextInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() resourcev1alpha3.PodSchedulingContextLister
|
||||
}
|
||||
|
||||
type podSchedulingContextInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewPodSchedulingContextInformer constructs a new informer for PodSchedulingContext 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 NewPodSchedulingContextInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSchedulingContextInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPodSchedulingContextInformer constructs a new informer for PodSchedulingContext 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 NewFilteredPodSchedulingContextInformer(client kubernetes.Interface, namespace string, 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().PodSchedulingContexts(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().PodSchedulingContexts(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&apiresourcev1alpha3.PodSchedulingContext{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *podSchedulingContextInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSchedulingContextInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *podSchedulingContextInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apiresourcev1alpha3.PodSchedulingContext{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podSchedulingContextInformer) Lister() resourcev1alpha3.PodSchedulingContextLister {
|
||||
return resourcev1alpha3.NewPodSchedulingContextLister(f.Informer().GetIndexer())
|
||||
}
|
@ -1,197 +0,0 @@
|
||||
/*
|
||||
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 (
|
||||
context "context"
|
||||
json "encoding/json"
|
||||
fmt "fmt"
|
||||
|
||||
v1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakePodSchedulingContexts implements PodSchedulingContextInterface
|
||||
type FakePodSchedulingContexts struct {
|
||||
Fake *FakeResourceV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var podschedulingcontextsResource = v1alpha3.SchemeGroupVersion.WithResource("podschedulingcontexts")
|
||||
|
||||
var podschedulingcontextsKind = v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContext")
|
||||
|
||||
// Get takes name of the podSchedulingContext, and returns the corresponding podSchedulingContext object, and an error if there is any.
|
||||
func (c *FakePodSchedulingContexts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(podschedulingcontextsResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors.
|
||||
func (c *FakePodSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.PodSchedulingContextList, err error) {
|
||||
emptyResult := &v1alpha3.PodSchedulingContextList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(podschedulingcontextsResource, podschedulingcontextsKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.PodSchedulingContextList{ListMeta: obj.(*v1alpha3.PodSchedulingContextList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.PodSchedulingContextList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podSchedulingContexts.
|
||||
func (c *FakePodSchedulingContexts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(podschedulingcontextsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a podSchedulingContext and creates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||
func (c *FakePodSchedulingContexts) Create(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.CreateOptions) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(podschedulingcontextsResource, c.ns, podSchedulingContext, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a podSchedulingContext and updates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||
func (c *FakePodSchedulingContexts) Update(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(podschedulingcontextsResource, c.ns, podSchedulingContext, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakePodSchedulingContexts) UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(podschedulingcontextsResource, "status", c.ns, podSchedulingContext, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
||||
|
||||
// Delete takes name of the podSchedulingContext and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePodSchedulingContexts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(podschedulingcontextsResource, c.ns, name, opts), &v1alpha3.PodSchedulingContext{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePodSchedulingContexts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(podschedulingcontextsResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.PodSchedulingContextList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podSchedulingContext.
|
||||
func (c *FakePodSchedulingContexts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(podschedulingcontextsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podSchedulingContext.
|
||||
func (c *FakePodSchedulingContexts) Apply(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
if podSchedulingContext == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(podSchedulingContext)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := podSchedulingContext.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(podschedulingcontextsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *FakePodSchedulingContexts) ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.PodSchedulingContext, err error) {
|
||||
if podSchedulingContext == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(podSchedulingContext)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := podSchedulingContext.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha3.PodSchedulingContext{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(podschedulingcontextsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.PodSchedulingContext), err
|
||||
}
|
@ -32,10 +32,6 @@ func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface {
|
||||
return &FakeDeviceClasses{c}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha3) PodSchedulingContexts(namespace string) v1alpha3.PodSchedulingContextInterface {
|
||||
return &FakePodSchedulingContexts{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.ResourceClaimInterface {
|
||||
return &FakeResourceClaims{c, namespace}
|
||||
}
|
||||
|
@ -20,8 +20,6 @@ package v1alpha3
|
||||
|
||||
type DeviceClassExpansion interface{}
|
||||
|
||||
type PodSchedulingContextExpansion interface{}
|
||||
|
||||
type ResourceClaimExpansion interface{}
|
||||
|
||||
type ResourceClaimTemplateExpansion interface{}
|
||||
|
@ -1,73 +0,0 @@
|
||||
/*
|
||||
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"
|
||||
)
|
||||
|
||||
// PodSchedulingContextsGetter has a method to return a PodSchedulingContextInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodSchedulingContextsGetter interface {
|
||||
PodSchedulingContexts(namespace string) PodSchedulingContextInterface
|
||||
}
|
||||
|
||||
// PodSchedulingContextInterface has methods to work with PodSchedulingContext resources.
|
||||
type PodSchedulingContextInterface interface {
|
||||
Create(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContext, opts v1.CreateOptions) (*resourcev1alpha3.PodSchedulingContext, error)
|
||||
Update(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (*resourcev1alpha3.PodSchedulingContext, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (*resourcev1alpha3.PodSchedulingContext, 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.PodSchedulingContext, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.PodSchedulingContextList, 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.PodSchedulingContext, err error)
|
||||
Apply(ctx context.Context, podSchedulingContext *applyconfigurationsresourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.PodSchedulingContext, err error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
ApplyStatus(ctx context.Context, podSchedulingContext *applyconfigurationsresourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.PodSchedulingContext, err error)
|
||||
PodSchedulingContextExpansion
|
||||
}
|
||||
|
||||
// podSchedulingContexts implements PodSchedulingContextInterface
|
||||
type podSchedulingContexts struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.PodSchedulingContext, *resourcev1alpha3.PodSchedulingContextList, *applyconfigurationsresourcev1alpha3.PodSchedulingContextApplyConfiguration]
|
||||
}
|
||||
|
||||
// newPodSchedulingContexts returns a PodSchedulingContexts
|
||||
func newPodSchedulingContexts(c *ResourceV1alpha3Client, namespace string) *podSchedulingContexts {
|
||||
return &podSchedulingContexts{
|
||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.PodSchedulingContext, *resourcev1alpha3.PodSchedulingContextList, *applyconfigurationsresourcev1alpha3.PodSchedulingContextApplyConfiguration](
|
||||
"podschedulingcontexts",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *resourcev1alpha3.PodSchedulingContext { return &resourcev1alpha3.PodSchedulingContext{} },
|
||||
func() *resourcev1alpha3.PodSchedulingContextList { return &resourcev1alpha3.PodSchedulingContextList{} }),
|
||||
}
|
||||
}
|
@ -29,7 +29,6 @@ import (
|
||||
type ResourceV1alpha3Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
DeviceClassesGetter
|
||||
PodSchedulingContextsGetter
|
||||
ResourceClaimsGetter
|
||||
ResourceClaimTemplatesGetter
|
||||
ResourceSlicesGetter
|
||||
@ -44,10 +43,6 @@ func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface {
|
||||
return newDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha3Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface {
|
||||
return newPodSchedulingContexts(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||
return newResourceClaims(c, namespace)
|
||||
}
|
||||
|
@ -22,14 +22,6 @@ package v1alpha3
|
||||
// DeviceClassLister.
|
||||
type DeviceClassListerExpansion interface{}
|
||||
|
||||
// PodSchedulingContextListerExpansion allows custom methods to be added to
|
||||
// PodSchedulingContextLister.
|
||||
type PodSchedulingContextListerExpansion interface{}
|
||||
|
||||
// PodSchedulingContextNamespaceListerExpansion allows custom methods to be added to
|
||||
// PodSchedulingContextNamespaceLister.
|
||||
type PodSchedulingContextNamespaceListerExpansion interface{}
|
||||
|
||||
// ResourceClaimListerExpansion allows custom methods to be added to
|
||||
// ResourceClaimLister.
|
||||
type ResourceClaimListerExpansion interface{}
|
||||
|
@ -1,70 +0,0 @@
|
||||
/*
|
||||
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"
|
||||
)
|
||||
|
||||
// PodSchedulingContextLister helps list PodSchedulingContexts.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodSchedulingContextLister interface {
|
||||
// List lists all PodSchedulingContexts in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*resourcev1alpha3.PodSchedulingContext, err error)
|
||||
// PodSchedulingContexts returns an object that can list and get PodSchedulingContexts.
|
||||
PodSchedulingContexts(namespace string) PodSchedulingContextNamespaceLister
|
||||
PodSchedulingContextListerExpansion
|
||||
}
|
||||
|
||||
// podSchedulingContextLister implements the PodSchedulingContextLister interface.
|
||||
type podSchedulingContextLister struct {
|
||||
listers.ResourceIndexer[*resourcev1alpha3.PodSchedulingContext]
|
||||
}
|
||||
|
||||
// NewPodSchedulingContextLister returns a new PodSchedulingContextLister.
|
||||
func NewPodSchedulingContextLister(indexer cache.Indexer) PodSchedulingContextLister {
|
||||
return &podSchedulingContextLister{listers.New[*resourcev1alpha3.PodSchedulingContext](indexer, resourcev1alpha3.Resource("podschedulingcontext"))}
|
||||
}
|
||||
|
||||
// PodSchedulingContexts returns an object that can list and get PodSchedulingContexts.
|
||||
func (s *podSchedulingContextLister) PodSchedulingContexts(namespace string) PodSchedulingContextNamespaceLister {
|
||||
return podSchedulingContextNamespaceLister{listers.NewNamespaced[*resourcev1alpha3.PodSchedulingContext](s.ResourceIndexer, namespace)}
|
||||
}
|
||||
|
||||
// PodSchedulingContextNamespaceLister helps list and get PodSchedulingContexts.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PodSchedulingContextNamespaceLister interface {
|
||||
// List lists all PodSchedulingContexts in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*resourcev1alpha3.PodSchedulingContext, err error)
|
||||
// Get retrieves the PodSchedulingContext from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*resourcev1alpha3.PodSchedulingContext, error)
|
||||
PodSchedulingContextNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// podSchedulingContextNamespaceLister implements the PodSchedulingContextNamespaceLister
|
||||
// interface.
|
||||
type podSchedulingContextNamespaceLister struct {
|
||||
listers.ResourceIndexer[*resourcev1alpha3.PodSchedulingContext]
|
||||
}
|
Loading…
Reference in New Issue
Block a user