diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 9c7d8a48..c3f3571c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -468,7 +468,7 @@ }, { "ImportPath": "k8s.io/api", - "Rev": "3a116148c256" + "Rev": "8e35c5077a13" }, { "ImportPath": "k8s.io/apimachinery", diff --git a/applyconfigurations/discovery/v1alpha1/endpoint.go b/applyconfigurations/discovery/v1/endpoint.go similarity index 65% rename from applyconfigurations/discovery/v1alpha1/endpoint.go rename to applyconfigurations/discovery/v1/endpoint.go index b2c0861f..99303266 100644 --- a/applyconfigurations/discovery/v1alpha1/endpoint.go +++ b/applyconfigurations/discovery/v1/endpoint.go @@ -16,21 +16,22 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/core/v1" + corev1 "k8s.io/client-go/applyconfigurations/core/v1" ) // EndpointApplyConfiguration represents an declarative configuration of the Endpoint type for use // with apply. type EndpointApplyConfiguration struct { - Addresses []string `json:"addresses,omitempty"` - Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` - Hostname *string `json:"hostname,omitempty"` - TargetRef *v1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` - Topology map[string]string `json:"topology,omitempty"` - NodeName *string `json:"nodeName,omitempty"` + Addresses []string `json:"addresses,omitempty"` + Conditions *EndpointConditionsApplyConfiguration `json:"conditions,omitempty"` + Hostname *string `json:"hostname,omitempty"` + TargetRef *corev1.ObjectReferenceApplyConfiguration `json:"targetRef,omitempty"` + DeprecatedTopology map[string]string `json:"deprecatedTopology,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + Zone *string `json:"zone,omitempty"` } // EndpointApplyConfiguration constructs an declarative configuration of the Endpoint type for use with @@ -68,21 +69,21 @@ func (b *EndpointApplyConfiguration) WithHostname(value string) *EndpointApplyCo // WithTargetRef sets the TargetRef field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TargetRef field is set to the value of the last call. -func (b *EndpointApplyConfiguration) WithTargetRef(value *v1.ObjectReferenceApplyConfiguration) *EndpointApplyConfiguration { +func (b *EndpointApplyConfiguration) WithTargetRef(value *corev1.ObjectReferenceApplyConfiguration) *EndpointApplyConfiguration { b.TargetRef = value return b } -// WithTopology puts the entries into the Topology field in the declarative configuration +// WithDeprecatedTopology puts the entries into the DeprecatedTopology field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Topology field, -// overwriting an existing map entries in Topology field with the same key. -func (b *EndpointApplyConfiguration) WithTopology(entries map[string]string) *EndpointApplyConfiguration { - if b.Topology == nil && len(entries) > 0 { - b.Topology = make(map[string]string, len(entries)) +// If called multiple times, the entries provided by each call will be put on the DeprecatedTopology field, +// overwriting an existing map entries in DeprecatedTopology field with the same key. +func (b *EndpointApplyConfiguration) WithDeprecatedTopology(entries map[string]string) *EndpointApplyConfiguration { + if b.DeprecatedTopology == nil && len(entries) > 0 { + b.DeprecatedTopology = make(map[string]string, len(entries)) } for k, v := range entries { - b.Topology[k] = v + b.DeprecatedTopology[k] = v } return b } @@ -94,3 +95,11 @@ func (b *EndpointApplyConfiguration) WithNodeName(value string) *EndpointApplyCo b.NodeName = &value return b } + +// WithZone sets the Zone field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Zone field is set to the value of the last call. +func (b *EndpointApplyConfiguration) WithZone(value string) *EndpointApplyConfiguration { + b.Zone = &value + return b +} diff --git a/applyconfigurations/discovery/v1alpha1/endpointconditions.go b/applyconfigurations/discovery/v1/endpointconditions.go similarity index 99% rename from applyconfigurations/discovery/v1alpha1/endpointconditions.go rename to applyconfigurations/discovery/v1/endpointconditions.go index 1aa3c9c5..68c25dd5 100644 --- a/applyconfigurations/discovery/v1alpha1/endpointconditions.go +++ b/applyconfigurations/discovery/v1/endpointconditions.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha1 +package v1 // EndpointConditionsApplyConfiguration represents an declarative configuration of the EndpointConditions type for use // with apply. diff --git a/applyconfigurations/discovery/v1alpha1/endpointport.go b/applyconfigurations/discovery/v1/endpointport.go similarity index 99% rename from applyconfigurations/discovery/v1alpha1/endpointport.go rename to applyconfigurations/discovery/v1/endpointport.go index dd62c995..c7129560 100644 --- a/applyconfigurations/discovery/v1alpha1/endpointport.go +++ b/applyconfigurations/discovery/v1/endpointport.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( v1 "k8s.io/api/core/v1" diff --git a/applyconfigurations/discovery/v1alpha1/endpointslice.go b/applyconfigurations/discovery/v1/endpointslice.go similarity index 98% rename from applyconfigurations/discovery/v1alpha1/endpointslice.go rename to applyconfigurations/discovery/v1/endpointslice.go index 4b26b691..f80c0ded 100644 --- a/applyconfigurations/discovery/v1alpha1/endpointslice.go +++ b/applyconfigurations/discovery/v1/endpointslice.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1alpha1 "k8s.io/api/discovery/v1alpha1" + discoveryv1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" v1 "k8s.io/client-go/applyconfigurations/meta/v1" @@ -30,7 +30,7 @@ import ( type EndpointSliceApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - AddressType *v1alpha1.AddressType `json:"addressType,omitempty"` + AddressType *discoveryv1.AddressType `json:"addressType,omitempty"` Endpoints []EndpointApplyConfiguration `json:"endpoints,omitempty"` Ports []EndpointPortApplyConfiguration `json:"ports,omitempty"` } @@ -42,7 +42,7 @@ func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("EndpointSlice") - b.WithAPIVersion("discovery.k8s.io/v1alpha1") + b.WithAPIVersion("discovery.k8s.io/v1") return b } @@ -225,7 +225,7 @@ func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExis // WithAddressType sets the AddressType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AddressType field is set to the value of the last call. -func (b *EndpointSliceApplyConfiguration) WithAddressType(value v1alpha1.AddressType) *EndpointSliceApplyConfiguration { +func (b *EndpointSliceApplyConfiguration) WithAddressType(value discoveryv1.AddressType) *EndpointSliceApplyConfiguration { b.AddressType = &value return b } diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index d529112d..8ff87aa6 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -35,12 +35,12 @@ import ( coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" - v1alpha1 "k8s.io/api/discovery/v1alpha1" + discoveryv1 "k8s.io/api/discovery/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" networkingv1 "k8s.io/api/networking/v1" @@ -76,12 +76,12 @@ import ( applyconfigurationscoordinationv1 "k8s.io/client-go/applyconfigurations/coordination/v1" applyconfigurationscoordinationv1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1" - discoveryv1alpha1 "k8s.io/client-go/applyconfigurations/discovery/v1alpha1" + applyconfigurationsdiscoveryv1 "k8s.io/client-go/applyconfigurations/discovery/v1" applyconfigurationsdiscoveryv1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" applyconfigurationseventsv1 "k8s.io/client-go/applyconfigurations/events/v1" applyconfigurationseventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" - applyconfigurationsflowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" + flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" applyconfigurationsflowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" applyconfigurationsimagepolicyv1alpha1 "k8s.io/client-go/applyconfigurations/imagepolicy/v1alpha1" applyconfigurationsmetav1 "k8s.io/client-go/applyconfigurations/meta/v1" @@ -772,15 +772,15 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case corev1.SchemeGroupVersion.WithKind("WindowsSecurityContextOptions"): return &applyconfigurationscorev1.WindowsSecurityContextOptionsApplyConfiguration{} - // Group=discovery.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithKind("Endpoint"): - return &discoveryv1alpha1.EndpointApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("EndpointConditions"): - return &discoveryv1alpha1.EndpointConditionsApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("EndpointPort"): - return &discoveryv1alpha1.EndpointPortApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("EndpointSlice"): - return &discoveryv1alpha1.EndpointSliceApplyConfiguration{} + // Group=discovery.k8s.io, Version=v1 + case discoveryv1.SchemeGroupVersion.WithKind("Endpoint"): + return &applyconfigurationsdiscoveryv1.EndpointApplyConfiguration{} + case discoveryv1.SchemeGroupVersion.WithKind("EndpointConditions"): + return &applyconfigurationsdiscoveryv1.EndpointConditionsApplyConfiguration{} + case discoveryv1.SchemeGroupVersion.WithKind("EndpointPort"): + return &applyconfigurationsdiscoveryv1.EndpointPortApplyConfiguration{} + case discoveryv1.SchemeGroupVersion.WithKind("EndpointSlice"): + return &applyconfigurationsdiscoveryv1.EndpointSliceApplyConfiguration{} // Group=discovery.k8s.io, Version=v1beta1 case discoveryv1beta1.SchemeGroupVersion.WithKind("Endpoint"): @@ -899,46 +899,46 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationsextensionsv1beta1.SupplementalGroupsStrategyOptionsApplyConfiguration{} // Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1 - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"): - return &applyconfigurationsflowcontrolv1alpha1.FlowDistinguisherMethodApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchema"): - return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchemaCondition"): - return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaConditionApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchemaSpec"): - return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaSpecApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchemaStatus"): - return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaStatusApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("GroupSubject"): - return &applyconfigurationsflowcontrolv1alpha1.GroupSubjectApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("LimitedPriorityLevelConfiguration"): - return &applyconfigurationsflowcontrolv1alpha1.LimitedPriorityLevelConfigurationApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("LimitResponse"): - return &applyconfigurationsflowcontrolv1alpha1.LimitResponseApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("NonResourcePolicyRule"): - return &applyconfigurationsflowcontrolv1alpha1.NonResourcePolicyRuleApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PolicyRulesWithSubjects"): - return &applyconfigurationsflowcontrolv1alpha1.PolicyRulesWithSubjectsApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfiguration"): - return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationCondition"): - return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationConditionApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationReference"): - return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationReferenceApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationSpec"): - return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationSpecApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationStatus"): - return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationStatusApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("QueuingConfiguration"): - return &applyconfigurationsflowcontrolv1alpha1.QueuingConfigurationApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("ResourcePolicyRule"): - return &applyconfigurationsflowcontrolv1alpha1.ResourcePolicyRuleApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("ServiceAccountSubject"): - return &applyconfigurationsflowcontrolv1alpha1.ServiceAccountSubjectApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("Subject"): - return &applyconfigurationsflowcontrolv1alpha1.SubjectApplyConfiguration{} - case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("UserSubject"): - return &applyconfigurationsflowcontrolv1alpha1.UserSubjectApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"): + return &flowcontrolv1alpha1.FlowDistinguisherMethodApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FlowSchema"): + return &flowcontrolv1alpha1.FlowSchemaApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FlowSchemaCondition"): + return &flowcontrolv1alpha1.FlowSchemaConditionApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FlowSchemaSpec"): + return &flowcontrolv1alpha1.FlowSchemaSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("FlowSchemaStatus"): + return &flowcontrolv1alpha1.FlowSchemaStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("GroupSubject"): + return &flowcontrolv1alpha1.GroupSubjectApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("LimitedPriorityLevelConfiguration"): + return &flowcontrolv1alpha1.LimitedPriorityLevelConfigurationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("LimitResponse"): + return &flowcontrolv1alpha1.LimitResponseApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("NonResourcePolicyRule"): + return &flowcontrolv1alpha1.NonResourcePolicyRuleApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("PolicyRulesWithSubjects"): + return &flowcontrolv1alpha1.PolicyRulesWithSubjectsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfiguration"): + return &flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationCondition"): + return &flowcontrolv1alpha1.PriorityLevelConfigurationConditionApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationReference"): + return &flowcontrolv1alpha1.PriorityLevelConfigurationReferenceApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationSpec"): + return &flowcontrolv1alpha1.PriorityLevelConfigurationSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationStatus"): + return &flowcontrolv1alpha1.PriorityLevelConfigurationStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("QueuingConfiguration"): + return &flowcontrolv1alpha1.QueuingConfigurationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ResourcePolicyRule"): + return &flowcontrolv1alpha1.ResourcePolicyRuleApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ServiceAccountSubject"): + return &flowcontrolv1alpha1.ServiceAccountSubjectApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("Subject"): + return &flowcontrolv1alpha1.SubjectApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("UserSubject"): + return &flowcontrolv1alpha1.UserSubjectApplyConfiguration{} // Group=flowcontrol.apiserver.k8s.io, Version=v1beta1 case flowcontrolv1beta1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"): diff --git a/go.mod b/go.mod index b439a91c..65ccb5f3 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba - k8s.io/api v0.0.0-20210306232341-3a116148c256 + k8s.io/api v0.0.0-20210307052319-8e35c5077a13 k8s.io/apimachinery v0.0.0-20210306132128-283a3268598b k8s.io/klog/v2 v2.5.0 k8s.io/utils v0.0.0-20201110183641-67b214c5f920 @@ -35,6 +35,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20210306232341-3a116148c256 + k8s.io/api => k8s.io/api v0.0.0-20210307052319-8e35c5077a13 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210306132128-283a3268598b ) diff --git a/go.sum b/go.sum index 1393ae28..a2d5e614 100644 --- a/go.sum +++ b/go.sum @@ -426,7 +426,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20210306232341-3a116148c256/go.mod h1:oXIlxI7P0Fm+wAl92K966U84hJ8jYH+vvhPMIFggXJQ= +k8s.io/api v0.0.0-20210307052319-8e35c5077a13/go.mod h1:oXIlxI7P0Fm+wAl92K966U84hJ8jYH+vvhPMIFggXJQ= k8s.io/apimachinery v0.0.0-20210306132128-283a3268598b/go.mod h1:2LERmYT9PI3b4uQt87vnb2UVkblBDzZhucIf8PxvJ2o= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= diff --git a/informers/discovery/interface.go b/informers/discovery/interface.go index c0cae331..37da9371 100644 --- a/informers/discovery/interface.go +++ b/informers/discovery/interface.go @@ -19,15 +19,15 @@ limitations under the License. package discovery import ( - v1alpha1 "k8s.io/client-go/informers/discovery/v1alpha1" + v1 "k8s.io/client-go/informers/discovery/v1" v1beta1 "k8s.io/client-go/informers/discovery/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -43,9 +43,9 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) } // V1beta1 returns a new v1beta1.Interface. diff --git a/informers/discovery/v1alpha1/endpointslice.go b/informers/discovery/v1/endpointslice.go similarity index 78% rename from informers/discovery/v1alpha1/endpointslice.go rename to informers/discovery/v1/endpointslice.go index c5e383c0..6c6c3372 100644 --- a/informers/discovery/v1alpha1/endpointslice.go +++ b/informers/discovery/v1/endpointslice.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" time "time" - discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + discoveryv1 "k8s.io/api/discovery/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha1 "k8s.io/client-go/listers/discovery/v1alpha1" + v1 "k8s.io/client-go/listers/discovery/v1" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // EndpointSlices. type EndpointSliceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.EndpointSliceLister + Lister() v1.EndpointSliceLister } type endpointSliceInformer struct { @@ -58,20 +58,20 @@ func NewEndpointSliceInformer(client kubernetes.Interface, namespace string, res func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1alpha1().EndpointSlices(namespace).List(context.TODO(), options) + return client.DiscoveryV1().EndpointSlices(namespace).List(context.TODO(), options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1alpha1().EndpointSlices(namespace).Watch(context.TODO(), options) + return client.DiscoveryV1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, - &discoveryv1alpha1.EndpointSlice{}, + &discoveryv1.EndpointSlice{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *endpointSliceInformer) defaultInformer(client kubernetes.Interface, res } func (f *endpointSliceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&discoveryv1alpha1.EndpointSlice{}, f.defaultInformer) + return f.factory.InformerFor(&discoveryv1.EndpointSlice{}, f.defaultInformer) } -func (f *endpointSliceInformer) Lister() v1alpha1.EndpointSliceLister { - return v1alpha1.NewEndpointSliceLister(f.Informer().GetIndexer()) +func (f *endpointSliceInformer) Lister() v1.EndpointSliceLister { + return v1.NewEndpointSliceLister(f.Informer().GetIndexer()) } diff --git a/informers/discovery/v1alpha1/interface.go b/informers/discovery/v1/interface.go similarity index 98% rename from informers/discovery/v1alpha1/interface.go rename to informers/discovery/v1/interface.go index 711dcae5..d90c63c0 100644 --- a/informers/discovery/v1alpha1/interface.go +++ b/informers/discovery/v1/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" diff --git a/informers/generic.go b/informers/generic.go index fddc4f7f..bc60c341 100644 --- a/informers/generic.go +++ b/informers/generic.go @@ -37,12 +37,12 @@ import ( coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" - v1alpha1 "k8s.io/api/discovery/v1alpha1" + discoveryv1 "k8s.io/api/discovery/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" networkingv1 "k8s.io/api/networking/v1" networkingv1beta1 "k8s.io/api/networking/v1beta1" @@ -205,9 +205,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case corev1.SchemeGroupVersion.WithResource("serviceaccounts"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil - // Group=discovery.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("endpointslices"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1alpha1().EndpointSlices().Informer()}, nil + // Group=discovery.k8s.io, Version=v1 + case discoveryv1.SchemeGroupVersion.WithResource("endpointslices"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1().EndpointSlices().Informer()}, nil // Group=discovery.k8s.io, Version=v1beta1 case discoveryv1beta1.SchemeGroupVersion.WithResource("endpointslices"): @@ -236,9 +236,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil // Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1 - case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("flowschemas"): + case v1alpha1.SchemeGroupVersion.WithResource("flowschemas"): return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().FlowSchemas().Informer()}, nil - case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"): + case v1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"): return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().PriorityLevelConfigurations().Informer()}, nil // Group=flowcontrol.apiserver.k8s.io, Version=v1beta1 diff --git a/kubernetes/clientset.go b/kubernetes/clientset.go index 72bffab0..a9b74459 100644 --- a/kubernetes/clientset.go +++ b/kubernetes/clientset.go @@ -42,7 +42,7 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1" + discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1" discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" @@ -90,7 +90,7 @@ type Interface interface { CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface CoordinationV1() coordinationv1.CoordinationV1Interface CoreV1() corev1.CoreV1Interface - DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface + DiscoveryV1() discoveryv1.DiscoveryV1Interface DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface EventsV1() eventsv1.EventsV1Interface EventsV1beta1() eventsv1beta1.EventsV1beta1Interface @@ -138,7 +138,7 @@ type Clientset struct { coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client coordinationV1 *coordinationv1.CoordinationV1Client coreV1 *corev1.CoreV1Client - discoveryV1alpha1 *discoveryv1alpha1.DiscoveryV1alpha1Client + discoveryV1 *discoveryv1.DiscoveryV1Client discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client eventsV1 *eventsv1.EventsV1Client eventsV1beta1 *eventsv1beta1.EventsV1beta1Client @@ -262,9 +262,9 @@ func (c *Clientset) CoreV1() corev1.CoreV1Interface { return c.coreV1 } -// DiscoveryV1alpha1 retrieves the DiscoveryV1alpha1Client -func (c *Clientset) DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface { - return c.discoveryV1alpha1 +// DiscoveryV1 retrieves the DiscoveryV1Client +func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { + return c.discoveryV1 } // DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client @@ -473,7 +473,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.discoveryV1alpha1, err = discoveryv1alpha1.NewForConfig(&configShallowCopy) + cs.discoveryV1, err = discoveryv1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -593,7 +593,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c) cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c) cs.coreV1 = corev1.NewForConfigOrDie(c) - cs.discoveryV1alpha1 = discoveryv1alpha1.NewForConfigOrDie(c) + cs.discoveryV1 = discoveryv1.NewForConfigOrDie(c) cs.discoveryV1beta1 = discoveryv1beta1.NewForConfigOrDie(c) cs.eventsV1 = eventsv1.NewForConfigOrDie(c) cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c) @@ -643,7 +643,7 @@ func New(c rest.Interface) *Clientset { cs.coordinationV1beta1 = coordinationv1beta1.New(c) cs.coordinationV1 = coordinationv1.New(c) cs.coreV1 = corev1.New(c) - cs.discoveryV1alpha1 = discoveryv1alpha1.New(c) + cs.discoveryV1 = discoveryv1.New(c) cs.discoveryV1beta1 = discoveryv1beta1.New(c) cs.eventsV1 = eventsv1.New(c) cs.eventsV1beta1 = eventsv1beta1.New(c) diff --git a/kubernetes/fake/clientset_generated.go b/kubernetes/fake/clientset_generated.go index 0b97223b..8169545a 100644 --- a/kubernetes/fake/clientset_generated.go +++ b/kubernetes/fake/clientset_generated.go @@ -64,8 +64,8 @@ import ( fakecoordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake" - discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1" - fakediscoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake" + discoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1" + fakediscoveryv1 "k8s.io/client-go/kubernetes/typed/discovery/v1/fake" discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" fakediscoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake" eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" @@ -258,9 +258,9 @@ func (c *Clientset) CoreV1() corev1.CoreV1Interface { return &fakecorev1.FakeCoreV1{Fake: &c.Fake} } -// DiscoveryV1alpha1 retrieves the DiscoveryV1alpha1Client -func (c *Clientset) DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface { - return &fakediscoveryv1alpha1.FakeDiscoveryV1alpha1{Fake: &c.Fake} +// DiscoveryV1 retrieves the DiscoveryV1Client +func (c *Clientset) DiscoveryV1() discoveryv1.DiscoveryV1Interface { + return &fakediscoveryv1.FakeDiscoveryV1{Fake: &c.Fake} } // DiscoveryV1beta1 retrieves the DiscoveryV1beta1Client diff --git a/kubernetes/fake/register.go b/kubernetes/fake/register.go index 4e41c469..dbcf0852 100644 --- a/kubernetes/fake/register.go +++ b/kubernetes/fake/register.go @@ -39,7 +39,7 @@ import ( coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" - discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" + discoveryv1 "k8s.io/api/discovery/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" @@ -92,7 +92,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, - discoveryv1alpha1.AddToScheme, + discoveryv1.AddToScheme, discoveryv1beta1.AddToScheme, eventsv1.AddToScheme, eventsv1beta1.AddToScheme, diff --git a/kubernetes/scheme/register.go b/kubernetes/scheme/register.go index c12eef49..b8b34fad 100644 --- a/kubernetes/scheme/register.go +++ b/kubernetes/scheme/register.go @@ -39,7 +39,7 @@ import ( coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" - discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" + discoveryv1 "k8s.io/api/discovery/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" @@ -92,7 +92,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, - discoveryv1alpha1.AddToScheme, + discoveryv1.AddToScheme, discoveryv1beta1.AddToScheme, eventsv1.AddToScheme, eventsv1beta1.AddToScheme, diff --git a/kubernetes/typed/discovery/v1alpha1/discovery_client.go b/kubernetes/typed/discovery/v1/discovery_client.go similarity index 62% rename from kubernetes/typed/discovery/v1alpha1/discovery_client.go rename to kubernetes/typed/discovery/v1/discovery_client.go index e65a0988..cb263276 100644 --- a/kubernetes/typed/discovery/v1alpha1/discovery_client.go +++ b/kubernetes/typed/discovery/v1/discovery_client.go @@ -16,30 +16,30 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1alpha1 "k8s.io/api/discovery/v1alpha1" + v1 "k8s.io/api/discovery/v1" "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) -type DiscoveryV1alpha1Interface interface { +type DiscoveryV1Interface interface { RESTClient() rest.Interface EndpointSlicesGetter } -// DiscoveryV1alpha1Client is used to interact with features provided by the discovery.k8s.io group. -type DiscoveryV1alpha1Client struct { +// DiscoveryV1Client is used to interact with features provided by the discovery.k8s.io group. +type DiscoveryV1Client struct { restClient rest.Interface } -func (c *DiscoveryV1alpha1Client) EndpointSlices(namespace string) EndpointSliceInterface { +func (c *DiscoveryV1Client) EndpointSlices(namespace string) EndpointSliceInterface { return newEndpointSlices(c, namespace) } -// NewForConfig creates a new DiscoveryV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*DiscoveryV1alpha1Client, error) { +// NewForConfig creates a new DiscoveryV1Client for the given config. +func NewForConfig(c *rest.Config) (*DiscoveryV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -48,12 +48,12 @@ func NewForConfig(c *rest.Config) (*DiscoveryV1alpha1Client, error) { if err != nil { return nil, err } - return &DiscoveryV1alpha1Client{client}, nil + return &DiscoveryV1Client{client}, nil } -// NewForConfigOrDie creates a new DiscoveryV1alpha1Client for the given config and +// NewForConfigOrDie creates a new DiscoveryV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *DiscoveryV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *DiscoveryV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -61,13 +61,13 @@ func NewForConfigOrDie(c *rest.Config) *DiscoveryV1alpha1Client { return client } -// New creates a new DiscoveryV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *DiscoveryV1alpha1Client { - return &DiscoveryV1alpha1Client{c} +// New creates a new DiscoveryV1Client for the given RESTClient. +func New(c rest.Interface) *DiscoveryV1Client { + return &DiscoveryV1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -81,7 +81,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *DiscoveryV1alpha1Client) RESTClient() rest.Interface { +func (c *DiscoveryV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/kubernetes/typed/discovery/v1alpha1/doc.go b/kubernetes/typed/discovery/v1/doc.go similarity index 97% rename from kubernetes/typed/discovery/v1alpha1/doc.go rename to kubernetes/typed/discovery/v1/doc.go index df51baa4..3af5d054 100644 --- a/kubernetes/typed/discovery/v1alpha1/doc.go +++ b/kubernetes/typed/discovery/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1 diff --git a/kubernetes/typed/discovery/v1alpha1/endpointslice.go b/kubernetes/typed/discovery/v1/endpointslice.go similarity index 71% rename from kubernetes/typed/discovery/v1alpha1/endpointslice.go rename to kubernetes/typed/discovery/v1/endpointslice.go index 63b4627d..fa0d7225 100644 --- a/kubernetes/typed/discovery/v1alpha1/endpointslice.go +++ b/kubernetes/typed/discovery/v1/endpointslice.go @@ -16,14 +16,14 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" "time" - v1alpha1 "k8s.io/api/discovery/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/api/discovery/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -38,14 +38,14 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (*v1alpha1.EndpointSlice, error) - Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (*v1alpha1.EndpointSlice, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.EndpointSlice, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.EndpointSliceList, 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.EndpointSlice, err error) + Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (*v1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (*v1.EndpointSlice, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.EndpointSlice, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointSliceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) EndpointSliceExpansion } @@ -56,7 +56,7 @@ type endpointSlices struct { } // newEndpointSlices returns a EndpointSlices -func newEndpointSlices(c *DiscoveryV1alpha1Client, namespace string) *endpointSlices { +func newEndpointSlices(c *DiscoveryV1Client, namespace string) *endpointSlices { return &endpointSlices{ client: c.RESTClient(), ns: namespace, @@ -64,8 +64,8 @@ func newEndpointSlices(c *DiscoveryV1alpha1Client, namespace string) *endpointSl } // Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { - result = &v1alpha1.EndpointSlice{} +func (c *endpointSlices) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.EndpointSlice, err error) { + result = &v1.EndpointSlice{} err = c.client.Get(). Namespace(c.ns). Resource("endpointslices"). @@ -77,12 +77,12 @@ func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOpt } // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { +func (c *endpointSlices) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointSliceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.EndpointSliceList{} + result = &v1.EndpointSliceList{} err = c.client.Get(). Namespace(c.ns). Resource("endpointslices"). @@ -94,7 +94,7 @@ func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested endpointSlices. -func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *endpointSlices) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -109,8 +109,8 @@ func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (result *v1alpha1.EndpointSlice, err error) { - result = &v1alpha1.EndpointSlice{} +func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (result *v1.EndpointSlice, err error) { + result = &v1.EndpointSlice{} err = c.client.Post(). Namespace(c.ns). Resource("endpointslices"). @@ -122,8 +122,8 @@ func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.End } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (result *v1alpha1.EndpointSlice, err error) { - result = &v1alpha1.EndpointSlice{} +func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (result *v1.EndpointSlice, err error) { + result = &v1.EndpointSlice{} err = c.client.Put(). Namespace(c.ns). Resource("endpointslices"). @@ -136,7 +136,7 @@ func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.End } // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. -func (c *endpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *endpointSlices) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpointslices"). @@ -147,7 +147,7 @@ func (c *endpointSlices) Delete(ctx context.Context, name string, opts v1.Delete } // DeleteCollection deletes a collection of objects. -func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *endpointSlices) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { var timeout time.Duration if listOpts.TimeoutSeconds != nil { timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second @@ -163,8 +163,8 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOpt } // Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { - result = &v1alpha1.EndpointSlice{} +func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) { + result = &v1.EndpointSlice{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpointslices"). diff --git a/kubernetes/typed/discovery/v1alpha1/fake/doc.go b/kubernetes/typed/discovery/v1/fake/doc.go similarity index 100% rename from kubernetes/typed/discovery/v1alpha1/fake/doc.go rename to kubernetes/typed/discovery/v1/fake/doc.go diff --git a/kubernetes/typed/discovery/v1alpha1/fake/fake_discovery_client.go b/kubernetes/typed/discovery/v1/fake/fake_discovery_client.go similarity index 77% rename from kubernetes/typed/discovery/v1alpha1/fake/fake_discovery_client.go rename to kubernetes/typed/discovery/v1/fake/fake_discovery_client.go index 532a1075..1ca9b23f 100644 --- a/kubernetes/typed/discovery/v1alpha1/fake/fake_discovery_client.go +++ b/kubernetes/typed/discovery/v1/fake/fake_discovery_client.go @@ -19,22 +19,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1" + v1 "k8s.io/client-go/kubernetes/typed/discovery/v1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeDiscoveryV1alpha1 struct { +type FakeDiscoveryV1 struct { *testing.Fake } -func (c *FakeDiscoveryV1alpha1) EndpointSlices(namespace string) v1alpha1.EndpointSliceInterface { +func (c *FakeDiscoveryV1) EndpointSlices(namespace string) v1.EndpointSliceInterface { return &FakeEndpointSlices{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeDiscoveryV1alpha1) RESTClient() rest.Interface { +func (c *FakeDiscoveryV1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go b/kubernetes/typed/discovery/v1/fake/fake_endpointslice.go similarity index 74% rename from kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go rename to kubernetes/typed/discovery/v1/fake/fake_endpointslice.go index f180340a..ce9095a7 100644 --- a/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go +++ b/kubernetes/typed/discovery/v1/fake/fake_endpointslice.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1alpha1 "k8s.io/api/discovery/v1alpha1" + discoveryv1 "k8s.io/api/discovery/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -32,29 +32,29 @@ import ( // FakeEndpointSlices implements EndpointSliceInterface type FakeEndpointSlices struct { - Fake *FakeDiscoveryV1alpha1 + Fake *FakeDiscoveryV1 ns string } -var endpointslicesResource = schema.GroupVersionResource{Group: "discovery.k8s.io", Version: "v1alpha1", Resource: "endpointslices"} +var endpointslicesResource = schema.GroupVersionResource{Group: "discovery.k8s.io", Version: "v1", Resource: "endpointslices"} -var endpointslicesKind = schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1alpha1", Kind: "EndpointSlice"} +var endpointslicesKind = schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSlice"} // Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. -func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *discoveryv1.EndpointSlice, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &v1alpha1.EndpointSlice{}) + Invokes(testing.NewGetAction(endpointslicesResource, c.ns, name), &discoveryv1.EndpointSlice{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.EndpointSlice), err + return obj.(*discoveryv1.EndpointSlice), err } // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. -func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { +func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *discoveryv1.EndpointSliceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &v1alpha1.EndpointSliceList{}) + Invokes(testing.NewListAction(endpointslicesResource, endpointslicesKind, c.ns, opts), &discoveryv1.EndpointSliceList{}) if obj == nil { return nil, err @@ -64,8 +64,8 @@ func (c *FakeEndpointSlices) List(ctx context.Context, opts v1.ListOptions) (res if label == nil { label = labels.Everything() } - list := &v1alpha1.EndpointSliceList{ListMeta: obj.(*v1alpha1.EndpointSliceList).ListMeta} - for _, item := range obj.(*v1alpha1.EndpointSliceList).Items { + list := &discoveryv1.EndpointSliceList{ListMeta: obj.(*discoveryv1.EndpointSliceList).ListMeta} + for _, item := range obj.(*discoveryv1.EndpointSliceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -81,31 +81,31 @@ func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *discoveryv1.EndpointSlice, opts v1.CreateOptions) (result *discoveryv1.EndpointSlice, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1alpha1.EndpointSlice{}) + Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &discoveryv1.EndpointSlice{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.EndpointSlice), err + return obj.(*discoveryv1.EndpointSlice), err } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *discoveryv1.EndpointSlice, opts v1.UpdateOptions) (result *discoveryv1.EndpointSlice, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1alpha1.EndpointSlice{}) + Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &discoveryv1.EndpointSlice{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.EndpointSlice), err + return obj.(*discoveryv1.EndpointSlice), err } // Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(endpointslicesResource, c.ns, name), &v1alpha1.EndpointSlice{}) + Invokes(testing.NewDeleteAction(endpointslicesResource, c.ns, name), &discoveryv1.EndpointSlice{}) return err } @@ -114,17 +114,17 @@ func (c *FakeEndpointSlices) Delete(ctx context.Context, name string, opts v1.De func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionAction(endpointslicesResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha1.EndpointSliceList{}) + _, err := c.Fake.Invokes(action, &discoveryv1.EndpointSliceList{}) return err } // Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *discoveryv1.EndpointSlice, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1alpha1.EndpointSlice{}) + Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &discoveryv1.EndpointSlice{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.EndpointSlice), err + return obj.(*discoveryv1.EndpointSlice), err } diff --git a/kubernetes/typed/discovery/v1alpha1/generated_expansion.go b/kubernetes/typed/discovery/v1/generated_expansion.go similarity index 97% rename from kubernetes/typed/discovery/v1alpha1/generated_expansion.go rename to kubernetes/typed/discovery/v1/generated_expansion.go index e8ceb59a..56147f60 100644 --- a/kubernetes/typed/discovery/v1alpha1/generated_expansion.go +++ b/kubernetes/typed/discovery/v1/generated_expansion.go @@ -16,6 +16,6 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 type EndpointSliceExpansion interface{} diff --git a/listers/discovery/v1alpha1/endpointslice.go b/listers/discovery/v1/endpointslice.go similarity index 82% rename from listers/discovery/v1alpha1/endpointslice.go rename to listers/discovery/v1/endpointslice.go index f3c0822b..4dd46ff1 100644 --- a/listers/discovery/v1alpha1/endpointslice.go +++ b/listers/discovery/v1/endpointslice.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1alpha1 "k8s.io/api/discovery/v1alpha1" + v1 "k8s.io/api/discovery/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) + List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister EndpointSliceListerExpansion @@ -47,9 +47,9 @@ func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { } // List lists all EndpointSlices in the indexer. -func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) { +func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.EndpointSlice)) + ret = append(ret, m.(*v1.EndpointSlice)) }) return ret, err } @@ -64,10 +64,10 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName type EndpointSliceNamespaceLister interface { // List lists all EndpointSlices in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) + List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) // Get retrieves the EndpointSlice from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.EndpointSlice, error) + Get(name string) (*v1.EndpointSlice, error) EndpointSliceNamespaceListerExpansion } @@ -79,21 +79,21 @@ type endpointSliceNamespaceLister struct { } // List lists all EndpointSlices in the indexer for a given namespace. -func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) { +func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.EndpointSlice)) + ret = append(ret, m.(*v1.EndpointSlice)) }) return ret, err } // Get retrieves the EndpointSlice from the indexer for a given namespace and name. -func (s endpointSliceNamespaceLister) Get(name string) (*v1alpha1.EndpointSlice, error) { +func (s endpointSliceNamespaceLister) Get(name string) (*v1.EndpointSlice, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("endpointslice"), name) + return nil, errors.NewNotFound(v1.Resource("endpointslice"), name) } - return obj.(*v1alpha1.EndpointSlice), nil + return obj.(*v1.EndpointSlice), nil } diff --git a/listers/discovery/v1alpha1/expansion_generated.go b/listers/discovery/v1/expansion_generated.go similarity index 98% rename from listers/discovery/v1alpha1/expansion_generated.go rename to listers/discovery/v1/expansion_generated.go index d47af59a..660163ee 100644 --- a/listers/discovery/v1alpha1/expansion_generated.go +++ b/listers/discovery/v1/expansion_generated.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1 // EndpointSliceListerExpansion allows custom methods to be added to // EndpointSliceLister.