api: resource.k8s.io v1alpha1 -> v1alpha2

For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.

Kubernetes-commit: 29941b8d3e7928244f48b05bf5bd453221fe7a9d
This commit is contained in:
Patrick Ohly
2023-03-06 12:43:58 +01:00
committed by Kubernetes Publisher
parent 362ffe4fcd
commit 324f43b974
45 changed files with 467 additions and 467 deletions

View File

@@ -11364,7 +11364,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: namespace - name: namespace
type: type:
scalar: string scalar: string
- name: io.k8s.api.resource.v1alpha1.AllocationResult - name: io.k8s.api.resource.v1alpha2.AllocationResult
map: map:
fields: fields:
- name: availableOnNodes - name: availableOnNodes
@@ -11376,7 +11376,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: shareable - name: shareable
type: type:
scalar: boolean scalar: boolean
- name: io.k8s.api.resource.v1alpha1.PodScheduling - name: io.k8s.api.resource.v1alpha2.PodScheduling
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@@ -11391,13 +11391,13 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.PodSchedulingSpec namedType: io.k8s.api.resource.v1alpha2.PodSchedulingSpec
default: {} default: {}
- name: status - name: status
type: type:
namedType: io.k8s.api.resource.v1alpha1.PodSchedulingStatus namedType: io.k8s.api.resource.v1alpha2.PodSchedulingStatus
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.PodSchedulingSpec - name: io.k8s.api.resource.v1alpha2.PodSchedulingSpec
map: map:
fields: fields:
- name: potentialNodes - name: potentialNodes
@@ -11409,18 +11409,18 @@ var schemaYAML = typed.YAMLObject(`types:
- name: selectedNode - name: selectedNode
type: type:
scalar: string scalar: string
- name: io.k8s.api.resource.v1alpha1.PodSchedulingStatus - name: io.k8s.api.resource.v1alpha2.PodSchedulingStatus
map: map:
fields: fields:
- name: resourceClaims - name: resourceClaims
type: type:
list: list:
elementType: elementType:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSchedulingStatus namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus
elementRelationship: associative elementRelationship: associative
keys: keys:
- name - name
- name: io.k8s.api.resource.v1alpha1.ResourceClaim - name: io.k8s.api.resource.v1alpha2.ResourceClaim
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@@ -11435,13 +11435,13 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSpec namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec
default: {} default: {}
- name: status - name: status
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimStatus namedType: io.k8s.api.resource.v1alpha2.ResourceClaimStatus
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClaimConsumerReference - name: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference
map: map:
fields: fields:
- name: apiGroup - name: apiGroup
@@ -11459,7 +11459,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimParametersReference - name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference
map: map:
fields: fields:
- name: apiGroup - name: apiGroup
@@ -11473,7 +11473,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimSchedulingStatus - name: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus
map: map:
fields: fields:
- name: name - name: name
@@ -11485,7 +11485,7 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
scalar: string scalar: string
elementRelationship: associative elementRelationship: associative
- name: io.k8s.api.resource.v1alpha1.ResourceClaimSpec - name: io.k8s.api.resource.v1alpha2.ResourceClaimSpec
map: map:
fields: fields:
- name: allocationMode - name: allocationMode
@@ -11493,17 +11493,17 @@ var schemaYAML = typed.YAMLObject(`types:
scalar: string scalar: string
- name: parametersRef - name: parametersRef
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimParametersReference namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference
- name: resourceClassName - name: resourceClassName
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimStatus - name: io.k8s.api.resource.v1alpha2.ResourceClaimStatus
map: map:
fields: fields:
- name: allocation - name: allocation
type: type:
namedType: io.k8s.api.resource.v1alpha1.AllocationResult namedType: io.k8s.api.resource.v1alpha2.AllocationResult
- name: deallocationRequested - name: deallocationRequested
type: type:
scalar: boolean scalar: boolean
@@ -11514,11 +11514,11 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
list: list:
elementType: elementType:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimConsumerReference namedType: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference
elementRelationship: associative elementRelationship: associative
keys: keys:
- uid - uid
- name: io.k8s.api.resource.v1alpha1.ResourceClaimTemplate - name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplate
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@@ -11533,9 +11533,9 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimTemplateSpec namedType: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClaimTemplateSpec - name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec
map: map:
fields: fields:
- name: metadata - name: metadata
@@ -11544,9 +11544,9 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSpec namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClass - name: io.k8s.api.resource.v1alpha2.ResourceClass
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@@ -11565,11 +11565,11 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: parametersRef - name: parametersRef
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClassParametersReference namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
- name: suitableNodes - name: suitableNodes
type: type:
namedType: io.k8s.api.core.v1.NodeSelector namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1alpha1.ResourceClassParametersReference - name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
map: map:
fields: fields:
- name: apiGroup - name: apiGroup

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1 "k8s.io/client-go/applyconfigurations/core/v1" v1 "k8s.io/client-go/applyconfigurations/core/v1"

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@@ -43,7 +43,7 @@ func PodScheduling(name, namespace string) *PodSchedulingApplyConfiguration {
b.WithName(name) b.WithName(name)
b.WithNamespace(namespace) b.WithNamespace(namespace)
b.WithKind("PodScheduling") b.WithKind("PodScheduling")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@@ -58,20 +58,20 @@ func PodScheduling(name, namespace string) *PodSchedulingApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // 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. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) { func ExtractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
return extractPodScheduling(podScheduling, fieldManager, "") return extractPodScheduling(podScheduling, fieldManager, "")
} }
// ExtractPodSchedulingStatus is the same as ExtractPodScheduling except // ExtractPodSchedulingStatus is the same as ExtractPodScheduling except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractPodSchedulingStatus(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) { func ExtractPodSchedulingStatus(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
return extractPodScheduling(podScheduling, fieldManager, "status") return extractPodScheduling(podScheduling, fieldManager, "status")
} }
func extractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string, subresource string) (*PodSchedulingApplyConfiguration, error) { func extractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string, subresource string) (*PodSchedulingApplyConfiguration, error) {
b := &PodSchedulingApplyConfiguration{} b := &PodSchedulingApplyConfiguration{}
err := managedfields.ExtractInto(podScheduling, internal.Parser().Type("io.k8s.api.resource.v1alpha1.PodScheduling"), fieldManager, b, subresource) err := managedfields.ExtractInto(podScheduling, internal.Parser().Type("io.k8s.api.resource.v1alpha2.PodScheduling"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -79,7 +79,7 @@ func extractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldMa
b.WithNamespace(podScheduling.Namespace) b.WithNamespace(podScheduling.Namespace)
b.WithKind("PodScheduling") b.WithKind("PodScheduling")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// PodSchedulingSpecApplyConfiguration represents an declarative configuration of the PodSchedulingSpec type for use // PodSchedulingSpecApplyConfiguration represents an declarative configuration of the PodSchedulingSpec type for use
// with apply. // with apply.

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// PodSchedulingStatusApplyConfiguration represents an declarative configuration of the PodSchedulingStatus type for use // PodSchedulingStatusApplyConfiguration represents an declarative configuration of the PodSchedulingStatus type for use
// with apply. // with apply.

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@@ -43,7 +43,7 @@ func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
b.WithName(name) b.WithName(name)
b.WithNamespace(namespace) b.WithNamespace(namespace)
b.WithKind("ResourceClaim") b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@@ -58,20 +58,20 @@ func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // 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. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { func ExtractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "") return extractResourceClaim(resourceClaim, fieldManager, "")
} }
// ExtractResourceClaimStatus is the same as ExtractResourceClaim except // ExtractResourceClaimStatus is the same as ExtractResourceClaim except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "status") return extractResourceClaim(resourceClaim, fieldManager, "status")
} }
func extractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) { func extractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) {
b := &ResourceClaimApplyConfiguration{} b := &ResourceClaimApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClaim"), fieldManager, b, subresource) err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaim"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -79,7 +79,7 @@ func extractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldMa
b.WithNamespace(resourceClaim.Namespace) b.WithNamespace(resourceClaim.Namespace)
b.WithKind("ResourceClaim") b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClaimParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClaimParametersReference type for use // ResourceClaimParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClaimParametersReference type for use
// with apply. // with apply.

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClaimSchedulingStatusApplyConfiguration represents an declarative configuration of the ResourceClaimSchedulingStatus type for use // ResourceClaimSchedulingStatusApplyConfiguration represents an declarative configuration of the ResourceClaimSchedulingStatus type for use
// with apply. // with apply.

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
) )
// ResourceClaimSpecApplyConfiguration represents an declarative configuration of the ResourceClaimSpec type for use // ResourceClaimSpecApplyConfiguration represents an declarative configuration of the ResourceClaimSpec type for use
@@ -27,7 +27,7 @@ import (
type ResourceClaimSpecApplyConfiguration struct { type ResourceClaimSpecApplyConfiguration struct {
ResourceClassName *string `json:"resourceClassName,omitempty"` ResourceClassName *string `json:"resourceClassName,omitempty"`
ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
AllocationMode *resourcev1alpha1.AllocationMode `json:"allocationMode,omitempty"` AllocationMode *resourcev1alpha2.AllocationMode `json:"allocationMode,omitempty"`
} }
// ResourceClaimSpecApplyConfiguration constructs an declarative configuration of the ResourceClaimSpec type for use with // ResourceClaimSpecApplyConfiguration constructs an declarative configuration of the ResourceClaimSpec type for use with
@@ -55,7 +55,7 @@ func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceC
// WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value // WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AllocationMode field is set to the value of the last call. // If called multiple times, the AllocationMode field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha1.AllocationMode) *ResourceClaimSpecApplyConfiguration { func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha2.AllocationMode) *ResourceClaimSpecApplyConfiguration {
b.AllocationMode = &value b.AllocationMode = &value
return b return b
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClaimStatusApplyConfiguration represents an declarative configuration of the ResourceClaimStatus type for use // ResourceClaimStatusApplyConfiguration represents an declarative configuration of the ResourceClaimStatus type for use
// with apply. // with apply.

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@@ -42,7 +42,7 @@ func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyCo
b.WithName(name) b.WithName(name)
b.WithNamespace(namespace) b.WithNamespace(namespace)
b.WithKind("ResourceClaimTemplate") b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@@ -57,20 +57,20 @@ func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyCo
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // 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. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "") return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "")
} }
// ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except // ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status") return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status")
} }
func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) { func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) {
b := &ResourceClaimTemplateApplyConfiguration{} b := &ResourceClaimTemplateApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClaimTemplate"), fieldManager, b, subresource) err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimTemplate"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -78,7 +78,7 @@ func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.Resour
b.WithNamespace(resourceClaimTemplate.Namespace) b.WithNamespace(resourceClaimTemplate.Namespace)
b.WithKind("ResourceClaimTemplate") b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@@ -44,7 +44,7 @@ func ResourceClass(name string) *ResourceClassApplyConfiguration {
b := &ResourceClassApplyConfiguration{} b := &ResourceClassApplyConfiguration{}
b.WithName(name) b.WithName(name)
b.WithKind("ResourceClass") b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@@ -59,27 +59,27 @@ func ResourceClass(name string) *ResourceClassApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // 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. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractResourceClass(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { func ExtractResourceClass(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "") return extractResourceClass(resourceClass, fieldManager, "")
} }
// ExtractResourceClassStatus is the same as ExtractResourceClass except // ExtractResourceClassStatus is the same as ExtractResourceClass except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractResourceClassStatus(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { func ExtractResourceClassStatus(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "status") return extractResourceClass(resourceClass, fieldManager, "status")
} }
func extractResourceClass(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) { func extractResourceClass(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) {
b := &ResourceClassApplyConfiguration{} b := &ResourceClassApplyConfiguration{}
err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClass"), fieldManager, b, subresource) err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClass"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
b.WithName(resourceClass.Name) b.WithName(resourceClass.Name)
b.WithKind("ResourceClass") b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClassParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClassParametersReference type for use // ResourceClassParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClassParametersReference type for use
// with apply. // with apply.

View File

@@ -58,7 +58,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@@ -107,7 +107,7 @@ import (
applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1"
applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1"
applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1"
applyconfigurationsresourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1"
applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1"
@@ -1448,35 +1448,35 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"): case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"):
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{} return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
// Group=resource.k8s.io, Version=v1alpha1 // Group=resource.k8s.io, Version=v1alpha2
case resourcev1alpha1.SchemeGroupVersion.WithKind("AllocationResult"): case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"):
return &applyconfigurationsresourcev1alpha1.AllocationResultApplyConfiguration{} return &resourcev1alpha2.AllocationResultApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodScheduling"): case v1alpha2.SchemeGroupVersion.WithKind("PodScheduling"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingApplyConfiguration{} return &resourcev1alpha2.PodSchedulingApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodSchedulingSpec"): case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingSpec"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingSpecApplyConfiguration{} return &resourcev1alpha2.PodSchedulingSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodSchedulingStatus"): case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingStatus"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingStatusApplyConfiguration{} return &resourcev1alpha2.PodSchedulingStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaim"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimApplyConfiguration{} return &resourcev1alpha2.ResourceClaimApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimConsumerReferenceApplyConfiguration{} return &resourcev1alpha2.ResourceClaimConsumerReferenceApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimParametersReferenceApplyConfiguration{} return &resourcev1alpha2.ResourceClaimParametersReferenceApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimSchedulingStatusApplyConfiguration{} return &resourcev1alpha2.ResourceClaimSchedulingStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimSpec"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimSpecApplyConfiguration{} return &resourcev1alpha2.ResourceClaimSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimStatus"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimStatus"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimStatusApplyConfiguration{} return &resourcev1alpha2.ResourceClaimStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplate"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplate"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimTemplateApplyConfiguration{} return &resourcev1alpha2.ResourceClaimTemplateApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimTemplateSpecApplyConfiguration{} return &resourcev1alpha2.ResourceClaimTemplateSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClass"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClass"):
return &applyconfigurationsresourcev1alpha1.ResourceClassApplyConfiguration{} return &resourcev1alpha2.ResourceClassApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClassParametersReference"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParametersReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClassParametersReferenceApplyConfiguration{} return &resourcev1alpha2.ResourceClassParametersReferenceApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1 // Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"): case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):

View File

@@ -59,7 +59,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@@ -348,15 +348,15 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"): case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
// Group=resource.k8s.io, Version=v1alpha1 // Group=resource.k8s.io, Version=v1alpha2
case resourcev1alpha1.SchemeGroupVersion.WithResource("podschedulings"): case v1alpha2.SchemeGroupVersion.WithResource("podschedulings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().PodSchedulings().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulings().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaims"): case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaims().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaimtemplates"): case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaimTemplates().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclasses"): case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClasses().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil
// Group=scheduling.k8s.io, Version=v1 // Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"):

View File

@@ -20,13 +20,13 @@ package resource
import ( import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha1 "k8s.io/client-go/informers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/informers/resource/v1alpha2"
) )
// Interface provides access to each of this group's versions. // Interface provides access to each of this group's versions.
type Interface interface { type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1. // V1alpha2 provides access to shared informers for resources in V1alpha2.
V1alpha1() v1alpha1.Interface V1alpha2() v1alpha2.Interface
} }
type group struct { type group struct {
@@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
} }
// V1alpha1 returns a new v1alpha1.Interface. // V1alpha2 returns a new v1alpha2.Interface.
func (g *group) V1alpha1() v1alpha1.Interface { func (g *group) V1alpha2() v1alpha2.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"

View File

@@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@@ -36,7 +36,7 @@ import (
// PodSchedulings. // PodSchedulings.
type PodSchedulingInformer interface { type PodSchedulingInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.PodSchedulingLister Lister() v1alpha2.PodSchedulingLister
} }
type podSchedulingInformer struct { type podSchedulingInformer struct {
@@ -62,16 +62,16 @@ func NewFilteredPodSchedulingInformer(client kubernetes.Interface, namespace str
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().PodSchedulings(namespace).List(context.TODO(), options) return client.ResourceV1alpha2().PodSchedulings(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().PodSchedulings(namespace).Watch(context.TODO(), options) return client.ResourceV1alpha2().PodSchedulings(namespace).Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.PodScheduling{}, &resourcev1alpha2.PodScheduling{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@@ -82,9 +82,9 @@ func (f *podSchedulingInformer) defaultInformer(client kubernetes.Interface, res
} }
func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer { func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.PodScheduling{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.PodScheduling{}, f.defaultInformer)
} }
func (f *podSchedulingInformer) Lister() v1alpha1.PodSchedulingLister { func (f *podSchedulingInformer) Lister() v1alpha2.PodSchedulingLister {
return v1alpha1.NewPodSchedulingLister(f.Informer().GetIndexer()) return v1alpha2.NewPodSchedulingLister(f.Informer().GetIndexer())
} }

View File

@@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@@ -36,7 +36,7 @@ import (
// ResourceClaims. // ResourceClaims.
type ResourceClaimInformer interface { type ResourceClaimInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClaimLister Lister() v1alpha2.ResourceClaimLister
} }
type resourceClaimInformer struct { type resourceClaimInformer struct {
@@ -62,16 +62,16 @@ func NewFilteredResourceClaimInformer(client kubernetes.Interface, namespace str
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaims(namespace).List(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaims(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaims(namespace).Watch(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaims(namespace).Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.ResourceClaim{}, &resourcev1alpha2.ResourceClaim{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@@ -82,9 +82,9 @@ func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, res
} }
func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer { func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaim{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.ResourceClaim{}, f.defaultInformer)
} }
func (f *resourceClaimInformer) Lister() v1alpha1.ResourceClaimLister { func (f *resourceClaimInformer) Lister() v1alpha2.ResourceClaimLister {
return v1alpha1.NewResourceClaimLister(f.Informer().GetIndexer()) return v1alpha2.NewResourceClaimLister(f.Informer().GetIndexer())
} }

View File

@@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@@ -36,7 +36,7 @@ import (
// ResourceClaimTemplates. // ResourceClaimTemplates.
type ResourceClaimTemplateInformer interface { type ResourceClaimTemplateInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClaimTemplateLister Lister() v1alpha2.ResourceClaimTemplateLister
} }
type resourceClaimTemplateInformer struct { type resourceClaimTemplateInformer struct {
@@ -62,16 +62,16 @@ func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, names
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).List(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).Watch(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.ResourceClaimTemplate{}, &resourcev1alpha2.ResourceClaimTemplate{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@@ -82,9 +82,9 @@ func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interf
} }
func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer { func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaimTemplate{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimTemplate{}, f.defaultInformer)
} }
func (f *resourceClaimTemplateInformer) Lister() v1alpha1.ResourceClaimTemplateLister { func (f *resourceClaimTemplateInformer) Lister() v1alpha2.ResourceClaimTemplateLister {
return v1alpha1.NewResourceClaimTemplateLister(f.Informer().GetIndexer()) return v1alpha2.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
} }

View File

@@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@@ -36,7 +36,7 @@ import (
// ResourceClasses. // ResourceClasses.
type ResourceClassInformer interface { type ResourceClassInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClassLister Lister() v1alpha2.ResourceClassLister
} }
type resourceClassInformer struct { type resourceClassInformer struct {
@@ -61,16 +61,16 @@ func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClasses().List(context.TODO(), options) return client.ResourceV1alpha2().ResourceClasses().List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClasses().Watch(context.TODO(), options) return client.ResourceV1alpha2().ResourceClasses().Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.ResourceClass{}, &resourcev1alpha2.ResourceClass{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@@ -81,9 +81,9 @@ func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, res
} }
func (f *resourceClassInformer) Informer() cache.SharedIndexInformer { func (f *resourceClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClass{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.ResourceClass{}, f.defaultInformer)
} }
func (f *resourceClassInformer) Lister() v1alpha1.ResourceClassLister { func (f *resourceClassInformer) Lister() v1alpha2.ResourceClassLister {
return v1alpha1.NewResourceClassLister(f.Informer().GetIndexer()) return v1alpha2.NewResourceClassLister(f.Informer().GetIndexer())
} }

View File

@@ -66,7 +66,7 @@ import (
rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
@@ -122,7 +122,7 @@ type Interface interface {
RbacV1() rbacv1.RbacV1Interface RbacV1() rbacv1.RbacV1Interface
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface
SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
SchedulingV1() schedulingv1.SchedulingV1Interface SchedulingV1() schedulingv1.SchedulingV1Interface
@@ -177,7 +177,7 @@ type Clientset struct {
rbacV1 *rbacv1.RbacV1Client rbacV1 *rbacv1.RbacV1Client
rbacV1beta1 *rbacv1beta1.RbacV1beta1Client rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
resourceV1alpha1 *resourcev1alpha1.ResourceV1alpha1Client resourceV1alpha2 *resourcev1alpha2.ResourceV1alpha2Client
schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
schedulingV1 *schedulingv1.SchedulingV1Client schedulingV1 *schedulingv1.SchedulingV1Client
@@ -401,9 +401,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.rbacV1alpha1 return c.rbacV1alpha1
} }
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client // ResourceV1alpha2 retrieves the ResourceV1alpha2Client
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface { func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface {
return c.resourceV1alpha1 return c.resourceV1alpha2
} }
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
@@ -652,7 +652,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil { if err != nil {
return nil, err return nil, err
} }
cs.resourceV1alpha1, err = resourcev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) cs.resourceV1alpha2, err = resourcev1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -744,7 +744,7 @@ func New(c rest.Interface) *Clientset {
cs.rbacV1 = rbacv1.New(c) cs.rbacV1 = rbacv1.New(c)
cs.rbacV1beta1 = rbacv1beta1.New(c) cs.rbacV1beta1 = rbacv1beta1.New(c)
cs.rbacV1alpha1 = rbacv1alpha1.New(c) cs.rbacV1alpha1 = rbacv1alpha1.New(c)
cs.resourceV1alpha1 = resourcev1alpha1.New(c) cs.resourceV1alpha2 = resourcev1alpha2.New(c)
cs.schedulingV1alpha1 = schedulingv1alpha1.New(c) cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
cs.schedulingV1beta1 = schedulingv1beta1.New(c) cs.schedulingV1beta1 = schedulingv1beta1.New(c)
cs.schedulingV1 = schedulingv1.New(c) cs.schedulingV1 = schedulingv1.New(c)

View File

@@ -110,8 +110,8 @@ import (
fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake" fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake" fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
fakeresourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake" fakeresourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake" fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
@@ -392,9 +392,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake} return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
} }
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client // ResourceV1alpha2 retrieves the ResourceV1alpha2Client
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface { func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface {
return &fakeresourcev1alpha1.FakeResourceV1alpha1{Fake: &c.Fake} return &fakeresourcev1alpha2.FakeResourceV1alpha2{Fake: &c.Fake}
} }
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client

View File

@@ -62,7 +62,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@@ -123,7 +123,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
rbacv1.AddToScheme, rbacv1.AddToScheme,
rbacv1beta1.AddToScheme, rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme, rbacv1alpha1.AddToScheme,
resourcev1alpha1.AddToScheme, resourcev1alpha2.AddToScheme,
schedulingv1alpha1.AddToScheme, schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme, schedulingv1beta1.AddToScheme,
schedulingv1.AddToScheme, schedulingv1.AddToScheme,

View File

@@ -62,7 +62,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@@ -123,7 +123,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
rbacv1.AddToScheme, rbacv1.AddToScheme,
rbacv1beta1.AddToScheme, rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme, rbacv1alpha1.AddToScheme,
resourcev1alpha1.AddToScheme, resourcev1alpha2.AddToScheme,
schedulingv1alpha1.AddToScheme, schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme, schedulingv1beta1.AddToScheme,
schedulingv1.AddToScheme, schedulingv1.AddToScheme,

View File

@@ -17,4 +17,4 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients. // This package has the automatically generated typed clients.
package v1alpha1 package v1alpha2

View File

@@ -23,40 +23,40 @@ import (
json "encoding/json" json "encoding/json"
"fmt" "fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakePodSchedulings implements PodSchedulingInterface // FakePodSchedulings implements PodSchedulingInterface
type FakePodSchedulings struct { type FakePodSchedulings struct {
Fake *FakeResourceV1alpha1 Fake *FakeResourceV1alpha2
ns string ns string
} }
var podschedulingsResource = v1alpha1.SchemeGroupVersion.WithResource("podschedulings") var podschedulingsResource = v1alpha2.SchemeGroupVersion.WithResource("podschedulings")
var podschedulingsKind = v1alpha1.SchemeGroupVersion.WithKind("PodScheduling") var podschedulingsKind = v1alpha2.SchemeGroupVersion.WithKind("PodScheduling")
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any. // Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) { func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodScheduling, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha1.PodScheduling{}) Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors. // List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) { func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha1.PodSchedulingList{}) Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha2.PodSchedulingList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
@@ -66,8 +66,8 @@ func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (res
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
list := &v1alpha1.PodSchedulingList{ListMeta: obj.(*v1alpha1.PodSchedulingList).ListMeta} list := &v1alpha2.PodSchedulingList{ListMeta: obj.(*v1alpha2.PodSchedulingList).ListMeta}
for _, item := range obj.(*v1alpha1.PodSchedulingList).Items { for _, item := range obj.(*v1alpha2.PodSchedulingList).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
} }
@@ -83,43 +83,43 @@ func (c *FakePodSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (wa
} }
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any. // Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) { func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (result *v1alpha2.PodScheduling, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{}) Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any. // Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) { func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{}) Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error) { func (c *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha1.PodScheduling{}) Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs. // Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha1.PodScheduling{}) Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha2.PodScheduling{})
return err return err
} }
@@ -128,23 +128,23 @@ func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.De
func (c *FakePodSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { func (c *FakePodSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podschedulingsResource, c.ns, listOpts) action := testing.NewDeleteCollectionAction(podschedulingsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.PodSchedulingList{}) _, err := c.Fake.Invokes(action, &v1alpha2.PodSchedulingList{})
return err return err
} }
// Patch applies the patch and returns the patched podScheduling. // Patch applies the patch and returns the patched podScheduling.
func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) { func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodScheduling{}) Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling. // Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) { func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
if podScheduling == nil { if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil") return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
} }
@@ -157,17 +157,17 @@ func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply") return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
} }
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.PodScheduling{}) Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }
// ApplyStatus was generated because the type contains a Status member. // ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) { func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
if podScheduling == nil { if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil") return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
} }
@@ -180,10 +180,10 @@ func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *res
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply") return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
} }
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.PodScheduling{}) Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.PodScheduling{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.PodScheduling), err return obj.(*v1alpha2.PodScheduling), err
} }

View File

@@ -19,34 +19,34 @@ limitations under the License.
package fake package fake
import ( import (
v1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1" v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
type FakeResourceV1alpha1 struct { type FakeResourceV1alpha2 struct {
*testing.Fake *testing.Fake
} }
func (c *FakeResourceV1alpha1) PodSchedulings(namespace string) v1alpha1.PodSchedulingInterface { func (c *FakeResourceV1alpha2) PodSchedulings(namespace string) v1alpha2.PodSchedulingInterface {
return &FakePodSchedulings{c, namespace} return &FakePodSchedulings{c, namespace}
} }
func (c *FakeResourceV1alpha1) ResourceClaims(namespace string) v1alpha1.ResourceClaimInterface { func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.ResourceClaimInterface {
return &FakeResourceClaims{c, namespace} return &FakeResourceClaims{c, namespace}
} }
func (c *FakeResourceV1alpha1) ResourceClaimTemplates(namespace string) v1alpha1.ResourceClaimTemplateInterface { func (c *FakeResourceV1alpha2) ResourceClaimTemplates(namespace string) v1alpha2.ResourceClaimTemplateInterface {
return &FakeResourceClaimTemplates{c, namespace} return &FakeResourceClaimTemplates{c, namespace}
} }
func (c *FakeResourceV1alpha1) ResourceClasses() v1alpha1.ResourceClassInterface { func (c *FakeResourceV1alpha2) ResourceClasses() v1alpha2.ResourceClassInterface {
return &FakeResourceClasses{c} return &FakeResourceClasses{c}
} }
// RESTClient returns a RESTClient that is used to communicate // RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation. // with API server by this client implementation.
func (c *FakeResourceV1alpha1) RESTClient() rest.Interface { func (c *FakeResourceV1alpha2) RESTClient() rest.Interface {
var ret *rest.RESTClient var ret *rest.RESTClient
return ret return ret
} }

View File

@@ -23,40 +23,40 @@ import (
json "encoding/json" json "encoding/json"
"fmt" "fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakeResourceClaims implements ResourceClaimInterface // FakeResourceClaims implements ResourceClaimInterface
type FakeResourceClaims struct { type FakeResourceClaims struct {
Fake *FakeResourceV1alpha1 Fake *FakeResourceV1alpha2
ns string ns string
} }
var resourceclaimsResource = v1alpha1.SchemeGroupVersion.WithResource("resourceclaims") var resourceclaimsResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaims")
var resourceclaimsKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceClaim") var resourceclaimsKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim")
// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any. // Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any.
func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaim, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(resourceclaimsResource, c.ns, name), &v1alpha1.ResourceClaim{}) Invokes(testing.NewGetAction(resourceclaimsResource, c.ns, name), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }
// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors. // List takes label and field selectors, and returns the list of ResourceClaims that match those selectors.
func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimList, err error) { func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(resourceclaimsResource, resourceclaimsKind, c.ns, opts), &v1alpha1.ResourceClaimList{}) Invokes(testing.NewListAction(resourceclaimsResource, resourceclaimsKind, c.ns, opts), &v1alpha2.ResourceClaimList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
@@ -66,8 +66,8 @@ func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (res
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
list := &v1alpha1.ResourceClaimList{ListMeta: obj.(*v1alpha1.ResourceClaimList).ListMeta} list := &v1alpha2.ResourceClaimList{ListMeta: obj.(*v1alpha2.ResourceClaimList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceClaimList).Items { for _, item := range obj.(*v1alpha2.ResourceClaimList).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
} }
@@ -83,43 +83,43 @@ func (c *FakeResourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (wa
} }
// Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any. // Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (result *v1alpha2.ResourceClaim, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{}) Invokes(testing.NewCreateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }
// Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any. // Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{}) Invokes(testing.NewUpdateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error) { func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.ResourceClaim, error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(resourceclaimsResource, "status", c.ns, resourceClaim), &v1alpha1.ResourceClaim{}) Invokes(testing.NewUpdateSubresourceAction(resourceclaimsResource, "status", c.ns, resourceClaim), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }
// Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs. // Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha1.ResourceClaim{}) Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha2.ResourceClaim{})
return err return err
} }
@@ -128,23 +128,23 @@ func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.De
func (c *FakeResourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { func (c *FakeResourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(resourceclaimsResource, c.ns, listOpts) action := testing.NewDeleteCollectionAction(resourceclaimsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimList{}) _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimList{})
return err return err
} }
// Patch applies the patch and returns the patched resourceClaim. // Patch applies the patch and returns the patched resourceClaim.
func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error) { func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaim{}) Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim. // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
if resourceClaim == nil { if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
} }
@@ -157,17 +157,17 @@ func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
} }
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaim{}) Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }
// ApplyStatus was generated because the type contains a Status member. // ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
if resourceClaim == nil { if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
} }
@@ -180,10 +180,10 @@ func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *res
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
} }
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ResourceClaim{}) Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.ResourceClaim{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaim), err return obj.(*v1alpha2.ResourceClaim), err
} }

View File

@@ -23,40 +23,40 @@ import (
json "encoding/json" json "encoding/json"
"fmt" "fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakeResourceClaimTemplates implements ResourceClaimTemplateInterface // FakeResourceClaimTemplates implements ResourceClaimTemplateInterface
type FakeResourceClaimTemplates struct { type FakeResourceClaimTemplates struct {
Fake *FakeResourceV1alpha1 Fake *FakeResourceV1alpha2
ns string ns string
} }
var resourceclaimtemplatesResource = v1alpha1.SchemeGroupVersion.WithResource("resourceclaimtemplates") var resourceclaimtemplatesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates")
var resourceclaimtemplatesKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplate") var resourceclaimtemplatesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplate")
// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any. // Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any.
func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(resourceclaimtemplatesResource, c.ns, name), &v1alpha1.ResourceClaimTemplate{}) Invokes(testing.NewGetAction(resourceclaimtemplatesResource, c.ns, name), &v1alpha2.ResourceClaimTemplate{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaimTemplate), err return obj.(*v1alpha2.ResourceClaimTemplate), err
} }
// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors. // List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors.
func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimTemplateList, err error) { func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), &v1alpha1.ResourceClaimTemplateList{}) Invokes(testing.NewListAction(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), &v1alpha2.ResourceClaimTemplateList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
@@ -66,8 +66,8 @@ func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptio
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
list := &v1alpha1.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha1.ResourceClaimTemplateList).ListMeta} list := &v1alpha2.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha2.ResourceClaimTemplateList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceClaimTemplateList).Items { for _, item := range obj.(*v1alpha2.ResourceClaimTemplateList).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
} }
@@ -83,31 +83,31 @@ func (c *FakeResourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOpti
} }
// Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. // Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{}) Invokes(testing.NewCreateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha2.ResourceClaimTemplate{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaimTemplate), err return obj.(*v1alpha2.ResourceClaimTemplate), err
} }
// Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. // Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{}) Invokes(testing.NewUpdateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha2.ResourceClaimTemplate{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaimTemplate), err return obj.(*v1alpha2.ResourceClaimTemplate), err
} }
// Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs. // Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha1.ResourceClaimTemplate{}) Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha2.ResourceClaimTemplate{})
return err return err
} }
@@ -116,23 +116,23 @@ func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, op
func (c *FakeResourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { func (c *FakeResourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(resourceclaimtemplatesResource, c.ns, listOpts) action := testing.NewDeleteCollectionAction(resourceclaimtemplatesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimTemplateList{}) _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimTemplateList{})
return err return err
} }
// Patch applies the patch and returns the patched resourceClaimTemplate. // Patch applies the patch and returns the patched resourceClaimTemplate.
func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaimTemplate{}) Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaimTemplate{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaimTemplate), err return obj.(*v1alpha2.ResourceClaimTemplate), err
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate. // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
if resourceClaimTemplate == nil { if resourceClaimTemplate == nil {
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil") return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
} }
@@ -145,10 +145,10 @@ func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTem
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply") return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
} }
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaimTemplate{}) Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaimTemplate{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClaimTemplate), err return obj.(*v1alpha2.ResourceClaimTemplate), err
} }

View File

@@ -23,38 +23,38 @@ import (
json "encoding/json" json "encoding/json"
"fmt" "fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakeResourceClasses implements ResourceClassInterface // FakeResourceClasses implements ResourceClassInterface
type FakeResourceClasses struct { type FakeResourceClasses struct {
Fake *FakeResourceV1alpha1 Fake *FakeResourceV1alpha2
} }
var resourceclassesResource = v1alpha1.SchemeGroupVersion.WithResource("resourceclasses") var resourceclassesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclasses")
var resourceclassesKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceClass") var resourceclassesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClass")
// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any. // Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any.
func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClass, err error) { func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClass, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewRootGetAction(resourceclassesResource, name), &v1alpha1.ResourceClass{}) Invokes(testing.NewRootGetAction(resourceclassesResource, name), &v1alpha2.ResourceClass{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClass), err return obj.(*v1alpha2.ResourceClass), err
} }
// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors. // List takes label and field selectors, and returns the list of ResourceClasses that match those selectors.
func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClassList, err error) { func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewRootListAction(resourceclassesResource, resourceclassesKind, opts), &v1alpha1.ResourceClassList{}) Invokes(testing.NewRootListAction(resourceclassesResource, resourceclassesKind, opts), &v1alpha2.ResourceClassList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
@@ -63,8 +63,8 @@ func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (re
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
list := &v1alpha1.ResourceClassList{ListMeta: obj.(*v1alpha1.ResourceClassList).ListMeta} list := &v1alpha2.ResourceClassList{ListMeta: obj.(*v1alpha2.ResourceClassList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceClassList).Items { for _, item := range obj.(*v1alpha2.ResourceClassList).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
} }
@@ -79,29 +79,29 @@ func (c *FakeResourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (w
} }
// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any. // Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) { func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (result *v1alpha2.ResourceClass, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{}) Invokes(testing.NewRootCreateAction(resourceclassesResource, resourceClass), &v1alpha2.ResourceClass{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClass), err return obj.(*v1alpha2.ResourceClass), err
} }
// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any. // Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) { func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (result *v1alpha2.ResourceClass, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{}) Invokes(testing.NewRootUpdateAction(resourceclassesResource, resourceClass), &v1alpha2.ResourceClass{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClass), err return obj.(*v1alpha2.ResourceClass), err
} }
// Delete takes name of the resourceClass and deletes it. Returns an error if one occurs. // Delete takes name of the resourceClass and deletes it. Returns an error if one occurs.
func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha1.ResourceClass{}) Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha2.ResourceClass{})
return err return err
} }
@@ -109,22 +109,22 @@ func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.D
func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(resourceclassesResource, listOpts) action := testing.NewRootDeleteCollectionAction(resourceclassesResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClassList{}) _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClassList{})
return err return err
} }
// Patch applies the patch and returns the patched resourceClass. // Patch applies the patch and returns the patched resourceClass.
func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error) { func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, name, pt, data, subresources...), &v1alpha1.ResourceClass{}) Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, name, pt, data, subresources...), &v1alpha2.ResourceClass{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClass), err return obj.(*v1alpha2.ResourceClass), err
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass. // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) { func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error) {
if resourceClass == nil { if resourceClass == nil {
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil") return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
} }
@@ -137,9 +137,9 @@ func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resource
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply") return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
} }
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClass{}) Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClass{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v1alpha1.ResourceClass), err return obj.(*v1alpha2.ResourceClass), err
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
type PodSchedulingExpansion interface{} type PodSchedulingExpansion interface{}

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
@@ -24,11 +24,11 @@ import (
"fmt" "fmt"
"time" "time"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
scheme "k8s.io/client-go/kubernetes/scheme" scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
@@ -41,17 +41,17 @@ type PodSchedulingsGetter interface {
// PodSchedulingInterface has methods to work with PodScheduling resources. // PodSchedulingInterface has methods to work with PodScheduling resources.
type PodSchedulingInterface interface { type PodSchedulingInterface interface {
Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (*v1alpha1.PodScheduling, error) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (*v1alpha2.PodScheduling, error)
Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error)
UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodScheduling, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PodScheduling, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodSchedulingList, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PodSchedulingList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.PodScheduling, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error)
Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error)
ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error)
PodSchedulingExpansion PodSchedulingExpansion
} }
@@ -62,7 +62,7 @@ type podSchedulings struct {
} }
// newPodSchedulings returns a PodSchedulings // newPodSchedulings returns a PodSchedulings
func newPodSchedulings(c *ResourceV1alpha1Client, namespace string) *podSchedulings { func newPodSchedulings(c *ResourceV1alpha2Client, namespace string) *podSchedulings {
return &podSchedulings{ return &podSchedulings{
client: c.RESTClient(), client: c.RESTClient(),
ns: namespace, ns: namespace,
@@ -70,8 +70,8 @@ func newPodSchedulings(c *ResourceV1alpha1Client, namespace string) *podScheduli
} }
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any. // Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -83,12 +83,12 @@ func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOpt
} }
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors. // List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
func (c *podSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) { func (c *podSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingList, err error) {
var timeout time.Duration var timeout time.Duration
if opts.TimeoutSeconds != nil { if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
} }
result = &v1alpha1.PodSchedulingList{} result = &v1alpha2.PodSchedulingList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -115,8 +115,8 @@ func (c *podSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.
} }
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any. // Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (result *v1alpha2.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Post(). err = c.client.Post().
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -128,8 +128,8 @@ func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.Pod
} }
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any. // Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -143,8 +143,8 @@ func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.Pod
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *podSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -185,8 +185,8 @@ func (c *podSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
} }
// Patch applies the patch and returns the patched podScheduling. // Patch applies the patch and returns the patched podScheduling.
func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Patch(pt). err = c.client.Patch(pt).
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -200,7 +200,7 @@ func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchT
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling. // Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
if podScheduling == nil { if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil") return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
} }
@@ -213,7 +213,7 @@ func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alp
if name == nil { if name == nil {
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply") return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
} }
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Patch(types.ApplyPatchType). err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").
@@ -227,7 +227,7 @@ func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alp
// ApplyStatus was generated because the type contains a Status member. // ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) { func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
if podScheduling == nil { if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil") return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
} }
@@ -242,7 +242,7 @@ func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourc
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply") return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
} }
result = &v1alpha1.PodScheduling{} result = &v1alpha2.PodScheduling{}
err = c.client.Patch(types.ApplyPatchType). err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns). Namespace(c.ns).
Resource("podschedulings"). Resource("podschedulings").

View File

@@ -16,17 +16,17 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"net/http" "net/http"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
type ResourceV1alpha1Interface interface { type ResourceV1alpha2Interface interface {
RESTClient() rest.Interface RESTClient() rest.Interface
PodSchedulingsGetter PodSchedulingsGetter
ResourceClaimsGetter ResourceClaimsGetter
@@ -34,31 +34,31 @@ type ResourceV1alpha1Interface interface {
ResourceClassesGetter ResourceClassesGetter
} }
// ResourceV1alpha1Client is used to interact with features provided by the resource.k8s.io group. // ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group.
type ResourceV1alpha1Client struct { type ResourceV1alpha2Client struct {
restClient rest.Interface restClient rest.Interface
} }
func (c *ResourceV1alpha1Client) PodSchedulings(namespace string) PodSchedulingInterface { func (c *ResourceV1alpha2Client) PodSchedulings(namespace string) PodSchedulingInterface {
return newPodSchedulings(c, namespace) return newPodSchedulings(c, namespace)
} }
func (c *ResourceV1alpha1Client) ResourceClaims(namespace string) ResourceClaimInterface { func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimInterface {
return newResourceClaims(c, namespace) return newResourceClaims(c, namespace)
} }
func (c *ResourceV1alpha1Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
return newResourceClaimTemplates(c, namespace) return newResourceClaimTemplates(c, namespace)
} }
func (c *ResourceV1alpha1Client) ResourceClasses() ResourceClassInterface { func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface {
return newResourceClasses(c) return newResourceClasses(c)
} }
// NewForConfig creates a new ResourceV1alpha1Client for the given config. // NewForConfig creates a new ResourceV1alpha2Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c). // where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*ResourceV1alpha1Client, error) { func NewForConfig(c *rest.Config) (*ResourceV1alpha2Client, error) {
config := *c config := *c
if err := setConfigDefaults(&config); err != nil { if err := setConfigDefaults(&config); err != nil {
return nil, err return nil, err
@@ -70,9 +70,9 @@ func NewForConfig(c *rest.Config) (*ResourceV1alpha1Client, error) {
return NewForConfigAndClient(&config, httpClient) return NewForConfigAndClient(&config, httpClient)
} }
// NewForConfigAndClient creates a new ResourceV1alpha1Client for the given config and http client. // NewForConfigAndClient creates a new ResourceV1alpha2Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values. // Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha1Client, error) { func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha2Client, error) {
config := *c config := *c
if err := setConfigDefaults(&config); err != nil { if err := setConfigDefaults(&config); err != nil {
return nil, err return nil, err
@@ -81,12 +81,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha1Cli
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &ResourceV1alpha1Client{client}, nil return &ResourceV1alpha2Client{client}, nil
} }
// NewForConfigOrDie creates a new ResourceV1alpha1Client for the given config and // NewForConfigOrDie creates a new ResourceV1alpha2Client for the given config and
// panics if there is an error in the config. // panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha1Client { func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha2Client {
client, err := NewForConfig(c) client, err := NewForConfig(c)
if err != nil { if err != nil {
panic(err) panic(err)
@@ -94,13 +94,13 @@ func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha1Client {
return client return client
} }
// New creates a new ResourceV1alpha1Client for the given RESTClient. // New creates a new ResourceV1alpha2Client for the given RESTClient.
func New(c rest.Interface) *ResourceV1alpha1Client { func New(c rest.Interface) *ResourceV1alpha2Client {
return &ResourceV1alpha1Client{c} return &ResourceV1alpha2Client{c}
} }
func setConfigDefaults(config *rest.Config) error { func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion gv := v1alpha2.SchemeGroupVersion
config.GroupVersion = &gv config.GroupVersion = &gv
config.APIPath = "/apis" config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
@@ -114,7 +114,7 @@ func setConfigDefaults(config *rest.Config) error {
// RESTClient returns a RESTClient that is used to communicate // RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation. // with API server by this client implementation.
func (c *ResourceV1alpha1Client) RESTClient() rest.Interface { func (c *ResourceV1alpha2Client) RESTClient() rest.Interface {
if c == nil { if c == nil {
return nil return nil
} }

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
@@ -24,11 +24,11 @@ import (
"fmt" "fmt"
"time" "time"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
scheme "k8s.io/client-go/kubernetes/scheme" scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
@@ -41,17 +41,17 @@ type ResourceClaimsGetter interface {
// ResourceClaimInterface has methods to work with ResourceClaim resources. // ResourceClaimInterface has methods to work with ResourceClaim resources.
type ResourceClaimInterface interface { type ResourceClaimInterface interface {
Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (*v1alpha1.ResourceClaim, error) Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (*v1alpha2.ResourceClaim, error)
Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error) Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.ResourceClaim, error)
UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error) UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.ResourceClaim, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceClaim, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaim, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClaimList, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.ResourceClaim, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error)
Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error)
ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error)
ResourceClaimExpansion ResourceClaimExpansion
} }
@@ -62,7 +62,7 @@ type resourceClaims struct {
} }
// newResourceClaims returns a ResourceClaims // newResourceClaims returns a ResourceClaims
func newResourceClaims(c *ResourceV1alpha1Client, namespace string) *resourceClaims { func newResourceClaims(c *ResourceV1alpha2Client, namespace string) *resourceClaims {
return &resourceClaims{ return &resourceClaims{
client: c.RESTClient(), client: c.RESTClient(),
ns: namespace, ns: namespace,
@@ -70,8 +70,8 @@ func newResourceClaims(c *ResourceV1alpha1Client, namespace string) *resourceCla
} }
// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any. // Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any.
func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -83,12 +83,12 @@ func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOpt
} }
// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors. // List takes label and field selectors, and returns the list of ResourceClaims that match those selectors.
func (c *resourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimList, err error) { func (c *resourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) {
var timeout time.Duration var timeout time.Duration
if opts.TimeoutSeconds != nil { if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
} }
result = &v1alpha1.ResourceClaimList{} result = &v1alpha2.ResourceClaimList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -115,8 +115,8 @@ func (c *resourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.
} }
// Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any. // Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (result *v1alpha2.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Post(). err = c.client.Post().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -128,8 +128,8 @@ func (c *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.Res
} }
// Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any. // Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -143,8 +143,8 @@ func (c *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.Res
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *resourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -185,8 +185,8 @@ func (c *resourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
} }
// Patch applies the patch and returns the patched resourceClaim. // Patch applies the patch and returns the patched resourceClaim.
func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Patch(pt). err = c.client.Patch(pt).
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -200,7 +200,7 @@ func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchT
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim. // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
if resourceClaim == nil { if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
} }
@@ -213,7 +213,7 @@ func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alp
if name == nil { if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
} }
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Patch(types.ApplyPatchType). err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").
@@ -227,7 +227,7 @@ func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alp
// ApplyStatus was generated because the type contains a Status member. // ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) { func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
if resourceClaim == nil { if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
} }
@@ -242,7 +242,7 @@ func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourc
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
} }
result = &v1alpha1.ResourceClaim{} result = &v1alpha2.ResourceClaim{}
err = c.client.Patch(types.ApplyPatchType). err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaims"). Resource("resourceclaims").

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
@@ -24,11 +24,11 @@ import (
"fmt" "fmt"
"time" "time"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
scheme "k8s.io/client-go/kubernetes/scheme" scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
@@ -41,15 +41,15 @@ type ResourceClaimTemplatesGetter interface {
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources. // ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
type ResourceClaimTemplateInterface interface { type ResourceClaimTemplateInterface interface {
Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (*v1alpha1.ResourceClaimTemplate, error) Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (*v1alpha2.ResourceClaimTemplate, error)
Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (*v1alpha1.ResourceClaimTemplate, error) Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimTemplate, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceClaimTemplate, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimTemplate, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClaimTemplateList, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimTemplateList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.ResourceClaimTemplate, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error)
Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error)
ResourceClaimTemplateExpansion ResourceClaimTemplateExpansion
} }
@@ -60,7 +60,7 @@ type resourceClaimTemplates struct {
} }
// newResourceClaimTemplates returns a ResourceClaimTemplates // newResourceClaimTemplates returns a ResourceClaimTemplates
func newResourceClaimTemplates(c *ResourceV1alpha1Client, namespace string) *resourceClaimTemplates { func newResourceClaimTemplates(c *ResourceV1alpha2Client, namespace string) *resourceClaimTemplates {
return &resourceClaimTemplates{ return &resourceClaimTemplates{
client: c.RESTClient(), client: c.RESTClient(),
ns: namespace, ns: namespace,
@@ -68,8 +68,8 @@ func newResourceClaimTemplates(c *ResourceV1alpha1Client, namespace string) *res
} }
// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any. // Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any.
func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{} result = &v1alpha2.ResourceClaimTemplate{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaimtemplates"). Resource("resourceclaimtemplates").
@@ -81,12 +81,12 @@ func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v
} }
// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors. // List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors.
func (c *resourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimTemplateList, err error) { func (c *resourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) {
var timeout time.Duration var timeout time.Duration
if opts.TimeoutSeconds != nil { if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
} }
result = &v1alpha1.ResourceClaimTemplateList{} result = &v1alpha2.ResourceClaimTemplateList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaimtemplates"). Resource("resourceclaimtemplates").
@@ -113,8 +113,8 @@ func (c *resourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOptions)
} }
// Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. // Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{} result = &v1alpha2.ResourceClaimTemplate{}
err = c.client.Post(). err = c.client.Post().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaimtemplates"). Resource("resourceclaimtemplates").
@@ -126,8 +126,8 @@ func (c *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTempla
} }
// Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. // Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *resourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *resourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{} result = &v1alpha2.ResourceClaimTemplate{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaimtemplates"). Resource("resourceclaimtemplates").
@@ -167,8 +167,8 @@ func (c *resourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.D
} }
// Patch applies the patch and returns the patched resourceClaimTemplate. // Patch applies the patch and returns the patched resourceClaimTemplate.
func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{} result = &v1alpha2.ResourceClaimTemplate{}
err = c.client.Patch(pt). err = c.client.Patch(pt).
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaimtemplates"). Resource("resourceclaimtemplates").
@@ -182,7 +182,7 @@ func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt type
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate. // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) { func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
if resourceClaimTemplate == nil { if resourceClaimTemplate == nil {
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil") return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
} }
@@ -195,7 +195,7 @@ func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplat
if name == nil { if name == nil {
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply") return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
} }
result = &v1alpha1.ResourceClaimTemplate{} result = &v1alpha2.ResourceClaimTemplate{}
err = c.client.Patch(types.ApplyPatchType). err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns). Namespace(c.ns).
Resource("resourceclaimtemplates"). Resource("resourceclaimtemplates").

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT. // Code generated by client-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
@@ -24,11 +24,11 @@ import (
"fmt" "fmt"
"time" "time"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
scheme "k8s.io/client-go/kubernetes/scheme" scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
@@ -41,15 +41,15 @@ type ResourceClassesGetter interface {
// ResourceClassInterface has methods to work with ResourceClass resources. // ResourceClassInterface has methods to work with ResourceClass resources.
type ResourceClassInterface interface { type ResourceClassInterface interface {
Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (*v1alpha1.ResourceClass, error) Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (*v1alpha2.ResourceClass, error)
Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (*v1alpha1.ResourceClass, error) Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (*v1alpha2.ResourceClass, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceClass, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClass, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClassList, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, 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 *v1alpha1.ResourceClass, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error)
Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error)
ResourceClassExpansion ResourceClassExpansion
} }
@@ -59,15 +59,15 @@ type resourceClasses struct {
} }
// newResourceClasses returns a ResourceClasses // newResourceClasses returns a ResourceClasses
func newResourceClasses(c *ResourceV1alpha1Client) *resourceClasses { func newResourceClasses(c *ResourceV1alpha2Client) *resourceClasses {
return &resourceClasses{ return &resourceClasses{
client: c.RESTClient(), client: c.RESTClient(),
} }
} }
// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any. // Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any.
func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClass, err error) { func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{} result = &v1alpha2.ResourceClass{}
err = c.client.Get(). err = c.client.Get().
Resource("resourceclasses"). Resource("resourceclasses").
Name(name). Name(name).
@@ -78,12 +78,12 @@ func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOp
} }
// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors. // List takes label and field selectors, and returns the list of ResourceClasses that match those selectors.
func (c *resourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClassList, err error) { func (c *resourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) {
var timeout time.Duration var timeout time.Duration
if opts.TimeoutSeconds != nil { if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
} }
result = &v1alpha1.ResourceClassList{} result = &v1alpha2.ResourceClassList{}
err = c.client.Get(). err = c.client.Get().
Resource("resourceclasses"). Resource("resourceclasses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
@@ -108,8 +108,8 @@ func (c *resourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch
} }
// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any. // Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) { func (c *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (result *v1alpha2.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{} result = &v1alpha2.ResourceClass{}
err = c.client.Post(). err = c.client.Post().
Resource("resourceclasses"). Resource("resourceclasses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
@@ -120,8 +120,8 @@ func (c *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.Re
} }
// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any. // Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *resourceClasses) Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) { func (c *resourceClasses) Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (result *v1alpha2.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{} result = &v1alpha2.ResourceClass{}
err = c.client.Put(). err = c.client.Put().
Resource("resourceclasses"). Resource("resourceclasses").
Name(resourceClass.Name). Name(resourceClass.Name).
@@ -158,8 +158,8 @@ func (c *resourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOp
} }
// Patch applies the patch and returns the patched resourceClass. // Patch applies the patch and returns the patched resourceClass.
func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error) { func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{} result = &v1alpha2.ResourceClass{}
err = c.client.Patch(pt). err = c.client.Patch(pt).
Resource("resourceclasses"). Resource("resourceclasses").
Name(name). Name(name).
@@ -172,7 +172,7 @@ func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.Patch
} }
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass. // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) { func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error) {
if resourceClass == nil { if resourceClass == nil {
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil") return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
} }
@@ -185,7 +185,7 @@ func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1al
if name == nil { if name == nil {
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply") return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
} }
result = &v1alpha1.ResourceClass{} result = &v1alpha2.ResourceClass{}
err = c.client.Patch(types.ApplyPatchType). err = c.client.Patch(types.ApplyPatchType).
Resource("resourceclasses"). Resource("resourceclasses").
Name(*name). Name(*name).

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT. // Code generated by lister-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// PodSchedulingListerExpansion allows custom methods to be added to // PodSchedulingListerExpansion allows custom methods to be added to
// PodSchedulingLister. // PodSchedulingLister.

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT. // Code generated by lister-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
@@ -30,7 +30,7 @@ import (
type PodSchedulingLister interface { type PodSchedulingLister interface {
// List lists all PodSchedulings in the indexer. // List lists all PodSchedulings in the indexer.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error) List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error)
// PodSchedulings returns an object that can list and get PodSchedulings. // PodSchedulings returns an object that can list and get PodSchedulings.
PodSchedulings(namespace string) PodSchedulingNamespaceLister PodSchedulings(namespace string) PodSchedulingNamespaceLister
PodSchedulingListerExpansion PodSchedulingListerExpansion
@@ -47,9 +47,9 @@ func NewPodSchedulingLister(indexer cache.Indexer) PodSchedulingLister {
} }
// List lists all PodSchedulings in the indexer. // List lists all PodSchedulings in the indexer.
func (s *podSchedulingLister) List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error) { func (s *podSchedulingLister) List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) { err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.PodScheduling)) ret = append(ret, m.(*v1alpha2.PodScheduling))
}) })
return ret, err return ret, err
} }
@@ -64,10 +64,10 @@ func (s *podSchedulingLister) PodSchedulings(namespace string) PodSchedulingName
type PodSchedulingNamespaceLister interface { type PodSchedulingNamespaceLister interface {
// List lists all PodSchedulings in the indexer for a given namespace. // List lists all PodSchedulings in the indexer for a given namespace.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error) List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error)
// Get retrieves the PodScheduling from the indexer for a given namespace and name. // Get retrieves the PodScheduling from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.PodScheduling, error) Get(name string) (*v1alpha2.PodScheduling, error)
PodSchedulingNamespaceListerExpansion PodSchedulingNamespaceListerExpansion
} }
@@ -79,21 +79,21 @@ type podSchedulingNamespaceLister struct {
} }
// List lists all PodSchedulings in the indexer for a given namespace. // List lists all PodSchedulings in the indexer for a given namespace.
func (s podSchedulingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error) { func (s podSchedulingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.PodScheduling, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.PodScheduling)) ret = append(ret, m.(*v1alpha2.PodScheduling))
}) })
return ret, err return ret, err
} }
// Get retrieves the PodScheduling from the indexer for a given namespace and name. // Get retrieves the PodScheduling from the indexer for a given namespace and name.
func (s podSchedulingNamespaceLister) Get(name string) (*v1alpha1.PodScheduling, error) { func (s podSchedulingNamespaceLister) Get(name string) (*v1alpha2.PodScheduling, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if !exists { if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("podscheduling"), name) return nil, errors.NewNotFound(v1alpha2.Resource("podscheduling"), name)
} }
return obj.(*v1alpha1.PodScheduling), nil return obj.(*v1alpha2.PodScheduling), nil
} }

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT. // Code generated by lister-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
@@ -30,7 +30,7 @@ import (
type ResourceClaimLister interface { type ResourceClaimLister interface {
// List lists all ResourceClaims in the indexer. // List lists all ResourceClaims in the indexer.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaim, err error)
// ResourceClaims returns an object that can list and get ResourceClaims. // ResourceClaims returns an object that can list and get ResourceClaims.
ResourceClaims(namespace string) ResourceClaimNamespaceLister ResourceClaims(namespace string) ResourceClaimNamespaceLister
ResourceClaimListerExpansion ResourceClaimListerExpansion
@@ -47,9 +47,9 @@ func NewResourceClaimLister(indexer cache.Indexer) ResourceClaimLister {
} }
// List lists all ResourceClaims in the indexer. // List lists all ResourceClaims in the indexer.
func (s *resourceClaimLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error) { func (s *resourceClaimLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaim, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) { err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaim)) ret = append(ret, m.(*v1alpha2.ResourceClaim))
}) })
return ret, err return ret, err
} }
@@ -64,10 +64,10 @@ func (s *resourceClaimLister) ResourceClaims(namespace string) ResourceClaimName
type ResourceClaimNamespaceLister interface { type ResourceClaimNamespaceLister interface {
// List lists all ResourceClaims in the indexer for a given namespace. // List lists all ResourceClaims in the indexer for a given namespace.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaim, err error)
// Get retrieves the ResourceClaim from the indexer for a given namespace and name. // Get retrieves the ResourceClaim from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ResourceClaim, error) Get(name string) (*v1alpha2.ResourceClaim, error)
ResourceClaimNamespaceListerExpansion ResourceClaimNamespaceListerExpansion
} }
@@ -79,21 +79,21 @@ type resourceClaimNamespaceLister struct {
} }
// List lists all ResourceClaims in the indexer for a given namespace. // List lists all ResourceClaims in the indexer for a given namespace.
func (s resourceClaimNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error) { func (s resourceClaimNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaim, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaim)) ret = append(ret, m.(*v1alpha2.ResourceClaim))
}) })
return ret, err return ret, err
} }
// Get retrieves the ResourceClaim from the indexer for a given namespace and name. // Get retrieves the ResourceClaim from the indexer for a given namespace and name.
func (s resourceClaimNamespaceLister) Get(name string) (*v1alpha1.ResourceClaim, error) { func (s resourceClaimNamespaceLister) Get(name string) (*v1alpha2.ResourceClaim, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if !exists { if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("resourceclaim"), name) return nil, errors.NewNotFound(v1alpha2.Resource("resourceclaim"), name)
} }
return obj.(*v1alpha1.ResourceClaim), nil return obj.(*v1alpha2.ResourceClaim), nil
} }

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT. // Code generated by lister-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
@@ -30,7 +30,7 @@ import (
type ResourceClaimTemplateLister interface { type ResourceClaimTemplateLister interface {
// List lists all ResourceClaimTemplates in the indexer. // List lists all ResourceClaimTemplates in the indexer.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimTemplate, err error)
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates. // ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister
ResourceClaimTemplateListerExpansion ResourceClaimTemplateListerExpansion
@@ -47,9 +47,9 @@ func NewResourceClaimTemplateLister(indexer cache.Indexer) ResourceClaimTemplate
} }
// List lists all ResourceClaimTemplates in the indexer. // List lists all ResourceClaimTemplates in the indexer.
func (s *resourceClaimTemplateLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error) { func (s *resourceClaimTemplateLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimTemplate, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) { err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaimTemplate)) ret = append(ret, m.(*v1alpha2.ResourceClaimTemplate))
}) })
return ret, err return ret, err
} }
@@ -64,10 +64,10 @@ func (s *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) R
type ResourceClaimTemplateNamespaceLister interface { type ResourceClaimTemplateNamespaceLister interface {
// List lists all ResourceClaimTemplates in the indexer for a given namespace. // List lists all ResourceClaimTemplates in the indexer for a given namespace.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimTemplate, err error)
// Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name. // Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ResourceClaimTemplate, error) Get(name string) (*v1alpha2.ResourceClaimTemplate, error)
ResourceClaimTemplateNamespaceListerExpansion ResourceClaimTemplateNamespaceListerExpansion
} }
@@ -79,21 +79,21 @@ type resourceClaimTemplateNamespaceLister struct {
} }
// List lists all ResourceClaimTemplates in the indexer for a given namespace. // List lists all ResourceClaimTemplates in the indexer for a given namespace.
func (s resourceClaimTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error) { func (s resourceClaimTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimTemplate, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaimTemplate)) ret = append(ret, m.(*v1alpha2.ResourceClaimTemplate))
}) })
return ret, err return ret, err
} }
// Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name. // Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name.
func (s resourceClaimTemplateNamespaceLister) Get(name string) (*v1alpha1.ResourceClaimTemplate, error) { func (s resourceClaimTemplateNamespaceLister) Get(name string) (*v1alpha2.ResourceClaimTemplate, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if !exists { if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("resourceclaimtemplate"), name) return nil, errors.NewNotFound(v1alpha2.Resource("resourceclaimtemplate"), name)
} }
return obj.(*v1alpha1.ResourceClaimTemplate), nil return obj.(*v1alpha2.ResourceClaimTemplate), nil
} }

View File

@@ -16,10 +16,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT. // Code generated by lister-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
@@ -30,10 +30,10 @@ import (
type ResourceClassLister interface { type ResourceClassLister interface {
// List lists all ResourceClasses in the indexer. // List lists all ResourceClasses in the indexer.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClass, err error) List(selector labels.Selector) (ret []*v1alpha2.ResourceClass, err error)
// Get retrieves the ResourceClass from the index for a given name. // Get retrieves the ResourceClass from the index for a given name.
// Objects returned here must be treated as read-only. // Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ResourceClass, error) Get(name string) (*v1alpha2.ResourceClass, error)
ResourceClassListerExpansion ResourceClassListerExpansion
} }
@@ -48,21 +48,21 @@ func NewResourceClassLister(indexer cache.Indexer) ResourceClassLister {
} }
// List lists all ResourceClasses in the indexer. // List lists all ResourceClasses in the indexer.
func (s *resourceClassLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClass, err error) { func (s *resourceClassLister) List(selector labels.Selector) (ret []*v1alpha2.ResourceClass, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) { err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClass)) ret = append(ret, m.(*v1alpha2.ResourceClass))
}) })
return ret, err return ret, err
} }
// Get retrieves the ResourceClass from the index for a given name. // Get retrieves the ResourceClass from the index for a given name.
func (s *resourceClassLister) Get(name string) (*v1alpha1.ResourceClass, error) { func (s *resourceClassLister) Get(name string) (*v1alpha2.ResourceClass, error) {
obj, exists, err := s.indexer.GetByKey(name) obj, exists, err := s.indexer.GetByKey(name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if !exists { if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("resourceclass"), name) return nil, errors.NewNotFound(v1alpha2.Resource("resourceclass"), name)
} }
return obj.(*v1alpha1.ResourceClass), nil return obj.(*v1alpha2.ResourceClass), nil
} }