From 7a14b9420550c7af13103bb39ebf9a0924753856 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 21 May 2024 11:33:24 +0000 Subject: [PATCH 01/10] promote feature gate MultiCIDRServiceAllocator to beta disabled by default --- pkg/features/kube_features.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 35f4f778020..16f92c2b17e 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -484,6 +484,7 @@ const ( // owner: @aojea // kep: https://kep.k8s.io/1880 // alpha: v1.27 + // beta: v1.31 // // Enables the dynamic configuration of Service IP ranges MultiCIDRServiceAllocator featuregate.Feature = "MultiCIDRServiceAllocator" @@ -1095,7 +1096,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS MinDomainsInPodTopologySpread: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.32 - MultiCIDRServiceAllocator: {Default: false, PreRelease: featuregate.Alpha}, + MultiCIDRServiceAllocator: {Default: false, PreRelease: featuregate.Beta}, NewVolumeManagerReconstruction: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.32 From 29f33bc21d4d8bd37fc0aa90714693123a21bc61 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Fri, 28 Jun 2024 13:16:33 +0000 Subject: [PATCH 02/10] enable networking v1beta1 features on apiserver storage --- pkg/kubeapiserver/default_storage_factory_builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubeapiserver/default_storage_factory_builder.go b/pkg/kubeapiserver/default_storage_factory_builder.go index 0622862d596..dec054805d2 100644 --- a/pkg/kubeapiserver/default_storage_factory_builder.go +++ b/pkg/kubeapiserver/default_storage_factory_builder.go @@ -71,8 +71,8 @@ func NewStorageFactoryConfig() *StorageFactoryConfig { // // TODO (https://github.com/kubernetes/kubernetes/issues/108451): remove the override in 1.25. // apisstorage.Resource("csistoragecapacities").WithVersion("v1beta1"), - networking.Resource("ipaddresses").WithVersion("v1alpha1"), - networking.Resource("servicecidrs").WithVersion("v1alpha1"), + networking.Resource("ipaddresses").WithVersion("v1beta1"), + networking.Resource("servicecidrs").WithVersion("v1beta1"), certificates.Resource("clustertrustbundles").WithVersion("v1alpha1"), storage.Resource("volumeattributesclasses").WithVersion("v1alpha1"), storagemigration.Resource("storagemigrations").WithVersion("v1alpha1"), From f0fd8931010435be4313c7782c0dfc0d3037ee16 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 21 May 2024 11:34:19 +0000 Subject: [PATCH 03/10] serve networking v1beta1 apis for ServiceCIDR and IP Address --- pkg/registry/networking/rest/storage_settings.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/registry/networking/rest/storage_settings.go b/pkg/registry/networking/rest/storage_settings.go index a5c63821cc8..54baf0f05b5 100644 --- a/pkg/registry/networking/rest/storage_settings.go +++ b/pkg/registry/networking/rest/storage_settings.go @@ -18,7 +18,7 @@ package rest import ( networkingapiv1 "k8s.io/api/networking/v1" - networkingapiv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" genericapiserver "k8s.io/apiserver/pkg/server" @@ -42,7 +42,7 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag if storageMap, err := p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { return genericapiserver.APIGroupInfo{}, err } else if len(storageMap) > 0 { - apiGroupInfo.VersionedResourcesStorageMap[networkingapiv1alpha1.SchemeGroupVersion.Version] = storageMap + apiGroupInfo.VersionedResourcesStorageMap[networkingapiv1beta1.SchemeGroupVersion.Version] = storageMap } if storageMap, err := p.v1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { @@ -92,7 +92,7 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora storage := map[string]rest.Storage{} // ipaddress - if resource := "ipaddresses"; apiResourceConfigSource.ResourceEnabled(networkingapiv1alpha1.SchemeGroupVersion.WithResource(resource)) { + if resource := "ipaddresses"; apiResourceConfigSource.ResourceEnabled(networkingapiv1beta1.SchemeGroupVersion.WithResource(resource)) { ipAddressStorage, err := ipaddressstore.NewREST(restOptionsGetter) if err != nil { return storage, err @@ -101,7 +101,7 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora } // servicecidrs - if resource := "servicecidrs"; apiResourceConfigSource.ResourceEnabled(networkingapiv1alpha1.SchemeGroupVersion.WithResource(resource)) { + if resource := "servicecidrs"; apiResourceConfigSource.ResourceEnabled(networkingapiv1beta1.SchemeGroupVersion.WithResource(resource)) { serviceCIDRStorage, serviceCIDRStatusStorage, err := servicecidrstore.NewREST(restOptionsGetter) if err != nil { return storage, err From d748fc024dfa2909cf0796f9d3eb5dd642c0e4d4 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 21 May 2024 11:56:52 +0000 Subject: [PATCH 04/10] add ServiceCIDR to the exception for api rules --- api/api-rules/violation_exceptions.list | 1 + 1 file changed, 1 insertion(+) diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index 395563633f1..af559e0e033 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -51,6 +51,7 @@ API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RadosUser API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,CephFS API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,StorageOS API rule violation: names_match,k8s.io/api/networking/v1alpha1,ServiceCIDRSpec,CIDRs +API rule violation: names_match,k8s.io/api/networking/v1beta1,ServiceCIDRSpec,CIDRs API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,BoolValue API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntSliceValue API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntValue From ca2d0857b681ccd1eb3d67412bc179370c2ede6d Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sat, 29 Jun 2024 10:04:12 +0000 Subject: [PATCH 05/10] promote ServiceCIDR and IPAddress to beta --- .../k8s.io/api/networking/v1beta1/register.go | 4 + .../k8s.io/api/networking/v1beta1/types.go | 130 ++++++++++++++++++ .../networking/v1beta1/well_known_labels.go | 33 +++++ 3 files changed, 167 insertions(+) create mode 100644 staging/src/k8s.io/api/networking/v1beta1/well_known_labels.go diff --git a/staging/src/k8s.io/api/networking/v1beta1/register.go b/staging/src/k8s.io/api/networking/v1beta1/register.go index 04234953e61..9d2a13cc683 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/register.go +++ b/staging/src/k8s.io/api/networking/v1beta1/register.go @@ -51,6 +51,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &IngressList{}, &IngressClass{}, &IngressClassList{}, + &IPAddress{}, + &IPAddressList{}, + &ServiceCIDR{}, + &ServiceCIDRList{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/staging/src/k8s.io/api/networking/v1beta1/types.go b/staging/src/k8s.io/api/networking/v1beta1/types.go index 34dfe76aa3e..6f4382909b3 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/types.go +++ b/staging/src/k8s.io/api/networking/v1beta1/types.go @@ -421,3 +421,133 @@ type IngressClassList struct { // items is the list of IngressClasses. Items []IngressClass `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.31 + +// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs +// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. +// An IP address can be represented in different formats, to guarantee the uniqueness of the IP, +// the name of the object is the IP address in canonical format, four decimal digits separated +// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. +// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 +// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 +type IPAddress struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // spec is the desired state of the IPAddress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec IPAddressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// IPAddressSpec describe the attributes in an IP Address. +type IPAddressSpec struct { + // ParentRef references the resource that an IPAddress is attached to. + // An IPAddress must reference a parent object. + // +required + ParentRef *ParentReference `json:"parentRef,omitempty" protobuf:"bytes,1,opt,name=parentRef"` +} + +// ParentReference describes a reference to a parent object. +type ParentReference struct { + // Group is the group of the object being referenced. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // Resource is the resource of the object being referenced. + // +required + Resource string `json:"resource,omitempty" protobuf:"bytes,2,opt,name=resource"` + // Namespace is the namespace of the object being referenced. + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` + // Name is the name of the object being referenced. + // +required + Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.31 + +// IPAddressList contains a list of IPAddress. +type IPAddressList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // items is the list of IPAddresses. + Items []IPAddress `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.31 + +// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). +// This range is used to allocate ClusterIPs to Service objects. +type ServiceCIDR struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // spec is the desired state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec ServiceCIDRSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + // status represents the current state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Status ServiceCIDRStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. +type ServiceCIDRSpec struct { + // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") + // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. + // This field is immutable. + // +optional + // +listType=atomic + CIDRs []string `json:"cidrs,omitempty" protobuf:"bytes,1,opt,name=cidrs"` +} + +const ( + // ServiceCIDRConditionReady represents status of a ServiceCIDR that is ready to be used by the + // apiserver to allocate ClusterIPs for Services. + ServiceCIDRConditionReady = "Ready" + // ServiceCIDRReasonTerminating represents a reason where a ServiceCIDR is not ready because it is + // being deleted. + ServiceCIDRReasonTerminating = "Terminating" +) + +// ServiceCIDRStatus describes the current state of the ServiceCIDR. +type ServiceCIDRStatus struct { + // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. + // Current service state + // +optional + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.31 + +// ServiceCIDRList contains a list of ServiceCIDR objects. +type ServiceCIDRList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // items is the list of ServiceCIDRs. + Items []ServiceCIDR `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/staging/src/k8s.io/api/networking/v1beta1/well_known_labels.go b/staging/src/k8s.io/api/networking/v1beta1/well_known_labels.go new file mode 100644 index 00000000000..bc2207766fd --- /dev/null +++ b/staging/src/k8s.io/api/networking/v1beta1/well_known_labels.go @@ -0,0 +1,33 @@ +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +const ( + + // TODO: Use IPFamily as field with a field selector,And the value is set based on + // the name at create time and immutable. + // LabelIPAddressFamily is used to indicate the IP family of a Kubernetes IPAddress. + // This label simplify dual-stack client operations allowing to obtain the list of + // IP addresses filtered by family. + LabelIPAddressFamily = "ipaddress.kubernetes.io/ip-family" + // LabelManagedBy is used to indicate the controller or entity that manages + // an IPAddress. This label aims to enable different IPAddress + // objects to be managed by different controllers or entities within the + // same cluster. It is highly recommended to configure this label for all + // IPAddress objects. + LabelManagedBy = "ipaddress.kubernetes.io/managed-by" +) From c1d06c0ae421f180d0179e89daa1409e6d14bd7c Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sat, 29 Jun 2024 10:04:47 +0000 Subject: [PATCH 06/10] use networking v1beta1 for kubectl describe --- .../k8s.io/kubectl/pkg/describe/describe.go | 21 +++++++-------- .../kubectl/pkg/describe/describe_test.go | 27 +++++++++---------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/staging/src/k8s.io/kubectl/pkg/describe/describe.go b/staging/src/k8s.io/kubectl/pkg/describe/describe.go index ef7b0f99420..7ac9fdaebbc 100644 --- a/staging/src/k8s.io/kubectl/pkg/describe/describe.go +++ b/staging/src/k8s.io/kubectl/pkg/describe/describe.go @@ -45,7 +45,6 @@ import ( discoveryv1beta1 "k8s.io/api/discovery/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" policyv1 "k8s.io/api/policy/v1" policyv1beta1 "k8s.io/api/policy/v1beta1" @@ -216,8 +215,8 @@ func describerMap(clientConfig *rest.Config) (map[schema.GroupKind]ResourceDescr {Group: networkingv1beta1.GroupName, Kind: "IngressClass"}: &IngressClassDescriber{c}, {Group: networkingv1.GroupName, Kind: "Ingress"}: &IngressDescriber{c}, {Group: networkingv1.GroupName, Kind: "IngressClass"}: &IngressClassDescriber{c}, - {Group: networkingv1alpha1.GroupName, Kind: "ServiceCIDR"}: &ServiceCIDRDescriber{c}, - {Group: networkingv1alpha1.GroupName, Kind: "IPAddress"}: &IPAddressDescriber{c}, + {Group: networkingv1beta1.GroupName, Kind: "ServiceCIDR"}: &ServiceCIDRDescriber{c}, + {Group: networkingv1beta1.GroupName, Kind: "IPAddress"}: &IPAddressDescriber{c}, {Group: batchv1.GroupName, Kind: "Job"}: &JobDescriber{c}, {Group: batchv1.GroupName, Kind: "CronJob"}: &CronJobDescriber{c}, {Group: batchv1beta1.GroupName, Kind: "CronJob"}: &CronJobDescriber{c}, @@ -2871,17 +2870,17 @@ type ServiceCIDRDescriber struct { func (c *ServiceCIDRDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) { var events *corev1.EventList - svcV1alpha1, err := c.client.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), name, metav1.GetOptions{}) + svcV1beta1, err := c.client.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), name, metav1.GetOptions{}) if err == nil { if describerSettings.ShowEvents { - events, _ = searchEvents(c.client.CoreV1(), svcV1alpha1, describerSettings.ChunkSize) + events, _ = searchEvents(c.client.CoreV1(), svcV1beta1, describerSettings.ChunkSize) } - return c.describeServiceCIDRV1alpha1(svcV1alpha1, events) + return c.describeServiceCIDRV1beta1(svcV1beta1, events) } return "", err } -func (c *ServiceCIDRDescriber) describeServiceCIDRV1alpha1(svc *networkingv1alpha1.ServiceCIDR, events *corev1.EventList) (string, error) { +func (c *ServiceCIDRDescriber) describeServiceCIDRV1beta1(svc *networkingv1beta1.ServiceCIDR, events *corev1.EventList) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, "Name:\t%v\n", svc.Name) @@ -2920,17 +2919,17 @@ type IPAddressDescriber struct { func (c *IPAddressDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) { var events *corev1.EventList - ipV1alpha1, err := c.client.NetworkingV1alpha1().IPAddresses().Get(context.TODO(), name, metav1.GetOptions{}) + ipV1beta1, err := c.client.NetworkingV1beta1().IPAddresses().Get(context.TODO(), name, metav1.GetOptions{}) if err == nil { if describerSettings.ShowEvents { - events, _ = searchEvents(c.client.CoreV1(), ipV1alpha1, describerSettings.ChunkSize) + events, _ = searchEvents(c.client.CoreV1(), ipV1beta1, describerSettings.ChunkSize) } - return c.describeIPAddressV1alpha1(ipV1alpha1, events) + return c.describeIPAddressV1beta1(ipV1beta1, events) } return "", err } -func (c *IPAddressDescriber) describeIPAddressV1alpha1(ip *networkingv1alpha1.IPAddress, events *corev1.EventList) (string, error) { +func (c *IPAddressDescriber) describeIPAddressV1beta1(ip *networkingv1beta1.IPAddress, events *corev1.EventList) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, "Name:\t%v\n", ip.Name) diff --git a/staging/src/k8s.io/kubectl/pkg/describe/describe_test.go b/staging/src/k8s.io/kubectl/pkg/describe/describe_test.go index b1d02d0bc5d..75f2438b1f4 100644 --- a/staging/src/k8s.io/kubectl/pkg/describe/describe_test.go +++ b/staging/src/k8s.io/kubectl/pkg/describe/describe_test.go @@ -37,7 +37,6 @@ import ( discoveryv1 "k8s.io/api/discovery/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" policyv1 "k8s.io/api/policy/v1" policyv1beta1 "k8s.io/api/policy/v1beta1" @@ -6368,12 +6367,12 @@ func TestDescribeServiceCIDR(t *testing.T) { input *fake.Clientset output string }{ - "ServiceCIDR v1alpha1": { - input: fake.NewSimpleClientset(&networkingv1alpha1.ServiceCIDR{ + "ServiceCIDR v1beta1": { + input: fake.NewSimpleClientset(&networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: "foo.123", }, - Spec: networkingv1alpha1.ServiceCIDRSpec{ + Spec: networkingv1beta1.ServiceCIDRSpec{ CIDRs: []string{"10.1.0.0/16", "fd00:1:1::/64"}, }, }), @@ -6384,12 +6383,12 @@ Annotations: CIDRs: 10.1.0.0/16, fd00:1:1::/64 Events: ` + "\n", }, - "ServiceCIDR v1alpha1 IPv4": { - input: fake.NewSimpleClientset(&networkingv1alpha1.ServiceCIDR{ + "ServiceCIDR v1beta1 IPv4": { + input: fake.NewSimpleClientset(&networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: "foo.123", }, - Spec: networkingv1alpha1.ServiceCIDRSpec{ + Spec: networkingv1beta1.ServiceCIDRSpec{ CIDRs: []string{"10.1.0.0/16"}, }, }), @@ -6400,12 +6399,12 @@ Annotations: CIDRs: 10.1.0.0/16 Events: ` + "\n", }, - "ServiceCIDR v1alpha1 IPv6": { - input: fake.NewSimpleClientset(&networkingv1alpha1.ServiceCIDR{ + "ServiceCIDR v1beta1 IPv6": { + input: fake.NewSimpleClientset(&networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: "foo.123", }, - Spec: networkingv1alpha1.ServiceCIDRSpec{ + Spec: networkingv1beta1.ServiceCIDRSpec{ CIDRs: []string{"fd00:1:1::/64"}, }, }), @@ -6439,13 +6438,13 @@ func TestDescribeIPAddress(t *testing.T) { input *fake.Clientset output string }{ - "IPAddress v1alpha1": { - input: fake.NewSimpleClientset(&networkingv1alpha1.IPAddress{ + "IPAddress v1beta1": { + input: fake.NewSimpleClientset(&networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: "foo.123", }, - Spec: networkingv1alpha1.IPAddressSpec{ - ParentRef: &networkingv1alpha1.ParentReference{ + Spec: networkingv1beta1.IPAddressSpec{ + ParentRef: &networkingv1beta1.ParentReference{ Group: "mygroup", Resource: "myresource", Namespace: "mynamespace", From dbfdd074d0f443670f01f353f483f8414f4b821f Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sat, 29 Jun 2024 10:06:00 +0000 Subject: [PATCH 07/10] update networking strategy and remove hardcode field on the test --- pkg/registry/networking/servicecidr/strategy.go | 6 ++++++ pkg/registry/networking/servicecidr/strategy_test.go | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pkg/registry/networking/servicecidr/strategy.go b/pkg/registry/networking/servicecidr/strategy.go index 229e8ef25c4..210f56f4355 100644 --- a/pkg/registry/networking/servicecidr/strategy.go +++ b/pkg/registry/networking/servicecidr/strategy.go @@ -53,6 +53,9 @@ func (serviceCIDRStrategy) NamespaceScoped() bool { // and should not be modified by the user. func (serviceCIDRStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { fields := map[fieldpath.APIVersion]*fieldpath.Set{ + "networking/v1beta1": fieldpath.NewSet( + fieldpath.MakePathOrDie("status"), + ), "networking/v1alpha1": fieldpath.NewSet( fieldpath.MakePathOrDie("status"), ), @@ -125,6 +128,9 @@ var StatusStrategy = serviceCIDRStatusStrategy{Strategy} // and should not be modified by the user. func (serviceCIDRStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { fields := map[fieldpath.APIVersion]*fieldpath.Set{ + "networking/v1beta1": fieldpath.NewSet( + fieldpath.MakePathOrDie("spec"), + ), "networking/v1alpha1": fieldpath.NewSet( fieldpath.MakePathOrDie("spec"), ), diff --git a/pkg/registry/networking/servicecidr/strategy_test.go b/pkg/registry/networking/servicecidr/strategy_test.go index f54e381555f..b9ecd0eaa15 100644 --- a/pkg/registry/networking/servicecidr/strategy_test.go +++ b/pkg/registry/networking/servicecidr/strategy_test.go @@ -43,10 +43,6 @@ func TestServiceCIDRStrategy(t *testing.T) { t.Errorf("Expected ServiceCIDR to be cluster-scoped") } - resetFields := Strategy.GetResetFields() - if len(resetFields) != 1 { - t.Errorf("ResetFields should have 1 element, but have %d", len(resetFields)) - } obj := &networking.ServiceCIDR{Spec: networking.ServiceCIDRSpec{CIDRs: []string{"bad cidr"}}} errors := Strategy.Validate(context.TODO(), obj) @@ -64,11 +60,6 @@ func TestServiceCIDRStrategy(t *testing.T) { } func TestServiceCIDRStatusStrategy(t *testing.T) { - resetFields := StatusStrategy.GetResetFields() - if len(resetFields) != 1 { - t.Errorf("ResetFields should have 1 element, but have %d", len(resetFields)) - } - oldObj := &networking.ServiceCIDR{Spec: networking.ServiceCIDRSpec{}} newObj := &networking.ServiceCIDR{ Spec: networking.ServiceCIDRSpec{ From ed597316d66fa26d1c06982d5084d277d4d8629d Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sat, 29 Jun 2024 10:06:38 +0000 Subject: [PATCH 08/10] modify tests to use the networking v1beta1 API --- test/e2e/network/service_cidrs.go | 14 ++--- .../apiserver/apply/reset_fields_test.go | 2 + test/integration/etcd/data.go | 16 +++--- .../integration/servicecidr/allocator_test.go | 33 +++++------ .../servicecidr/feature_enable_disable.go | 6 +- .../integration/servicecidr/migration_test.go | 34 +++++------ test/integration/servicecidr/perf_test.go | 4 +- .../servicecidr/servicecidr_test.go | 56 +++++++++---------- 8 files changed, 84 insertions(+), 81 deletions(-) diff --git a/test/e2e/network/service_cidrs.go b/test/e2e/network/service_cidrs.go index f6aff75a4c7..5a80fc51393 100644 --- a/test/e2e/network/service_cidrs.go +++ b/test/e2e/network/service_cidrs.go @@ -21,7 +21,7 @@ import ( "github.com/onsi/ginkgo/v2" v1 "k8s.io/api/core/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/wait" @@ -62,18 +62,18 @@ var _ = common.SIGDescribe(feature.ServiceCIDRs, func() { ginkgo.It("should create Services and servce on different Service CIDRs", func(ctx context.Context) { // create a new service CIDR - svcCIDR := &networkingv1alpha1.ServiceCIDR{ + svcCIDR := &networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc-cidr", }, - Spec: networkingv1alpha1.ServiceCIDRSpec{ + Spec: networkingv1beta1.ServiceCIDRSpec{ CIDRs: []string{"10.196.196.0/24"}, }, } - _, err := cs.NetworkingV1alpha1().ServiceCIDRs().Create(context.TODO(), svcCIDR, metav1.CreateOptions{}) + _, err := cs.NetworkingV1beta1().ServiceCIDRs().Create(context.TODO(), svcCIDR, metav1.CreateOptions{}) framework.ExpectNoError(err, "error creating ServiceCIDR") if pollErr := wait.PollUntilContextTimeout(ctx, framework.Poll, e2eservice.RespondingTimeout, false, func(ctx context.Context) (bool, error) { - svcCIDR, err := cs.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, svcCIDR.Name, metav1.GetOptions{}) + svcCIDR, err := cs.NetworkingV1beta1().ServiceCIDRs().Get(ctx, svcCIDR.Name, metav1.GetOptions{}) if err != nil { return false, nil } @@ -103,13 +103,13 @@ var _ = common.SIGDescribe(feature.ServiceCIDRs, func() { }) -func isReady(serviceCIDR *networkingv1alpha1.ServiceCIDR) bool { +func isReady(serviceCIDR *networkingv1beta1.ServiceCIDR) bool { if serviceCIDR == nil { return false } for _, condition := range serviceCIDR.Status.Conditions { - if condition.Type == string(networkingv1alpha1.ServiceCIDRConditionReady) { + if condition.Type == string(networkingv1beta1.ServiceCIDRConditionReady) { return condition.Status == metav1.ConditionStatus(metav1.ConditionTrue) } } diff --git a/test/integration/apiserver/apply/reset_fields_test.go b/test/integration/apiserver/apply/reset_fields_test.go index 35aa16d56fb..33ca07a7383 100644 --- a/test/integration/apiserver/apply/reset_fields_test.go +++ b/test/integration/apiserver/apply/reset_fields_test.go @@ -67,6 +67,7 @@ var resetFieldsStatusData = map[schema.GroupVersionResource]string{ gvr("admissionregistration.k8s.io", "v1beta1", "validatingadmissionpolicies"): `{"status": {"conditions":[{"type":"Accepted","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, gvr("admissionregistration.k8s.io", "v1", "validatingadmissionpolicies"): `{"status": {"conditions":[{"type":"Accepted","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, gvr("networking.k8s.io", "v1alpha1", "servicecidrs"): `{"status": {"conditions":[{"type":"Accepted","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, + gvr("networking.k8s.io", "v1beta1", "servicecidrs"): `{"status": {"conditions":[{"type":"Accepted","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, } // resetFieldsStatusDefault conflicts with statusDefault @@ -140,6 +141,7 @@ var resetFieldsSpecData = map[schema.GroupVersionResource]string{ gvr("networking.k8s.io", "v1beta1", "ingresses"): `{"spec": {"backend": {"serviceName": "service2"}}}`, gvr("networking.k8s.io", "v1", "ingresses"): `{"spec": {"defaultBackend": {"service": {"name": "service2"}}}}`, gvr("networking.k8s.io", "v1alpha1", "servicecidrs"): `{}`, + gvr("networking.k8s.io", "v1beta1", "servicecidrs"): `{}`, gvr("policy", "v1", "poddisruptionbudgets"): `{"spec": {"selector": {"matchLabels": {"anokkey2": "anokvalue"}}}}`, gvr("policy", "v1beta1", "poddisruptionbudgets"): `{"spec": {"selector": {"matchLabels": {"anokkey2": "anokvalue"}}}}`, gvr("storage.k8s.io", "v1alpha1", "volumeattachments"): `{"metadata": {"name": "va3"}, "spec": {"nodeName": "localhost2"}}`, diff --git a/test/integration/etcd/data.go b/test/integration/etcd/data.go index a0cd9113017..33da546440f 100644 --- a/test/integration/etcd/data.go +++ b/test/integration/etcd/data.go @@ -202,17 +202,17 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes }, // -- - // k8s.io/kubernetes/pkg/apis/networking/v1alpha1 - gvr("networking.k8s.io", "v1alpha1", "ipaddresses"): { - Stub: `{"metadata": {"name": "192.168.1.2"}, "spec": {"parentRef": {"resource": "services","name": "test", "namespace": "ns"}}}`, - ExpectedEtcdPath: "/registry/ipaddresses/192.168.1.2", + // k8s.io/kubernetes/pkg/apis/networking/v1beta1 + gvr("networking.k8s.io", "v1beta1", "ipaddresses"): { + Stub: `{"metadata": {"name": "192.168.1.3"}, "spec": {"parentRef": {"resource": "services","name": "test", "namespace": "ns"}}}`, + ExpectedEtcdPath: "/registry/ipaddresses/192.168.1.3", }, // -- - // k8s.io/kubernetes/pkg/apis/networking/v1alpha1 - gvr("networking.k8s.io", "v1alpha1", "servicecidrs"): { - Stub: `{"metadata": {"name": "range1"}, "spec": {"cidrs": ["192.168.0.0/16","fd00:1::/120"]}}`, - ExpectedEtcdPath: "/registry/servicecidrs/range1", + // k8s.io/kubernetes/pkg/apis/networking/v1beta1 + gvr("networking.k8s.io", "v1beta1", "servicecidrs"): { + Stub: `{"metadata": {"name": "range-b1"}, "spec": {"cidrs": ["192.168.0.0/16","fd00:1::/120"]}}`, + ExpectedEtcdPath: "/registry/servicecidrs/range-b1", }, // -- diff --git a/test/integration/servicecidr/allocator_test.go b/test/integration/servicecidr/allocator_test.go index 6082f9fb62a..1196a98daca 100644 --- a/test/integration/servicecidr/allocator_test.go +++ b/test/integration/servicecidr/allocator_test.go @@ -74,7 +74,7 @@ func TestServiceAllocation(t *testing.T) { s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=" + serviceCIDR, "--advertise-address=10.0.0.2", "--disable-admission-plugins=ServiceAccount", @@ -159,7 +159,7 @@ func TestServiceAllocIPAddressLargeCIDR(t *testing.T) { s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=" + serviceCIDR, "--advertise-address=2001:db8::10", "--disable-admission-plugins=ServiceAccount", @@ -205,7 +205,7 @@ func TestServiceAllocIPAddressLargeCIDR(t *testing.T) { if err != nil { t.Error(err) } - _, err = client.NetworkingV1alpha1().IPAddresses().Get(tCtx, svc.Spec.ClusterIP, metav1.GetOptions{}) + _, err = client.NetworkingV1beta1().IPAddresses().Get(tCtx, svc.Spec.ClusterIP, metav1.GetOptions{}) if err != nil { t.Error(err) } @@ -218,7 +218,8 @@ func TestServiceAllocIPAddressLargeCIDR(t *testing.T) { if _, err := client.CoreV1().Services(metav1.NamespaceDefault).Create(tCtx, lastSvc, metav1.CreateOptions{}); err != nil { t.Errorf("unexpected error text: %v", err) } - _, err = client.NetworkingV1alpha1().IPAddresses().Get(tCtx, lastSvc.Spec.ClusterIP, metav1.GetOptions{}) + + _, err = client.NetworkingV1beta1().IPAddresses().Get(context.TODO(), lastSvc.Spec.ClusterIP, metav1.GetOptions{}) if err != nil { t.Error(err) } @@ -231,7 +232,7 @@ func TestMigrateService(t *testing.T) { s := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=10.0.0.0/24", "--advertise-address=10.1.1.1", "--disable-admission-plugins=ServiceAccount", @@ -285,7 +286,7 @@ func TestMigrateService(t *testing.T) { err = wait.PollImmediate(1*time.Second, 10*time.Second, func() (bool, error) { // The repair loop must create the IP address associated - _, err = kubeclient.NetworkingV1alpha1().IPAddresses().Get(context.TODO(), svc.Spec.ClusterIP, metav1.GetOptions{}) + _, err = kubeclient.NetworkingV1beta1().IPAddresses().Get(context.TODO(), svc.Spec.ClusterIP, metav1.GetOptions{}) if err != nil { return false, nil } @@ -319,7 +320,7 @@ func TestSkewedAllocatorsRollback(t *testing.T) { // s1 uses IPAddress allocator s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=10.0.0.0/24", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=true,%s=true", features.MultiCIDRServiceAllocator, features.DisableAllocatorDualWrite)}, @@ -338,7 +339,7 @@ func TestSkewedAllocatorsRollback(t *testing.T) { t.Error(err) continue } - _, err = kubeclient1.NetworkingV1alpha1().IPAddresses().Get(context.TODO(), service.Spec.ClusterIP, metav1.GetOptions{}) + _, err = kubeclient1.NetworkingV1beta1().IPAddresses().Get(context.TODO(), service.Spec.ClusterIP, metav1.GetOptions{}) if err != nil { t.Error(err) } @@ -347,7 +348,7 @@ func TestSkewedAllocatorsRollback(t *testing.T) { // s2 uses bitmap allocator s2 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=false", + "--runtime-config=networking.k8s.io/v1beta1=false", "--service-cluster-ip-range=10.0.0.0/24", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=false", features.MultiCIDRServiceAllocator)}, @@ -368,7 +369,7 @@ func TestSkewedAllocatorsRollback(t *testing.T) { err = wait.PollImmediate(1*time.Second, 10*time.Second, func() (bool, error) { // The repair loop must create the IP address associated - _, err = kubeclient1.NetworkingV1alpha1().IPAddresses().Get(context.TODO(), service.Spec.ClusterIP, metav1.GetOptions{}) + _, err = kubeclient1.NetworkingV1beta1().IPAddresses().Get(context.TODO(), service.Spec.ClusterIP, metav1.GetOptions{}) if err != nil { return false, nil } @@ -409,7 +410,7 @@ func TestSkewAllocatorsRollout(t *testing.T) { // oldServer uses bitmap allocator oldServer := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=false", + "--runtime-config=networking.k8s.io/v1beta1=false", "--service-cluster-ip-range=10.0.0.0/16", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=false", features.MultiCIDRServiceAllocator)}, @@ -423,7 +424,7 @@ func TestSkewAllocatorsRollout(t *testing.T) { // s1 uses IPAddress allocator newServer := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=10.0.0.0/16", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=true,%s=false", features.MultiCIDRServiceAllocator, features.DisableAllocatorDualWrite)}, @@ -497,7 +498,7 @@ func TestSkewAllocatorsRollout(t *testing.T) { // It takes some time for the repairip loop to create the corresponding IPAddress objects // ClusterIPs are synchronized through the bitmap. err = wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 10*time.Second, true, func(context.Context) (bool, error) { - ips, err := kubeclientNew.NetworkingV1alpha1().IPAddresses().List(context.Background(), metav1.ListOptions{}) + ips, err := kubeclientNew.NetworkingV1beta1().IPAddresses().List(context.Background(), metav1.ListOptions{}) if err != nil { return false, nil } @@ -526,7 +527,7 @@ func TestSkewAllocatorsRollout(t *testing.T) { ip := fmt.Sprintf("10.0.0.%d", i) err = wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 10*time.Second, true, func(context.Context) (bool, error) { // The repair loop must create the IP address associated - _, err = kubeclientNew.NetworkingV1alpha1().IPAddresses().Get(context.Background(), ip, metav1.GetOptions{}) + _, err = kubeclientNew.NetworkingV1beta1().IPAddresses().Get(context.Background(), ip, metav1.GetOptions{}) if err != nil { return false, nil } @@ -558,7 +559,7 @@ func TestFlagsIPAllocator(t *testing.T) { // s1 uses IPAddress allocator s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=10.0.0.0/24", fmt.Sprintf("--feature-gates=%s=true", features.MultiCIDRServiceAllocator)}, etcdOptions) @@ -576,7 +577,7 @@ func TestFlagsIPAllocator(t *testing.T) { t.Error(err) continue } - _, err = kubeclient1.NetworkingV1alpha1().IPAddresses().Get(context.TODO(), service.Spec.ClusterIP, metav1.GetOptions{}) + _, err = kubeclient1.NetworkingV1beta1().IPAddresses().Get(context.TODO(), service.Spec.ClusterIP, metav1.GetOptions{}) if err != nil { t.Error(err) } diff --git a/test/integration/servicecidr/feature_enable_disable.go b/test/integration/servicecidr/feature_enable_disable.go index 626bcec2411..d808d97adc8 100644 --- a/test/integration/servicecidr/feature_enable_disable.go +++ b/test/integration/servicecidr/feature_enable_disable.go @@ -49,7 +49,7 @@ func TestEnableDisableServiceCIDR(t *testing.T) { apiServerOptions := kubeapiservertesting.NewDefaultTestServerOptions() s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=false", + "--runtime-config=networking.k8s.io/v1beta1=false", "--service-cluster-ip-range=10.0.0.0/24", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=false", features.MultiCIDRServiceAllocator)}, @@ -82,7 +82,7 @@ func TestEnableDisableServiceCIDR(t *testing.T) { // apiserver with the feature enabled s2 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=10.0.0.0/24", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=true", features.MultiCIDRServiceAllocator)}, @@ -113,7 +113,7 @@ func TestEnableDisableServiceCIDR(t *testing.T) { // start an apiserver with the feature disabled s3 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=false", + "--runtime-config=networking.k8s.io/v1beta1=false", "--service-cluster-ip-range=10.0.0.0/24", "--disable-admission-plugins=ServiceAccount", fmt.Sprintf("--feature-gates=%s=false", features.MultiCIDRServiceAllocator)}, diff --git a/test/integration/servicecidr/migration_test.go b/test/integration/servicecidr/migration_test.go index 72ebbac9f1e..0bd3ee10824 100644 --- a/test/integration/servicecidr/migration_test.go +++ b/test/integration/servicecidr/migration_test.go @@ -23,7 +23,7 @@ import ( "time" v1 "k8s.io/api/core/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -57,7 +57,7 @@ func TestMigrateServiceCIDR(t *testing.T) { s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=" + cidr1, "--advertise-address=10.1.1.1", "--disable-admission-plugins=ServiceAccount", @@ -77,15 +77,15 @@ func TestMigrateServiceCIDR(t *testing.T) { // ServiceCIDR controller go servicecidrs.NewController( tCtx, - informers1.Networking().V1alpha1().ServiceCIDRs(), - informers1.Networking().V1alpha1().IPAddresses(), + informers1.Networking().V1beta1().ServiceCIDRs(), + informers1.Networking().V1beta1().IPAddresses(), client1, ).Run(tCtx, 5) informers1.Start(tCtx.Done()) // the default serviceCIDR should have a finalizer and ready condition set to true if err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, time.Minute, false, func(ctx context.Context) (bool, error) { - cidr, err := client1.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), defaultservicecidr.DefaultServiceCIDRName, metav1.GetOptions{}) + cidr, err := client1.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), defaultservicecidr.DefaultServiceCIDRName, metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } @@ -119,13 +119,13 @@ func TestMigrateServiceCIDR(t *testing.T) { } } // Add a new service CIDR to be able to migrate the apiserver - if _, err := client1.NetworkingV1alpha1().ServiceCIDRs().Create(context.Background(), makeServiceCIDR("migration-cidr", cidr2, ""), metav1.CreateOptions{}); err != nil { + if _, err := client1.NetworkingV1beta1().ServiceCIDRs().Create(context.Background(), makeServiceCIDR("migration-cidr", cidr2, ""), metav1.CreateOptions{}); err != nil { t.Fatalf("got unexpected error: %v", err) } // wait ServiceCIDR is ready if err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, time.Minute, false, func(ctx context.Context) (bool, error) { - cidr, err := client1.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), "migration-cidr", metav1.GetOptions{}) + cidr, err := client1.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), "migration-cidr", metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } @@ -135,18 +135,18 @@ func TestMigrateServiceCIDR(t *testing.T) { } // delete the default ServiceCIDR so is no longer used for allocating IPs - if err := client1.NetworkingV1alpha1().ServiceCIDRs().Delete(context.Background(), defaultservicecidr.DefaultServiceCIDRName, metav1.DeleteOptions{}); err != nil { + if err := client1.NetworkingV1beta1().ServiceCIDRs().Delete(context.Background(), defaultservicecidr.DefaultServiceCIDRName, metav1.DeleteOptions{}); err != nil { t.Fatalf("got unexpected error: %v", err) } // the default serviceCIDR should be pending deletion with Ready condition set to false if err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, time.Minute, false, func(ctx context.Context) (bool, error) { - cidr, err := client1.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), defaultservicecidr.DefaultServiceCIDRName, metav1.GetOptions{}) + cidr, err := client1.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), defaultservicecidr.DefaultServiceCIDRName, metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } for _, condition := range cidr.Status.Conditions { - if condition.Type == networkingv1alpha1.ServiceCIDRConditionReady { + if condition.Type == networkingv1beta1.ServiceCIDRConditionReady { return condition.Status == metav1.ConditionFalse, nil } } @@ -191,7 +191,7 @@ func TestMigrateServiceCIDR(t *testing.T) { s2 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=" + cidr2, "--advertise-address=10.1.1.1", "--disable-admission-plugins=ServiceAccount", @@ -215,8 +215,8 @@ func TestMigrateServiceCIDR(t *testing.T) { informers2 := informers.NewSharedInformerFactory(client2, resyncPeriod) go servicecidrs.NewController( tCtx2, - informers2.Networking().V1alpha1().ServiceCIDRs(), - informers2.Networking().V1alpha1().IPAddresses(), + informers2.Networking().V1beta1().ServiceCIDRs(), + informers2.Networking().V1beta1().IPAddresses(), client2, ).Run(tCtx2, 5) informers2.Start(tCtx2.Done()) @@ -229,7 +229,7 @@ func TestMigrateServiceCIDR(t *testing.T) { // the default serviceCIDR should be the new one if err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, time.Minute, false, func(ctx context.Context) (bool, error) { - cidr, err := client2.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), defaultservicecidr.DefaultServiceCIDRName, metav1.GetOptions{}) + cidr, err := client2.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), defaultservicecidr.DefaultServiceCIDRName, metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, err } @@ -250,7 +250,7 @@ func TestMigrateServiceCIDR(t *testing.T) { } for _, condition := range cidr.Status.Conditions { - if condition.Type == networkingv1alpha1.ServiceCIDRConditionReady { + if condition.Type == networkingv1beta1.ServiceCIDRConditionReady { t.Logf("Expected Condition %s to be %s", condition.Status, metav1.ConditionTrue) return condition.Status == metav1.ConditionTrue, nil } @@ -275,13 +275,13 @@ func TestMigrateServiceCIDR(t *testing.T) { } // The temporary ServiceCIDR can be deleted now since the Default ServiceCIDR will cover it - if err := client2.NetworkingV1alpha1().ServiceCIDRs().Delete(context.Background(), "migration-cidr", metav1.DeleteOptions{}); err != nil { + if err := client2.NetworkingV1beta1().ServiceCIDRs().Delete(context.Background(), "migration-cidr", metav1.DeleteOptions{}); err != nil { t.Fatalf("got unexpected error: %v", err) } // wait ServiceCIDR no longer exist if err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, time.Minute, false, func(ctx context.Context) (bool, error) { - _, err := client2.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), "migration-cidr", metav1.GetOptions{}) + _, err := client2.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), "migration-cidr", metav1.GetOptions{}) if err != nil && !apierrors.IsNotFound(err) { return false, nil } diff --git a/test/integration/servicecidr/perf_test.go b/test/integration/servicecidr/perf_test.go index 42007ef95ef..1e7b2265649 100644 --- a/test/integration/servicecidr/perf_test.go +++ b/test/integration/servicecidr/perf_test.go @@ -89,7 +89,7 @@ func TestServiceAllocPerformance(t *testing.T) { s1 := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=" + "10.0.0.0/12", "--advertise-address=10.0.0.1", "--disable-admission-plugins=ServiceAccount", @@ -108,7 +108,7 @@ func TestServiceAllocPerformance(t *testing.T) { // 100 workers for 15k services nworkers := 100 - nservices := 15000 + nservices := 150 jobs := make(chan int, nservices) results := make(chan error, nservices) t.Log("Starting workers to create ClusterIP Service") diff --git a/test/integration/servicecidr/servicecidr_test.go b/test/integration/servicecidr/servicecidr_test.go index b488f8e1c0b..a493e30e4cc 100644 --- a/test/integration/servicecidr/servicecidr_test.go +++ b/test/integration/servicecidr/servicecidr_test.go @@ -25,7 +25,7 @@ import ( "time" v1 "k8s.io/api/core/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" @@ -43,7 +43,7 @@ func TestServiceAllocNewServiceCIDR(t *testing.T) { s := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=192.168.0.0/29", "--advertise-address=10.1.1.1", "--disable-admission-plugins=ServiceAccount", @@ -63,8 +63,8 @@ func TestServiceAllocNewServiceCIDR(t *testing.T) { informerFactory := informers.NewSharedInformerFactory(client, resyncPeriod) go servicecidrs.NewController( ctx, - informerFactory.Networking().V1alpha1().ServiceCIDRs(), - informerFactory.Networking().V1alpha1().IPAddresses(), + informerFactory.Networking().V1beta1().ServiceCIDRs(), + informerFactory.Networking().V1beta1().IPAddresses(), client, ).Run(ctx, 5) informerFactory.Start(ctx.Done()) @@ -96,12 +96,12 @@ func TestServiceAllocNewServiceCIDR(t *testing.T) { // Add a new service CIDR to be able to create new IPs. cidr := makeServiceCIDR("test2", "10.168.0.0/24", "") - if _, err := client.NetworkingV1alpha1().ServiceCIDRs().Create(context.Background(), cidr, metav1.CreateOptions{}); err != nil { + if _, err := client.NetworkingV1beta1().ServiceCIDRs().Create(context.Background(), cidr, metav1.CreateOptions{}); err != nil { t.Fatalf("got unexpected error: %v", err) } // wait ServiceCIDR is ready if err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, time.Minute, false, func(ctx context.Context) (bool, error) { - cidr, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(context.TODO(), cidr.Name, metav1.GetOptions{}) + cidr, err := client.NetworkingV1beta1().ServiceCIDRs().Get(context.TODO(), cidr.Name, metav1.GetOptions{}) if err != nil { return false, err } @@ -140,7 +140,7 @@ func TestServiceCIDRDeletion(t *testing.T) { s := kubeapiservertesting.StartTestServerOrDie(t, apiServerOptions, []string{ - "--runtime-config=networking.k8s.io/v1alpha1=true", + "--runtime-config=networking.k8s.io/v1beta1=true", "--service-cluster-ip-range=" + cidr1, "--advertise-address=172.16.1.1", "--disable-admission-plugins=ServiceAccount", @@ -164,8 +164,8 @@ func TestServiceCIDRDeletion(t *testing.T) { informerFactory := informers.NewSharedInformerFactory(client, resyncPeriod) go servicecidrs.NewController( ctx, - informerFactory.Networking().V1alpha1().ServiceCIDRs(), - informerFactory.Networking().V1alpha1().IPAddresses(), + informerFactory.Networking().V1beta1().ServiceCIDRs(), + informerFactory.Networking().V1beta1().IPAddresses(), client, ).Run(ctx, 5) informerFactory.Start(ctx.Done()) @@ -178,13 +178,13 @@ func TestServiceCIDRDeletion(t *testing.T) { } } // create a new ServiceCIDRs that overlaps the default one - _, err = client.NetworkingV1alpha1().ServiceCIDRs().Create(ctx, makeServiceCIDR("cidr1", cidr1, ""), metav1.CreateOptions{}) + _, err = client.NetworkingV1beta1().ServiceCIDRs().Create(ctx, makeServiceCIDR("cidr1", cidr1, ""), metav1.CreateOptions{}) if err != nil { t.Fatal((err)) } // Wait until is ready. if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - cidr, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr1", metav1.GetOptions{}) + cidr, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr1", metav1.GetOptions{}) if err != nil { return false, nil } @@ -193,13 +193,13 @@ func TestServiceCIDRDeletion(t *testing.T) { t.Fatalf("cidr1 is not ready") } // we should be able to delete the ServiceCIDR despite it contains IP addresses as it overlaps with the default ServiceCIDR - err = client.NetworkingV1alpha1().ServiceCIDRs().Delete(ctx, "cidr1", metav1.DeleteOptions{}) + err = client.NetworkingV1beta1().ServiceCIDRs().Delete(ctx, "cidr1", metav1.DeleteOptions{}) if err != nil { t.Fatal((err)) } if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - _, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr1", metav1.GetOptions{}) + _, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr1", metav1.GetOptions{}) if err != nil && apierrors.IsNotFound(err) { return true, nil } @@ -209,14 +209,14 @@ func TestServiceCIDRDeletion(t *testing.T) { } // add a new ServiceCIDR with a new range - _, err = client.NetworkingV1alpha1().ServiceCIDRs().Create(ctx, makeServiceCIDR("cidr2", cidr2, ""), metav1.CreateOptions{}) + _, err = client.NetworkingV1beta1().ServiceCIDRs().Create(ctx, makeServiceCIDR("cidr2", cidr2, ""), metav1.CreateOptions{}) if err != nil { t.Fatal((err)) } // wait the allocator process the new ServiceCIDR // Wait until is ready. if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - cidr, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr2", metav1.GetOptions{}) + cidr, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr2", metav1.GetOptions{}) if err != nil { return false, nil } @@ -235,13 +235,13 @@ func TestServiceCIDRDeletion(t *testing.T) { } // add a new ServiceCIDR that overlaps the existing one - _, err = client.NetworkingV1alpha1().ServiceCIDRs().Create(ctx, makeServiceCIDR("cidr3", cidr3, ""), metav1.CreateOptions{}) + _, err = client.NetworkingV1beta1().ServiceCIDRs().Create(ctx, makeServiceCIDR("cidr3", cidr3, ""), metav1.CreateOptions{}) if err != nil { t.Fatal((err)) } // Wait until is ready. if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - cidr, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr3", metav1.GetOptions{}) + cidr, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr3", metav1.GetOptions{}) if err != nil { return false, nil } @@ -250,13 +250,13 @@ func TestServiceCIDRDeletion(t *testing.T) { t.Fatalf("cidr3 is not ready") } // we should be able to delete the ServiceCIDR2 despite it contains IP addresses as it is contained on ServiceCIDR3 - err = client.NetworkingV1alpha1().ServiceCIDRs().Delete(ctx, "cidr2", metav1.DeleteOptions{}) + err = client.NetworkingV1beta1().ServiceCIDRs().Delete(ctx, "cidr2", metav1.DeleteOptions{}) if err != nil { t.Fatal((err)) } if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - _, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr2", metav1.GetOptions{}) + _, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr2", metav1.GetOptions{}) if err != nil && apierrors.IsNotFound(err) { return true, nil } @@ -266,18 +266,18 @@ func TestServiceCIDRDeletion(t *testing.T) { } // serviceCIDR3 will not be able to be deleted until the IPAddress is removed - err = client.NetworkingV1alpha1().ServiceCIDRs().Delete(ctx, "cidr3", metav1.DeleteOptions{}) + err = client.NetworkingV1beta1().ServiceCIDRs().Delete(ctx, "cidr3", metav1.DeleteOptions{}) if err != nil { t.Fatal((err)) } // Wait until is not ready. if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - cidr, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr3", metav1.GetOptions{}) + cidr, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr3", metav1.GetOptions{}) if err != nil { return false, nil } for _, condition := range cidr.Status.Conditions { - if condition.Type == networkingv1alpha1.ServiceCIDRConditionReady { + if condition.Type == networkingv1beta1.ServiceCIDRConditionReady { return condition.Status == metav1.ConditionStatus(metav1.ConditionFalse), nil } } @@ -293,7 +293,7 @@ func TestServiceCIDRDeletion(t *testing.T) { // cidr3 must not exist if err := wait.PollUntilContextTimeout(context.Background(), 250*time.Millisecond, 30*time.Second, false, func(ctx context.Context) (bool, error) { - _, err := client.NetworkingV1alpha1().ServiceCIDRs().Get(ctx, "cidr3", metav1.GetOptions{}) + _, err := client.NetworkingV1beta1().ServiceCIDRs().Get(ctx, "cidr3", metav1.GetOptions{}) if err != nil && apierrors.IsNotFound(err) { return true, nil } @@ -303,12 +303,12 @@ func TestServiceCIDRDeletion(t *testing.T) { } } -func makeServiceCIDR(name, primary, secondary string) *networkingv1alpha1.ServiceCIDR { - serviceCIDR := &networkingv1alpha1.ServiceCIDR{ +func makeServiceCIDR(name, primary, secondary string) *networkingv1beta1.ServiceCIDR { + serviceCIDR := &networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: networkingv1alpha1.ServiceCIDRSpec{}, + Spec: networkingv1beta1.ServiceCIDRSpec{}, } serviceCIDR.Spec.CIDRs = append(serviceCIDR.Spec.CIDRs, primary) if secondary != "" { @@ -332,13 +332,13 @@ func makeService(name string) *v1.Service { } // returns true of the ServiceCIDRConditionReady is true -func isServiceCIDRReady(serviceCIDR *networkingv1alpha1.ServiceCIDR) bool { +func isServiceCIDRReady(serviceCIDR *networkingv1beta1.ServiceCIDR) bool { if serviceCIDR == nil { return false } for _, condition := range serviceCIDR.Status.Conditions { - if condition.Type == networkingv1alpha1.ServiceCIDRConditionReady { + if condition.Type == networkingv1beta1.ServiceCIDRConditionReady { return condition.Status == metav1.ConditionStatus(metav1.ConditionTrue) } } From 0e1f9dadd6faaa1e36a4cc97e0fb54aa9768839e Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Sat, 29 Jun 2024 10:06:55 +0000 Subject: [PATCH 09/10] modify components to use the networking v1beta1 API --- cmd/kube-apiserver/app/aggregator.go | 1 + cmd/kube-controller-manager/app/networking.go | 4 +- cmd/kube-proxy/app/server.go | 2 +- pkg/api/servicecidr/servicecidr.go | 18 +-- pkg/api/servicecidr/servicecidr_test.go | 120 +++++++-------- .../servicecidrs/servicecidrs_controller.go | 54 +++---- .../servicecidrs_controller_test.go | 138 +++++++++--------- .../default_servicecidr_controller.go | 32 ++-- .../default_servicecidr_controller_test.go | 32 ++-- pkg/controlplane/instance.go | 2 + pkg/printers/internalversion/printers.go | 6 +- pkg/proxy/config/config.go | 12 +- pkg/registry/core/rest/storage_core.go | 22 +-- .../core/service/ipallocator/cidrallocator.go | 44 +++--- .../service/ipallocator/cidrallocator_test.go | 30 ++-- .../ipallocator/controller/repairip.go | 42 +++--- .../ipallocator/controller/repairip_test.go | 136 ++++++++--------- .../core/service/ipallocator/ipallocator.go | 36 ++--- .../service/ipallocator/ipallocator_test.go | 12 +- 19 files changed, 373 insertions(+), 370 deletions(-) diff --git a/cmd/kube-apiserver/app/aggregator.go b/cmd/kube-apiserver/app/aggregator.go index 6da672bb29f..e561980d64d 100644 --- a/cmd/kube-apiserver/app/aggregator.go +++ b/cmd/kube-apiserver/app/aggregator.go @@ -40,6 +40,7 @@ var apiVersionPriorities = merge(controlplaneapiserver.DefaultGenericAPIServiceP {Group: "batch", Version: "v1beta1"}: {Group: 17400, Version: 9}, {Group: "batch", Version: "v2alpha1"}: {Group: 17400, Version: 9}, {Group: "networking.k8s.io", Version: "v1"}: {Group: 17200, Version: 15}, + {Group: "networking.k8s.io", Version: "v1beta1"}: {Group: 17200, Version: 9}, {Group: "networking.k8s.io", Version: "v1alpha1"}: {Group: 17200, Version: 1}, {Group: "policy", Version: "v1"}: {Group: 17100, Version: 15}, {Group: "policy", Version: "v1beta1"}: {Group: 17100, Version: 9}, diff --git a/cmd/kube-controller-manager/app/networking.go b/cmd/kube-controller-manager/app/networking.go index 65314ef06c3..0c05fafeb12 100644 --- a/cmd/kube-controller-manager/app/networking.go +++ b/cmd/kube-controller-manager/app/networking.go @@ -40,8 +40,8 @@ func newServiceCIDRsControllerDescriptor() *ControllerDescriptor { func startServiceCIDRsController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) { go servicecidrs.NewController( ctx, - controllerContext.InformerFactory.Networking().V1alpha1().ServiceCIDRs(), - controllerContext.InformerFactory.Networking().V1alpha1().IPAddresses(), + controllerContext.InformerFactory.Networking().V1beta1().ServiceCIDRs(), + controllerContext.InformerFactory.Networking().V1beta1().IPAddresses(), controllerContext.ClientBuilder.ClientOrDie("service-cidrs-controller"), ).Run(ctx, 5) // TODO use component config diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index 3e132baf95f..84b65bb8d0e 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -982,7 +982,7 @@ func (s *ProxyServer) Run(ctx context.Context) error { go endpointSliceConfig.Run(ctx.Done()) if utilfeature.DefaultFeatureGate.Enabled(features.MultiCIDRServiceAllocator) { - serviceCIDRConfig := config.NewServiceCIDRConfig(ctx, informerFactory.Networking().V1alpha1().ServiceCIDRs(), s.Config.ConfigSyncPeriod.Duration) + serviceCIDRConfig := config.NewServiceCIDRConfig(ctx, informerFactory.Networking().V1beta1().ServiceCIDRs(), s.Config.ConfigSyncPeriod.Duration) serviceCIDRConfig.RegisterEventHandler(s.Proxier) go serviceCIDRConfig.Run(wait.NeverStop) } diff --git a/pkg/api/servicecidr/servicecidr.go b/pkg/api/servicecidr/servicecidr.go index 7c1e7c2c170..13ceae49251 100644 --- a/pkg/api/servicecidr/servicecidr.go +++ b/pkg/api/servicecidr/servicecidr.go @@ -21,14 +21,14 @@ import ( "net" "net/netip" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" "k8s.io/apimachinery/pkg/labels" - networkinglisters "k8s.io/client-go/listers/networking/v1alpha1" + networkinglisters "k8s.io/client-go/listers/networking/v1beta1" ) // OverlapsPrefix return the list of ServiceCIDR that overlaps with the prefix passed as argument -func OverlapsPrefix(serviceCIDRLister networkinglisters.ServiceCIDRLister, prefix netip.Prefix) []*networkingv1alpha1.ServiceCIDR { - result := []*networkingv1alpha1.ServiceCIDR{} +func OverlapsPrefix(serviceCIDRLister networkinglisters.ServiceCIDRLister, prefix netip.Prefix) []*networkingv1beta1.ServiceCIDR { + result := []*networkingv1beta1.ServiceCIDR{} serviceCIDRList, err := serviceCIDRLister.List(labels.Everything()) if err != nil { return result @@ -47,8 +47,8 @@ func OverlapsPrefix(serviceCIDRLister networkinglisters.ServiceCIDRLister, prefi } // ContainsPrefix return the list of ServiceCIDR that contains the prefix passed as argument -func ContainsPrefix(serviceCIDRLister networkinglisters.ServiceCIDRLister, prefix netip.Prefix) []*networkingv1alpha1.ServiceCIDR { - result := []*networkingv1alpha1.ServiceCIDR{} +func ContainsPrefix(serviceCIDRLister networkinglisters.ServiceCIDRLister, prefix netip.Prefix) []*networkingv1beta1.ServiceCIDR { + result := []*networkingv1beta1.ServiceCIDR{} serviceCIDRList, err := serviceCIDRLister.List(labels.Everything()) if err != nil { return result @@ -67,14 +67,14 @@ func ContainsPrefix(serviceCIDRLister networkinglisters.ServiceCIDRLister, prefi } // ContainsIP return the list of ServiceCIDR that contains the IP address passed as argument -func ContainsIP(serviceCIDRLister networkinglisters.ServiceCIDRLister, ip net.IP) []*networkingv1alpha1.ServiceCIDR { +func ContainsIP(serviceCIDRLister networkinglisters.ServiceCIDRLister, ip net.IP) []*networkingv1beta1.ServiceCIDR { address := IPToAddr(ip) return ContainsAddress(serviceCIDRLister, address) } // ContainsAddress return the list of ServiceCIDR that contains the address passed as argument -func ContainsAddress(serviceCIDRLister networkinglisters.ServiceCIDRLister, address netip.Addr) []*networkingv1alpha1.ServiceCIDR { - result := []*networkingv1alpha1.ServiceCIDR{} +func ContainsAddress(serviceCIDRLister networkinglisters.ServiceCIDRLister, address netip.Addr) []*networkingv1beta1.ServiceCIDR { + result := []*networkingv1beta1.ServiceCIDR{} serviceCIDRList, err := serviceCIDRLister.List(labels.Everything()) if err != nil { return result diff --git a/pkg/api/servicecidr/servicecidr_test.go b/pkg/api/servicecidr/servicecidr_test.go index 7d887ed92a9..6a75166ffed 100644 --- a/pkg/api/servicecidr/servicecidr_test.go +++ b/pkg/api/servicecidr/servicecidr_test.go @@ -22,19 +22,19 @@ import ( "sort" "testing" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - networkinglisters "k8s.io/client-go/listers/networking/v1alpha1" + networkinglisters "k8s.io/client-go/listers/networking/v1beta1" "k8s.io/client-go/tools/cache" netutils "k8s.io/utils/net" ) -func newServiceCIDR(name, primary, secondary string) *networkingv1alpha1.ServiceCIDR { - serviceCIDR := &networkingv1alpha1.ServiceCIDR{ +func newServiceCIDR(name, primary, secondary string) *networkingv1beta1.ServiceCIDR { + serviceCIDR := &networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: networkingv1alpha1.ServiceCIDRSpec{}, + Spec: networkingv1beta1.ServiceCIDRSpec{}, } serviceCIDR.Spec.CIDRs = append(serviceCIDR.Spec.CIDRs, primary) if secondary != "" { @@ -46,13 +46,13 @@ func newServiceCIDR(name, primary, secondary string) *networkingv1alpha1.Service func TestOverlapsPrefix(t *testing.T) { tests := []struct { name string - serviceCIDRs []*networkingv1alpha1.ServiceCIDR + serviceCIDRs []*networkingv1beta1.ServiceCIDR prefix netip.Prefix want []string }{ { name: "only one ServiceCIDR and IPv4 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("10.0.0.0/26"), @@ -60,7 +60,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and same IPv4 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("10.0.0.0/24"), @@ -68,7 +68,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and larger IPv4 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("10.0.0.0/16"), @@ -76,7 +76,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and non contained IPv4 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("192.168.0.0/24"), @@ -84,7 +84,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db8::/112"), @@ -92,7 +92,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and same IPv6 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db8::/96"), @@ -100,7 +100,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 larger", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db8::/64"), @@ -108,7 +108,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 prefix out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db2::/112"), @@ -116,7 +116,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -125,7 +125,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two overlapping ServiceCIDR and IPv4 prefix only contained in one", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -134,7 +134,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 larger", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -143,7 +143,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 prefix not contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -152,7 +152,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv6 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -161,7 +161,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv6 prefix contained in one", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -170,7 +170,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and aprefix larger", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -179,7 +179,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and prefix out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -188,7 +188,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "multiple ServiceCIDR match with overlap contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("kubernetes2", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), @@ -198,7 +198,7 @@ func TestOverlapsPrefix(t *testing.T) { }, { name: "multiple ServiceCIDR match with overlap contains", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("kubernetes2", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), @@ -234,13 +234,13 @@ func TestOverlapsPrefix(t *testing.T) { func TestContainsPrefix(t *testing.T) { tests := []struct { name string - serviceCIDRs []*networkingv1alpha1.ServiceCIDR + serviceCIDRs []*networkingv1beta1.ServiceCIDR prefix netip.Prefix want []string }{ { name: "only one ServiceCIDR and IPv4 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("10.0.0.0/26"), @@ -248,7 +248,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and same IPv4 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("10.0.0.0/24"), @@ -256,7 +256,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and larger IPv4 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("10.0.0.0/16"), @@ -264,7 +264,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and non containerd IPv4 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("192.168.0.0/24"), @@ -272,7 +272,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db8::/112"), @@ -280,7 +280,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and same IPv6 prefix", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db8::/96"), @@ -288,7 +288,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 larger", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db8::/64"), @@ -296,7 +296,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 prefix out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, prefix: netip.MustParsePrefix("2001:db2::/112"), @@ -304,7 +304,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -313,7 +313,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 prefix only contained in one", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -322,7 +322,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 larger", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -331,7 +331,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 prefix not contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -340,7 +340,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv6 prefix contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -349,7 +349,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and IPv6 prefix contained in one", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -358,7 +358,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and aprefix larger", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -367,7 +367,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "two ServiceCIDR and prefix out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -376,7 +376,7 @@ func TestContainsPrefix(t *testing.T) { }, { name: "multiple ServiceCIDR match with overlap", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("kubernetes2", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), @@ -412,13 +412,13 @@ func TestContainsPrefix(t *testing.T) { func TestContainsAddress(t *testing.T) { tests := []struct { name string - serviceCIDRs []*networkingv1alpha1.ServiceCIDR + serviceCIDRs []*networkingv1beta1.ServiceCIDR address netip.Addr want []string }{ { name: "only one ServiceCIDR and IPv4 address contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("10.0.0.1"), @@ -426,7 +426,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv4 address broadcast", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("10.0.0.255"), @@ -434,7 +434,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv4 address base", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("10.0.0.0"), @@ -442,7 +442,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv4 address out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("192.0.0.1"), @@ -450,7 +450,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 address contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("2001:db8::2:3"), @@ -458,7 +458,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 address broadcast", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("2001:db8::ffff:ffff"), @@ -466,7 +466,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 address base", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("2001:db8::"), @@ -474,7 +474,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "only one ServiceCIDR and IPv6 address out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), }, address: netip.MustParseAddr("2002:1:2:3::2"), @@ -482,7 +482,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 address contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -491,7 +491,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 address broadcast", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -500,7 +500,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 address base", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -509,7 +509,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and IPv4 address out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -518,7 +518,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and IPv6 address contained", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -527,7 +527,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and address broadcast", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -536,7 +536,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and address base", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -545,7 +545,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "two ServiceCIDR and address out of range", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), }, @@ -554,7 +554,7 @@ func TestContainsAddress(t *testing.T) { }, { name: "multiple ServiceCIDR match with overlap", - serviceCIDRs: []*networkingv1alpha1.ServiceCIDR{ + serviceCIDRs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("kubernetes2", "10.0.0.0/24", "2001:db8::/96"), newServiceCIDR("secondary", "10.0.0.0/16", "2001:db8::/64"), diff --git a/pkg/controller/servicecidrs/servicecidrs_controller.go b/pkg/controller/servicecidrs/servicecidrs_controller.go index b31a0b03396..64305dd62d9 100644 --- a/pkg/controller/servicecidrs/servicecidrs_controller.go +++ b/pkg/controller/servicecidrs/servicecidrs_controller.go @@ -23,7 +23,7 @@ import ( "time" v1 "k8s.io/api/core/v1" - networkingapiv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -32,12 +32,12 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" metav1apply "k8s.io/client-go/applyconfigurations/meta/v1" - networkingapiv1alpha1apply "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - networkinginformers "k8s.io/client-go/informers/networking/v1alpha1" + networkingapiv1beta1apply "k8s.io/client-go/applyconfigurations/networking/v1beta1" + networkinginformers "k8s.io/client-go/informers/networking/v1beta1" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" v1core "k8s.io/client-go/kubernetes/typed/core/v1" - networkinglisters "k8s.io/client-go/listers/networking/v1alpha1" + networkinglisters "k8s.io/client-go/listers/networking/v1beta1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" @@ -147,7 +147,7 @@ func (c *Controller) Run(ctx context.Context, workers int) { } func (c *Controller) addServiceCIDR(obj interface{}) { - cidr, ok := obj.(*networkingapiv1alpha1.ServiceCIDR) + cidr, ok := obj.(*networkingapiv1beta1.ServiceCIDR) if !ok { return } @@ -174,7 +174,7 @@ func (c *Controller) deleteServiceCIDR(obj interface{}) { // addIPAddress may block a ServiceCIDR deletion func (c *Controller) addIPAddress(obj interface{}) { - ip, ok := obj.(*networkingapiv1alpha1.IPAddress) + ip, ok := obj.(*networkingapiv1beta1.IPAddress) if !ok { return } @@ -186,13 +186,13 @@ func (c *Controller) addIPAddress(obj interface{}) { // deleteIPAddress may unblock a ServiceCIDR deletion func (c *Controller) deleteIPAddress(obj interface{}) { - ip, ok := obj.(*networkingapiv1alpha1.IPAddress) + ip, ok := obj.(*networkingapiv1beta1.IPAddress) if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { return } - ip, ok = tombstone.Obj.(*networkingapiv1alpha1.IPAddress) + ip, ok = tombstone.Obj.(*networkingapiv1beta1.IPAddress) if !ok { return } @@ -206,7 +206,7 @@ func (c *Controller) deleteIPAddress(obj interface{}) { // overlappingServiceCIDRs, given a ServiceCIDR return the ServiceCIDRs that contain or are contained, // this is required because adding or removing a CIDR will require to recompute the // state of each ServiceCIDR to check if can be unblocked on deletion. -func (c *Controller) overlappingServiceCIDRs(serviceCIDR *networkingapiv1alpha1.ServiceCIDR) []string { +func (c *Controller) overlappingServiceCIDRs(serviceCIDR *networkingapiv1beta1.ServiceCIDR) []string { result := sets.New[string]() for _, cidr := range serviceCIDR.Spec.CIDRs { if prefix, err := netip.ParsePrefix(cidr); err == nil { // if is empty err will not be nil @@ -222,9 +222,9 @@ func (c *Controller) overlappingServiceCIDRs(serviceCIDR *networkingapiv1alpha1. // containingServiceCIDRs, given an IPAddress return the ServiceCIDRs that contains the IP, // as it may block or be blocking the deletion of the ServiceCIDRs that contain it. -func (c *Controller) containingServiceCIDRs(ip *networkingapiv1alpha1.IPAddress) []string { +func (c *Controller) containingServiceCIDRs(ip *networkingapiv1beta1.IPAddress) []string { // only process IPs managed by the kube-apiserver - managedBy, ok := ip.Labels[networkingapiv1alpha1.LabelManagedBy] + managedBy, ok := ip.Labels[networkingapiv1beta1.LabelManagedBy] if !ok || managedBy != ipallocator.ControllerName { return []string{} } @@ -302,15 +302,15 @@ func (c *Controller) sync(ctx context.Context, key string) error { // update the status to indicate why the ServiceCIDR can not be deleted, // it will be reevaludated by an event on any ServiceCIDR or IPAddress related object // that may remove this condition. - svcApplyStatus := networkingapiv1alpha1apply.ServiceCIDRStatus().WithConditions( + svcApplyStatus := networkingapiv1beta1apply.ServiceCIDRStatus().WithConditions( metav1apply.Condition(). - WithType(networkingapiv1alpha1.ServiceCIDRConditionReady). + WithType(networkingapiv1beta1.ServiceCIDRConditionReady). WithStatus(metav1.ConditionFalse). - WithReason(networkingapiv1alpha1.ServiceCIDRReasonTerminating). + WithReason(networkingapiv1beta1.ServiceCIDRReasonTerminating). WithMessage("There are still IPAddresses referencing the ServiceCIDR, please remove them or create a new ServiceCIDR"). WithLastTransitionTime(metav1.Now())) - svcApply := networkingapiv1alpha1apply.ServiceCIDR(cidr.Name).WithStatus(svcApplyStatus) - _, err = c.client.NetworkingV1alpha1().ServiceCIDRs().ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: controllerName, Force: true}) + svcApply := networkingapiv1beta1apply.ServiceCIDR(cidr.Name).WithStatus(svcApplyStatus) + _, err = c.client.NetworkingV1beta1().ServiceCIDRs().ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: controllerName, Force: true}) return err } // If there are no IPAddress depending on this ServiceCIDR is safe to remove it, @@ -333,14 +333,14 @@ func (c *Controller) sync(ctx context.Context, key string) error { } // Set Ready condition to True. - svcApplyStatus := networkingapiv1alpha1apply.ServiceCIDRStatus().WithConditions( + svcApplyStatus := networkingapiv1beta1apply.ServiceCIDRStatus().WithConditions( metav1apply.Condition(). - WithType(networkingapiv1alpha1.ServiceCIDRConditionReady). + WithType(networkingapiv1beta1.ServiceCIDRConditionReady). WithStatus(metav1.ConditionTrue). WithMessage("Kubernetes Service CIDR is ready"). WithLastTransitionTime(metav1.Now())) - svcApply := networkingapiv1alpha1apply.ServiceCIDR(cidr.Name).WithStatus(svcApplyStatus) - if _, err := c.client.NetworkingV1alpha1().ServiceCIDRs().ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: controllerName, Force: true}); err != nil { + svcApply := networkingapiv1beta1apply.ServiceCIDR(cidr.Name).WithStatus(svcApplyStatus) + if _, err := c.client.NetworkingV1beta1().ServiceCIDRs().ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: controllerName, Force: true}); err != nil { logger.Info("error updating default ServiceCIDR status", "error", err) c.eventRecorder.Eventf(cidr, v1.EventTypeWarning, "KubernetesServiceCIDRError", "The ServiceCIDR Status can not be set to Ready=True") return err @@ -350,7 +350,7 @@ func (c *Controller) sync(ctx context.Context, key string) error { } // canDeleteCIDR checks that the ServiceCIDR can be safely deleted and not leave orphan IPAddresses -func (c *Controller) canDeleteCIDR(ctx context.Context, serviceCIDR *networkingapiv1alpha1.ServiceCIDR) (bool, error) { +func (c *Controller) canDeleteCIDR(ctx context.Context, serviceCIDR *networkingapiv1beta1.ServiceCIDR) (bool, error) { logger := klog.FromContext(ctx) // Check if there is a subnet that already contains the ServiceCIDR that is going to be deleted. hasParent := true @@ -379,8 +379,8 @@ func (c *Controller) canDeleteCIDR(ctx context.Context, serviceCIDR *networkinga for _, cidr := range serviceCIDR.Spec.CIDRs { // get all the IPv4 addresses ipLabelSelector := labels.Set(map[string]string{ - networkingapiv1alpha1.LabelIPAddressFamily: string(convertToV1IPFamily(netutils.IPFamilyOfCIDRString(cidr))), - networkingapiv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingapiv1beta1.LabelIPAddressFamily: string(convertToV1IPFamily(netutils.IPFamilyOfCIDRString(cidr))), + networkingapiv1beta1.LabelManagedBy: ipallocator.ControllerName, }).AsSelectorPreValidated() ips, err := c.ipAddressLister.List(ipLabelSelector) if err != nil { @@ -411,7 +411,7 @@ func (c *Controller) canDeleteCIDR(ctx context.Context, serviceCIDR *networkinga return true, nil } -func (c *Controller) addServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr *networkingapiv1alpha1.ServiceCIDR) error { +func (c *Controller) addServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr *networkingapiv1beta1.ServiceCIDR) error { for _, f := range cidr.GetFinalizers() { if f == ServiceCIDRProtectionFinalizer { return nil @@ -427,7 +427,7 @@ func (c *Controller) addServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr * if err != nil { return err } - _, err = c.client.NetworkingV1alpha1().ServiceCIDRs().Patch(ctx, cidr.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) + _, err = c.client.NetworkingV1beta1().ServiceCIDRs().Patch(ctx, cidr.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) if err != nil && !apierrors.IsNotFound(err) { return err } @@ -436,7 +436,7 @@ func (c *Controller) addServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr * } -func (c *Controller) removeServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr *networkingapiv1alpha1.ServiceCIDR) error { +func (c *Controller) removeServiceCIDRFinalizerIfNeeded(ctx context.Context, cidr *networkingapiv1beta1.ServiceCIDR) error { found := false for _, f := range cidr.GetFinalizers() { if f == ServiceCIDRProtectionFinalizer { @@ -456,7 +456,7 @@ func (c *Controller) removeServiceCIDRFinalizerIfNeeded(ctx context.Context, cid if err != nil { return err } - _, err = c.client.NetworkingV1alpha1().ServiceCIDRs().Patch(ctx, cidr.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) + _, err = c.client.NetworkingV1beta1().ServiceCIDRs().Patch(ctx, cidr.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) if err != nil && !apierrors.IsNotFound(err) { return err } diff --git a/pkg/controller/servicecidrs/servicecidrs_controller_test.go b/pkg/controller/servicecidrs/servicecidrs_controller_test.go index 251fb2f019c..abb17e8090d 100644 --- a/pkg/controller/servicecidrs/servicecidrs_controller_test.go +++ b/pkg/controller/servicecidrs/servicecidrs_controller_test.go @@ -24,7 +24,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" v1 "k8s.io/api/core/v1" - networkingapiv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" @@ -44,12 +44,12 @@ type testController struct { ipaddressesStore cache.Store } -func newController(ctx context.Context, t *testing.T, cidrs []*networkingapiv1alpha1.ServiceCIDR, ips []*networkingapiv1alpha1.IPAddress) (*fake.Clientset, *testController) { +func newController(ctx context.Context, t *testing.T, cidrs []*networkingapiv1beta1.ServiceCIDR, ips []*networkingapiv1beta1.IPAddress) (*fake.Clientset, *testController) { client := fake.NewSimpleClientset() informerFactory := informers.NewSharedInformerFactory(client, controller.NoResyncPeriodFunc()) - serviceCIDRInformer := informerFactory.Networking().V1alpha1().ServiceCIDRs() + serviceCIDRInformer := informerFactory.Networking().V1beta1().ServiceCIDRs() cidrStore := serviceCIDRInformer.Informer().GetStore() for _, obj := range cidrs { err := cidrStore.Add(obj) @@ -57,7 +57,7 @@ func newController(ctx context.Context, t *testing.T, cidrs []*networkingapiv1al t.Fatal(err) } } - ipAddressInformer := informerFactory.Networking().V1alpha1().IPAddresses() + ipAddressInformer := informerFactory.Networking().V1beta1().IPAddresses() ipStore := ipAddressInformer.Informer().GetStore() for _, obj := range ips { err := ipStore.Add(obj) @@ -97,8 +97,8 @@ func TestControllerSync(t *testing.T) { testCases := []struct { name string - cidrs []*networkingapiv1alpha1.ServiceCIDR - ips []*networkingapiv1alpha1.IPAddress + cidrs []*networkingapiv1beta1.ServiceCIDR + ips []*networkingapiv1beta1.IPAddress cidrSynced string actions [][]string // verb and resource and subresource }{ @@ -107,7 +107,7 @@ func TestControllerSync(t *testing.T) { }, { name: "default service CIDR must have finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, cidrSynced: defaultservicecidr.DefaultServiceCIDRName, @@ -115,7 +115,7 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR must have finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR("no-finalizer", "192.168.0.0/24", "2001:db2::/64"), }, cidrSynced: "no-finalizer", @@ -123,7 +123,7 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted must remove the finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, }, cidrSynced: deletedServiceCIDR.Name, @@ -131,7 +131,7 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted but within the grace period must be requeued not remove the finalizer", // TODO: assert is actually requeued - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletingServiceCIDR, }, cidrSynced: deletingServiceCIDR.Name, @@ -139,10 +139,10 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted with IPv4 addresses should update the status", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -150,11 +150,11 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted and overlapping same range and IPv4 addresses should remove the finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -162,11 +162,11 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted and overlapping and IPv4 addresses should remove the finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, makeServiceCIDR("overlapping", "192.168.0.0/16", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -174,11 +174,11 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted and not overlapping and IPv4 addresses should update the status", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, makeServiceCIDR("overlapping", "192.168.255.0/26", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -186,10 +186,10 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted with IPv6 addresses should update the status", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("2001:db2::1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -197,11 +197,11 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted and overlapping same range and IPv6 addresses should remove the finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("2001:db2::1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -209,11 +209,11 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted and overlapping and IPv6 addresses should remove the finalizer", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, makeServiceCIDR("overlapping", "192.168.0.0/16", "2001:db2::/48"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("2001:db2::1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -221,11 +221,11 @@ func TestControllerSync(t *testing.T) { }, { name: "service CIDR being deleted and not overlapping and IPv6 addresses should update the status", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ deletedServiceCIDR, makeServiceCIDR("overlapping", "192.168.255.0/26", "2001:db2:a:b::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("2001:db2::1"), }, cidrSynced: deletedServiceCIDR.Name, @@ -247,12 +247,12 @@ func TestControllerSync(t *testing.T) { } } -func makeServiceCIDR(name, primary, secondary string) *networkingapiv1alpha1.ServiceCIDR { - serviceCIDR := &networkingapiv1alpha1.ServiceCIDR{ +func makeServiceCIDR(name, primary, secondary string) *networkingapiv1beta1.ServiceCIDR { + serviceCIDR := &networkingapiv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{}, + Spec: networkingapiv1beta1.ServiceCIDRSpec{}, } serviceCIDR.Spec.CIDRs = append(serviceCIDR.Spec.CIDRs, primary) if secondary != "" { @@ -261,17 +261,17 @@ func makeServiceCIDR(name, primary, secondary string) *networkingapiv1alpha1.Ser return serviceCIDR } -func makeIPAddress(name string) *networkingapiv1alpha1.IPAddress { +func makeIPAddress(name string) *networkingapiv1beta1.IPAddress { family := string(v1.IPv4Protocol) if netutils.IsIPv6String(name) { family = string(v1.IPv6Protocol) } - return &networkingapiv1alpha1.IPAddress{ + return &networkingapiv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ - networkingapiv1alpha1.LabelIPAddressFamily: family, - networkingapiv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingapiv1beta1.LabelIPAddressFamily: family, + networkingapiv1beta1.LabelManagedBy: ipallocator.ControllerName, }, }, } @@ -302,9 +302,9 @@ func expectAction(t *testing.T, actions []k8stesting.Action, expected [][]string func TestController_canDeleteCIDR(t *testing.T) { tests := []struct { name string - cidrs []*networkingapiv1alpha1.ServiceCIDR - ips []*networkingapiv1alpha1.IPAddress - cidrSynced *networkingapiv1alpha1.ServiceCIDR + cidrs []*networkingapiv1beta1.ServiceCIDR + ips []*networkingapiv1beta1.IPAddress + cidrSynced *networkingapiv1beta1.ServiceCIDR want bool }{ { @@ -314,7 +314,7 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR and no IPs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -322,10 +322,10 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with IPs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.24"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -333,10 +333,10 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR without IPs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.1.24"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -344,10 +344,10 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with IPv4 address referencing the subnet address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.0"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -355,10 +355,10 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with IPv4 address referencing the broadcast address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.255"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -366,10 +366,10 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with IPv6 address referencing the broadcast address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("2001:0db2::ffff:ffff:ffff:ffff"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -377,11 +377,11 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with same range overlapping and IPs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.23"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -389,11 +389,11 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with smaller range overlapping and IPs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/26", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.23"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -401,11 +401,11 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with smaller range overlapping but IPs orphan", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/28", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.23"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -413,11 +413,11 @@ func TestController_canDeleteCIDR(t *testing.T) { }, { name: "CIDR with larger range overlapping and IPs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/16", "2001:db2::/64"), }, - ips: []*networkingapiv1alpha1.IPAddress{ + ips: []*networkingapiv1beta1.IPAddress{ makeIPAddress("192.168.0.23"), }, cidrSynced: makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), @@ -442,8 +442,8 @@ func TestController_canDeleteCIDR(t *testing.T) { func TestController_ipToCidrs(t *testing.T) { tests := []struct { name string - cidrs []*networkingapiv1alpha1.ServiceCIDR - ip *networkingapiv1alpha1.IPAddress + cidrs []*networkingapiv1beta1.ServiceCIDR + ip *networkingapiv1beta1.IPAddress want []string }{ { @@ -452,7 +452,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{}, }, { name: "one CIDR", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("unrelated", "10.0.0.0/24", ""), makeServiceCIDR("unrelated2", "10.0.0.0/16", ""), @@ -461,7 +461,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{defaultservicecidr.DefaultServiceCIDRName}, }, { name: "two equal CIDR", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/96"), makeServiceCIDR("unrelated", "10.0.0.0/24", ""), @@ -471,7 +471,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{defaultservicecidr.DefaultServiceCIDRName, "overlapping"}, }, { name: "three CIDR - two same and one larger", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping2", "192.168.0.0/26", "2001:db2::/96"), @@ -482,7 +482,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{defaultservicecidr.DefaultServiceCIDRName, "overlapping", "overlapping2"}, }, { name: "three CIDR - two same and one larger - IPv4 subnet address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping2", "192.168.0.0/26", "2001:db2::/96"), @@ -493,7 +493,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{}, }, { name: "three CIDR - two same and one larger - IPv4 broadcast address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping2", "192.168.0.0/26", "2001:db2::/96"), @@ -504,7 +504,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{defaultservicecidr.DefaultServiceCIDRName, "overlapping"}, }, { name: "three CIDR - two same and one larger - IPv6 subnet address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping2", "192.168.0.0/26", "2001:db2::/96"), @@ -515,7 +515,7 @@ func TestController_ipToCidrs(t *testing.T) { want: []string{}, }, { name: "three CIDR - two same and one larger - IPv6 broadcast address", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping2", "192.168.0.0/26", "2001:db2::/96"), @@ -539,8 +539,8 @@ func TestController_ipToCidrs(t *testing.T) { func TestController_cidrToCidrs(t *testing.T) { tests := []struct { name string - cidrs []*networkingapiv1alpha1.ServiceCIDR - cidr *networkingapiv1alpha1.ServiceCIDR + cidrs []*networkingapiv1beta1.ServiceCIDR + cidr *networkingapiv1beta1.ServiceCIDR want []string }{ { @@ -549,7 +549,7 @@ func TestController_cidrToCidrs(t *testing.T) { want: []string{}, }, { name: "one CIDR", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("unrelated", "10.0.0.0/24", ""), makeServiceCIDR("unrelated2", "10.0.0.0/16", ""), @@ -558,7 +558,7 @@ func TestController_cidrToCidrs(t *testing.T) { want: []string{defaultservicecidr.DefaultServiceCIDRName}, }, { name: "two equal CIDR", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/96"), makeServiceCIDR("unrelated", "10.0.0.0/24", ""), @@ -568,7 +568,7 @@ func TestController_cidrToCidrs(t *testing.T) { want: []string{defaultservicecidr.DefaultServiceCIDRName, "overlapping"}, }, { name: "three CIDR - two same and one larger", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ makeServiceCIDR(defaultservicecidr.DefaultServiceCIDRName, "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping", "192.168.0.0/24", "2001:db2::/64"), makeServiceCIDR("overlapping2", "192.168.0.0/26", "2001:db2::/96"), diff --git a/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go b/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go index 194746dc11c..3ed98161c11 100644 --- a/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go +++ b/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller.go @@ -23,19 +23,19 @@ import ( "time" v1 "k8s.io/api/core/v1" - networkingapiv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" metav1apply "k8s.io/client-go/applyconfigurations/meta/v1" - networkingapiv1alpha1apply "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - networkingv1alpha1informers "k8s.io/client-go/informers/networking/v1alpha1" + networkingapiv1beta1apply "k8s.io/client-go/applyconfigurations/networking/v1beta1" + networkingv1beta1informers "k8s.io/client-go/informers/networking/v1beta1" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" v1core "k8s.io/client-go/kubernetes/typed/core/v1" - networkingv1alpha1listers "k8s.io/client-go/listers/networking/v1alpha1" + networkingv1beta1listers "k8s.io/client-go/listers/networking/v1beta1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/klog/v2" @@ -67,13 +67,13 @@ func NewController( } // instead of using the shared informers from the controlplane instance, we construct our own informer // because we need such a small subset of the information available, only the kubernetes.default ServiceCIDR - c.serviceCIDRInformer = networkingv1alpha1informers.NewFilteredServiceCIDRInformer(client, 12*time.Hour, + c.serviceCIDRInformer = networkingv1beta1informers.NewFilteredServiceCIDRInformer(client, 12*time.Hour, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, func(options *metav1.ListOptions) { options.FieldSelector = fields.OneTermEqualSelector("metadata.name", DefaultServiceCIDRName).String() }) - c.serviceCIDRLister = networkingv1alpha1listers.NewServiceCIDRLister(c.serviceCIDRInformer.GetIndexer()) + c.serviceCIDRLister = networkingv1beta1listers.NewServiceCIDRLister(c.serviceCIDRInformer.GetIndexer()) c.serviceCIDRsSynced = c.serviceCIDRInformer.HasSynced return c @@ -88,7 +88,7 @@ type Controller struct { eventRecorder record.EventRecorder serviceCIDRInformer cache.SharedIndexInformer - serviceCIDRLister networkingv1alpha1listers.ServiceCIDRLister + serviceCIDRLister networkingv1beta1listers.ServiceCIDRLister serviceCIDRsSynced cache.InformerSynced interval time.Duration @@ -149,15 +149,15 @@ func (c *Controller) sync() error { // default ServiceCIDR does not exist klog.Infof("Creating default ServiceCIDR with CIDRs: %v", c.cidrs) - serviceCIDR = &networkingapiv1alpha1.ServiceCIDR{ + serviceCIDR = &networkingapiv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceCIDRName, }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{ + Spec: networkingapiv1beta1.ServiceCIDRSpec{ CIDRs: c.cidrs, }, } - serviceCIDR, err = c.client.NetworkingV1alpha1().ServiceCIDRs().Create(context.Background(), serviceCIDR, metav1.CreateOptions{}) + serviceCIDR, err = c.client.NetworkingV1beta1().ServiceCIDRs().Create(context.Background(), serviceCIDR, metav1.CreateOptions{}) if err != nil && !apierrors.IsAlreadyExists(err) { c.eventRecorder.Eventf(serviceCIDR, v1.EventTypeWarning, "KubernetesDefaultServiceCIDRError", "The default ServiceCIDR can not be created") return err @@ -166,7 +166,7 @@ func (c *Controller) sync() error { return nil } -func (c *Controller) syncStatus(serviceCIDR *networkingapiv1alpha1.ServiceCIDR) { +func (c *Controller) syncStatus(serviceCIDR *networkingapiv1beta1.ServiceCIDR) { // don't sync the status of the ServiceCIDR if is being deleted, // deletion must be handled by the controller-manager if !serviceCIDR.GetDeletionTimestamp().IsZero() { @@ -176,7 +176,7 @@ func (c *Controller) syncStatus(serviceCIDR *networkingapiv1alpha1.ServiceCIDR) // This controller will set the Ready condition to true if the Ready condition // does not exist and the CIDR values match this controller CIDR values. for _, condition := range serviceCIDR.Status.Conditions { - if condition.Type == networkingapiv1alpha1.ServiceCIDRConditionReady { + if condition.Type == networkingapiv1beta1.ServiceCIDRConditionReady { if condition.Status == metav1.ConditionTrue { return } @@ -188,14 +188,14 @@ func (c *Controller) syncStatus(serviceCIDR *networkingapiv1alpha1.ServiceCIDR) // set status to ready if the ServiceCIDR matches this configuration if reflect.DeepEqual(c.cidrs, serviceCIDR.Spec.CIDRs) { klog.Infof("Setting default ServiceCIDR condition Ready to True") - svcApplyStatus := networkingapiv1alpha1apply.ServiceCIDRStatus().WithConditions( + svcApplyStatus := networkingapiv1beta1apply.ServiceCIDRStatus().WithConditions( metav1apply.Condition(). - WithType(networkingapiv1alpha1.ServiceCIDRConditionReady). + WithType(networkingapiv1beta1.ServiceCIDRConditionReady). WithStatus(metav1.ConditionTrue). WithMessage("Kubernetes default Service CIDR is ready"). WithLastTransitionTime(metav1.Now())) - svcApply := networkingapiv1alpha1apply.ServiceCIDR(DefaultServiceCIDRName).WithStatus(svcApplyStatus) - if _, errApply := c.client.NetworkingV1alpha1().ServiceCIDRs().ApplyStatus(context.Background(), svcApply, metav1.ApplyOptions{FieldManager: controllerName, Force: true}); errApply != nil { + svcApply := networkingapiv1beta1apply.ServiceCIDR(DefaultServiceCIDRName).WithStatus(svcApplyStatus) + if _, errApply := c.client.NetworkingV1beta1().ServiceCIDRs().ApplyStatus(context.Background(), svcApply, metav1.ApplyOptions{FieldManager: controllerName, Force: true}); errApply != nil { klog.Infof("error updating default ServiceCIDR status: %v", errApply) c.eventRecorder.Eventf(serviceCIDR, v1.EventTypeWarning, "KubernetesDefaultServiceCIDRError", "The default ServiceCIDR Status can not be set to Ready=True") } diff --git a/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller_test.go b/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller_test.go index cf94a594703..050a6b609c1 100644 --- a/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller_test.go +++ b/pkg/controlplane/controller/defaultservicecidr/default_servicecidr_controller_test.go @@ -21,7 +21,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - networkingapiv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" @@ -35,11 +35,11 @@ const ( defaultIPv6CIDR = "2001:db8::/64" ) -func newController(t *testing.T, objects []*networkingapiv1alpha1.ServiceCIDR) (*fake.Clientset, *Controller) { +func newController(t *testing.T, objects []*networkingapiv1beta1.ServiceCIDR) (*fake.Clientset, *Controller) { client := fake.NewSimpleClientset() informerFactory := informers.NewSharedInformerFactory(client, 0) - serviceCIDRInformer := informerFactory.Networking().V1alpha1().ServiceCIDRs() + serviceCIDRInformer := informerFactory.Networking().V1beta1().ServiceCIDRs() store := serviceCIDRInformer.Informer().GetStore() for _, obj := range objects { @@ -64,7 +64,7 @@ func newController(t *testing.T, objects []*networkingapiv1alpha1.ServiceCIDR) ( func TestControllerSync(t *testing.T) { testCases := []struct { name string - cidrs []*networkingapiv1alpha1.ServiceCIDR + cidrs []*networkingapiv1beta1.ServiceCIDR actions [][]string // verb and resource }{ { @@ -73,12 +73,12 @@ func TestControllerSync(t *testing.T) { }, { name: "existing default service CIDR update Ready condition", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ { ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceCIDRName, }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{ + Spec: networkingapiv1beta1.ServiceCIDRSpec{ CIDRs: []string{defaultIPv4CIDR, defaultIPv6CIDR}, }, }, @@ -87,12 +87,12 @@ func TestControllerSync(t *testing.T) { }, { name: "existing default service CIDR not matching cidrs", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ { ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceCIDRName, }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{ + Spec: networkingapiv1beta1.ServiceCIDRSpec{ CIDRs: []string{"fd00::/112"}, }, }, @@ -100,18 +100,18 @@ func TestControllerSync(t *testing.T) { }, { name: "existing default service CIDR not ready", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ { ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceCIDRName, }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{ + Spec: networkingapiv1beta1.ServiceCIDRSpec{ CIDRs: []string{defaultIPv4CIDR, defaultIPv6CIDR}, }, - Status: networkingapiv1alpha1.ServiceCIDRStatus{ + Status: networkingapiv1beta1.ServiceCIDRStatus{ Conditions: []metav1.Condition{ { - Type: string(networkingapiv1alpha1.ServiceCIDRConditionReady), + Type: string(networkingapiv1beta1.ServiceCIDRConditionReady), Status: metav1.ConditionFalse, }, }, @@ -121,13 +121,13 @@ func TestControllerSync(t *testing.T) { }, { name: "existing default service CIDR being deleted", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ { ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceCIDRName, DeletionTimestamp: ptr.To(metav1.Now()), }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{ + Spec: networkingapiv1beta1.ServiceCIDRSpec{ CIDRs: []string{defaultIPv4CIDR, defaultIPv6CIDR}, }, }, @@ -135,12 +135,12 @@ func TestControllerSync(t *testing.T) { }, { name: "existing service CIDRs but not default", - cidrs: []*networkingapiv1alpha1.ServiceCIDR{ + cidrs: []*networkingapiv1beta1.ServiceCIDR{ { ObjectMeta: metav1.ObjectMeta{ Name: "non-default-cidr", }, - Spec: networkingapiv1alpha1.ServiceCIDRSpec{ + Spec: networkingapiv1beta1.ServiceCIDRSpec{ CIDRs: []string{defaultIPv4CIDR, defaultIPv6CIDR}, }, }, diff --git a/pkg/controlplane/instance.go b/pkg/controlplane/instance.go index 5f1b732de5b..205162b2f35 100644 --- a/pkg/controlplane/instance.go +++ b/pkg/controlplane/instance.go @@ -43,6 +43,7 @@ import ( eventsv1 "k8s.io/api/events/v1" networkingapiv1 "k8s.io/api/networking/v1" networkingapiv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingapiv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" policyapiv1 "k8s.io/api/policy/v1" rbacv1 "k8s.io/api/rbac/v1" @@ -466,6 +467,7 @@ var ( flowcontrolv1beta1.SchemeGroupVersion, flowcontrolv1beta2.SchemeGroupVersion, flowcontrolv1beta3.SchemeGroupVersion, + networkingapiv1beta1.SchemeGroupVersion, } // alphaAPIGroupVersionsDisabledByDefault holds the alpha APIs we have. They are always disabled by default. diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index a7c09864675..0a4ddc4572a 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -38,7 +38,7 @@ import ( discoveryv1beta1 "k8s.io/api/discovery/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1 "k8s.io/api/flowcontrol/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2" schedulingv1 "k8s.io/api/scheduling/v1" @@ -685,7 +685,7 @@ func AddHandlers(h printers.PrintHandler) { serviceCIDRColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "CIDRs", Type: "string", Description: networkingv1alpha1.ServiceCIDRSpec{}.SwaggerDoc()["cidrs"]}, + {Name: "CIDRs", Type: "string", Description: networkingv1beta1.ServiceCIDRSpec{}.SwaggerDoc()["cidrs"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } @@ -694,7 +694,7 @@ func AddHandlers(h printers.PrintHandler) { ipAddressColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "ParentRef", Type: "string", Description: networkingv1alpha1.IPAddressSpec{}.SwaggerDoc()["parentRef"]}, + {Name: "ParentRef", Type: "string", Description: networkingv1beta1.IPAddressSpec{}.SwaggerDoc()["parentRef"]}, } _ = h.TableHandler(ipAddressColumnDefinitions, printIPAddress) diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index eddb0b866ec..373cd0a1c64 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -24,12 +24,12 @@ import ( v1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" v1informers "k8s.io/client-go/informers/core/v1" discoveryv1informers "k8s.io/client-go/informers/discovery/v1" - networkingv1alpha1informers "k8s.io/client-go/informers/networking/v1alpha1" + networkingv1beta1informers "k8s.io/client-go/informers/networking/v1beta1" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" ) @@ -401,7 +401,7 @@ type ServiceCIDRConfig struct { } // NewServiceCIDRConfig creates a new ServiceCIDRConfig. -func NewServiceCIDRConfig(ctx context.Context, serviceCIDRInformer networkingv1alpha1informers.ServiceCIDRInformer, resyncPeriod time.Duration) *ServiceCIDRConfig { +func NewServiceCIDRConfig(ctx context.Context, serviceCIDRInformer networkingv1beta1informers.ServiceCIDRInformer, resyncPeriod time.Duration) *ServiceCIDRConfig { result := &ServiceCIDRConfig{ listerSynced: serviceCIDRInformer.Informer().HasSynced, cidrs: sets.New[string](), @@ -443,11 +443,11 @@ func (c *ServiceCIDRConfig) Run(stopCh <-chan struct{}) { // handleServiceCIDREvent is a helper function to handle Add, Update and Delete // events on ServiceCIDR objects and call downstream event handlers. func (c *ServiceCIDRConfig) handleServiceCIDREvent(oldObj, newObj interface{}) { - var oldServiceCIDR, newServiceCIDR *networkingv1alpha1.ServiceCIDR + var oldServiceCIDR, newServiceCIDR *networkingv1beta1.ServiceCIDR var ok bool if oldObj != nil { - oldServiceCIDR, ok = oldObj.(*networkingv1alpha1.ServiceCIDR) + oldServiceCIDR, ok = oldObj.(*networkingv1beta1.ServiceCIDR) if !ok { utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", oldObj)) return @@ -455,7 +455,7 @@ func (c *ServiceCIDRConfig) handleServiceCIDREvent(oldObj, newObj interface{}) { } if newObj != nil { - newServiceCIDR, ok = newObj.(*networkingv1alpha1.ServiceCIDR) + newServiceCIDR, ok = newObj.(*networkingv1beta1.ServiceCIDR) if !ok { utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", newObj)) return diff --git a/pkg/registry/core/rest/storage_core.go b/pkg/registry/core/rest/storage_core.go index e164ff63c49..d7ff0bdeed4 100644 --- a/pkg/registry/core/rest/storage_core.go +++ b/pkg/registry/core/rest/storage_core.go @@ -34,7 +34,7 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/kubernetes" - networkingv1alpha1client "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + networkingv1beta1client "k8s.io/client-go/kubernetes/typed/networking/v1beta1" policyclient "k8s.io/client-go/kubernetes/typed/policy/v1" "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -140,8 +140,8 @@ func New(c Config) (*legacyProvider, error) { c.Services.IPRepairInterval, client, c.Informers.Core().V1().Services(), - c.Informers.Networking().V1alpha1().ServiceCIDRs(), - c.Informers.Networking().V1alpha1().IPAddresses(), + c.Informers.Networking().V1beta1().ServiceCIDRs(), + c.Informers.Networking().V1beta1().IPAddresses(), ).RunUntil } @@ -348,7 +348,7 @@ func (c *Config) newServiceIPAllocators() (registries rangeRegistries, primaryCl return rangeRegistries{}, nil, nil, nil, fmt.Errorf("cannot create cluster IP allocator: %v", err) } } else { - networkingv1alphaClient, err := networkingv1alpha1client.NewForConfig(c.LoopbackClientConfig) + networkingv1beta1Client, err := networkingv1beta1client.NewForConfig(c.LoopbackClientConfig) if err != nil { return rangeRegistries{}, nil, nil, nil, err } @@ -388,9 +388,9 @@ func (c *Config) newServiceIPAllocators() (registries rangeRegistries, primaryCl // sets the default IPFamily that may not be coherent with the // existing default ServiceCIDR primaryClusterIPAllocator, err = ipallocator.NewMetaAllocator( - networkingv1alphaClient, - c.Informers.Networking().V1alpha1().ServiceCIDRs(), - c.Informers.Networking().V1alpha1().IPAddresses(), + networkingv1beta1Client, + c.Informers.Networking().V1beta1().ServiceCIDRs(), + c.Informers.Networking().V1beta1().IPAddresses(), netutils.IsIPv6CIDR(&serviceClusterIPRange), bitmapAllocator, ) @@ -420,7 +420,7 @@ func (c *Config) newServiceIPAllocators() (registries rangeRegistries, primaryCl return rangeRegistries{}, nil, nil, nil, fmt.Errorf("cannot create cluster secondary IP allocator: %v", err) } } else { - networkingv1alphaClient, err := networkingv1alpha1client.NewForConfig(c.LoopbackClientConfig) + networkingv1beta1Client, err := networkingv1beta1client.NewForConfig(c.LoopbackClientConfig) if err != nil { return rangeRegistries{}, nil, nil, nil, err } @@ -460,9 +460,9 @@ func (c *Config) newServiceIPAllocators() (registries rangeRegistries, primaryCl // sets the default IPFamily that may not be coherent with the // existing default ServiceCIDR secondaryClusterIPAllocator, err = ipallocator.NewMetaAllocator( - networkingv1alphaClient, - c.Informers.Networking().V1alpha1().ServiceCIDRs(), - c.Informers.Networking().V1alpha1().IPAddresses(), + networkingv1beta1Client, + c.Informers.Networking().V1beta1().ServiceCIDRs(), + c.Informers.Networking().V1beta1().IPAddresses(), netutils.IsIPv6CIDR(&c.Services.SecondaryClusterIPRange), bitmapAllocator, ) diff --git a/pkg/registry/core/service/ipallocator/cidrallocator.go b/pkg/registry/core/service/ipallocator/cidrallocator.go index 41be1b9a969..1bc377dac86 100644 --- a/pkg/registry/core/service/ipallocator/cidrallocator.go +++ b/pkg/registry/core/service/ipallocator/cidrallocator.go @@ -24,16 +24,16 @@ import ( "time" v1 "k8s.io/api/core/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" - networkingv1alpha1informers "k8s.io/client-go/informers/networking/v1alpha1" - networkingv1alpha1client "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - networkingv1alpha1listers "k8s.io/client-go/listers/networking/v1alpha1" + networkingv1beta1informers "k8s.io/client-go/informers/networking/v1beta1" + networkingv1beta1client "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + networkingv1beta1listers "k8s.io/client-go/listers/networking/v1beta1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" @@ -52,12 +52,12 @@ import ( // MetaAllocator implements current allocator interface using // ServiceCIDR and IPAddress API objects. type MetaAllocator struct { - client networkingv1alpha1client.NetworkingV1alpha1Interface - serviceCIDRLister networkingv1alpha1listers.ServiceCIDRLister + client networkingv1beta1client.NetworkingV1beta1Interface + serviceCIDRLister networkingv1beta1listers.ServiceCIDRLister serviceCIDRSynced cache.InformerSynced - ipAddressLister networkingv1alpha1listers.IPAddressLister + ipAddressLister networkingv1beta1listers.IPAddressLister ipAddressSynced cache.InformerSynced - ipAddressInformer networkingv1alpha1informers.IPAddressInformer + ipAddressInformer networkingv1beta1informers.IPAddressInformer queue workqueue.TypedRateLimitingInterface[string] internalStopCh chan struct{} @@ -87,9 +87,9 @@ var _ Interface = &MetaAllocator{} // and ServiceCIDR objects to track the assigned IP addresses, // using an informer cache as storage. func NewMetaAllocator( - client networkingv1alpha1client.NetworkingV1alpha1Interface, - serviceCIDRInformer networkingv1alpha1informers.ServiceCIDRInformer, - ipAddressInformer networkingv1alpha1informers.IPAddressInformer, + client networkingv1beta1client.NetworkingV1beta1Interface, + serviceCIDRInformer networkingv1beta1informers.ServiceCIDRInformer, + ipAddressInformer networkingv1beta1informers.IPAddressInformer, isIPv6 bool, bitmapAllocator Interface, ) (*MetaAllocator, error) { @@ -100,9 +100,9 @@ func NewMetaAllocator( } // newMetaAllocator is used to build the allocator for testing -func newMetaAllocator(client networkingv1alpha1client.NetworkingV1alpha1Interface, - serviceCIDRInformer networkingv1alpha1informers.ServiceCIDRInformer, - ipAddressInformer networkingv1alpha1informers.IPAddressInformer, +func newMetaAllocator(client networkingv1beta1client.NetworkingV1beta1Interface, + serviceCIDRInformer networkingv1beta1informers.ServiceCIDRInformer, + ipAddressInformer networkingv1beta1informers.IPAddressInformer, isIPv6 bool, bitmapAllocator Interface, ) *MetaAllocator { @@ -152,13 +152,13 @@ func (c *MetaAllocator) enqueueServiceCIDR(obj interface{}) { } func (c *MetaAllocator) deleteServiceCIDR(obj interface{}) { - serviceCIDR, ok := obj.(*networkingv1alpha1.ServiceCIDR) + serviceCIDR, ok := obj.(*networkingv1beta1.ServiceCIDR) if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { return } - serviceCIDR, ok = tombstone.Obj.(*networkingv1alpha1.ServiceCIDR) + serviceCIDR, ok = tombstone.Obj.(*networkingv1beta1.ServiceCIDR) if !ok { return } @@ -414,8 +414,8 @@ func (c *MetaAllocator) Release(ip net.IP) error { } func (c *MetaAllocator) ForEach(f func(ip net.IP)) { ipLabelSelector := labels.Set(map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(c.IPFamily()), - networkingv1alpha1.LabelManagedBy: ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(c.IPFamily()), + networkingv1beta1.LabelManagedBy: ControllerName, }).AsSelectorPreValidated() ips, err := c.ipAddressLister.List(ipLabelSelector) if err != nil { @@ -454,8 +454,8 @@ func (c *MetaAllocator) Destroy() { // for testing func (c *MetaAllocator) Used() int { ipLabelSelector := labels.Set(map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(c.IPFamily()), - networkingv1alpha1.LabelManagedBy: ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(c.IPFamily()), + networkingv1beta1.LabelManagedBy: ControllerName, }).AsSelectorPreValidated() ips, err := c.ipAddressLister.List(ipLabelSelector) if err != nil { @@ -512,13 +512,13 @@ func (c *MetaAllocator) DryRun() Interface { return &Allocator{} } -func isReady(serviceCIDR *networkingv1alpha1.ServiceCIDR) bool { +func isReady(serviceCIDR *networkingv1beta1.ServiceCIDR) bool { if serviceCIDR == nil { return false } for _, condition := range serviceCIDR.Status.Conditions { - if condition.Type == networkingv1alpha1.ServiceCIDRConditionReady { + if condition.Type == networkingv1beta1.ServiceCIDRConditionReady { return condition.Status == metav1.ConditionStatus(metav1.ConditionTrue) } } diff --git a/pkg/registry/core/service/ipallocator/cidrallocator_test.go b/pkg/registry/core/service/ipallocator/cidrallocator_test.go index c37c6cb5c98..bfcfdd00424 100644 --- a/pkg/registry/core/service/ipallocator/cidrallocator_test.go +++ b/pkg/registry/core/service/ipallocator/cidrallocator_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" @@ -41,13 +41,13 @@ func newTestMetaAllocator() (*MetaAllocator, error) { client := fake.NewSimpleClientset() informerFactory := informers.NewSharedInformerFactory(client, 0*time.Second) - serviceCIDRInformer := informerFactory.Networking().V1alpha1().ServiceCIDRs() + serviceCIDRInformer := informerFactory.Networking().V1beta1().ServiceCIDRs() serviceCIDRStore := serviceCIDRInformer.Informer().GetIndexer() - ipInformer := informerFactory.Networking().V1alpha1().IPAddresses() + ipInformer := informerFactory.Networking().V1beta1().IPAddresses() ipStore := ipInformer.Informer().GetIndexer() client.PrependReactor("create", "servicecidrs", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { - cidr := action.(k8stesting.CreateAction).GetObject().(*networkingv1alpha1.ServiceCIDR) + cidr := action.(k8stesting.CreateAction).GetObject().(*networkingv1beta1.ServiceCIDR) _, exists, err := serviceCIDRStore.GetByKey(cidr.Name) if exists && err != nil { return false, nil, fmt.Errorf("cidr already exist") @@ -59,16 +59,16 @@ func newTestMetaAllocator() (*MetaAllocator, error) { client.PrependReactor("delete", "servicecidrs", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { name := action.(k8stesting.DeleteAction).GetName() obj, exists, err := serviceCIDRStore.GetByKey(name) - cidr := &networkingv1alpha1.ServiceCIDR{} + cidr := &networkingv1beta1.ServiceCIDR{} if exists && err == nil { - cidr = obj.(*networkingv1alpha1.ServiceCIDR) + cidr = obj.(*networkingv1beta1.ServiceCIDR) err = serviceCIDRStore.Delete(cidr) } return false, cidr, err })) client.PrependReactor("create", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { - ip := action.(k8stesting.CreateAction).GetObject().(*networkingv1alpha1.IPAddress) + ip := action.(k8stesting.CreateAction).GetObject().(*networkingv1beta1.IPAddress) _, exists, err := ipStore.GetByKey(ip.Name) if exists && err != nil { return false, nil, fmt.Errorf("ip already exist") @@ -80,15 +80,15 @@ func newTestMetaAllocator() (*MetaAllocator, error) { client.PrependReactor("delete", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { name := action.(k8stesting.DeleteAction).GetName() obj, exists, err := ipStore.GetByKey(name) - ip := &networkingv1alpha1.IPAddress{} + ip := &networkingv1beta1.IPAddress{} if exists && err == nil { - ip = obj.(*networkingv1alpha1.IPAddress) + ip = obj.(*networkingv1beta1.IPAddress) err = ipStore.Delete(ip) } return false, ip, err })) - c := newMetaAllocator(client.NetworkingV1alpha1(), serviceCIDRInformer, ipInformer, false, nil) + c := newMetaAllocator(client.NetworkingV1beta1(), serviceCIDRInformer, ipInformer, false, nil) c.serviceCIDRSynced = func() bool { return true } c.ipAddressSynced = func() bool { return true } @@ -602,18 +602,18 @@ func TestCIDRAllocateDualWriteCollision(t *testing.T) { } // TODO: add IPv6 and dual stack test cases -func newServiceCIDR(name, cidr string) *networkingv1alpha1.ServiceCIDR { - return &networkingv1alpha1.ServiceCIDR{ +func newServiceCIDR(name, cidr string) *networkingv1beta1.ServiceCIDR { + return &networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: networkingv1alpha1.ServiceCIDRSpec{ + Spec: networkingv1beta1.ServiceCIDRSpec{ CIDRs: []string{cidr}, }, - Status: networkingv1alpha1.ServiceCIDRStatus{ + Status: networkingv1beta1.ServiceCIDRStatus{ Conditions: []metav1.Condition{ { - Type: string(networkingv1alpha1.ServiceCIDRConditionReady), + Type: string(networkingv1beta1.ServiceCIDRConditionReady), Status: metav1.ConditionTrue, }, }, diff --git a/pkg/registry/core/service/ipallocator/controller/repairip.go b/pkg/registry/core/service/ipallocator/controller/repairip.go index 1e420ea8a8d..112f908dce9 100644 --- a/pkg/registry/core/service/ipallocator/controller/repairip.go +++ b/pkg/registry/core/service/ipallocator/controller/repairip.go @@ -23,17 +23,17 @@ import ( "time" v1 "k8s.io/api/core/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" coreinformers "k8s.io/client-go/informers/core/v1" - networkinginformers "k8s.io/client-go/informers/networking/v1alpha1" + networkinginformers "k8s.io/client-go/informers/networking/v1beta1" "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" - networkinglisters "k8s.io/client-go/listers/networking/v1alpha1" + networkinglisters "k8s.io/client-go/listers/networking/v1beta1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/events" "k8s.io/client-go/util/retry" @@ -263,7 +263,7 @@ func (r *RepairIPAddress) doRunOnce() error { // Check that there is no IP created by the allocator without // a Service associated. ipLabelSelector := labels.Set(map[string]string{ - networkingv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingv1beta1.LabelManagedBy: ipallocator.ControllerName, }).AsSelectorPreValidated() ipAddresses, err := r.ipAddressLister.List(ipLabelSelector) if err != nil { @@ -360,7 +360,7 @@ func (r *RepairIPAddress) syncService(key string) error { // ClusterIP doesn't seem to be allocated, create it. r.recorder.Eventf(svc, nil, v1.EventTypeWarning, "ClusterIPNotAllocated", "ClusterIPAllocation", "Cluster IP [%v]: %s is not allocated; repairing", family, ip) runtime.HandleError(fmt.Errorf("the ClusterIP [%v]: %s for Service %s/%s is not allocated; repairing", family, ip, svc.Namespace, svc.Name)) - _, err := r.client.NetworkingV1alpha1().IPAddresses().Create(context.Background(), newIPAddress(ip.String(), svc), metav1.CreateOptions{}) + _, err := r.client.NetworkingV1beta1().IPAddresses().Create(context.Background(), newIPAddress(ip.String(), svc), metav1.CreateOptions{}) if err != nil { return err } @@ -417,11 +417,11 @@ func (r *RepairIPAddress) syncService(key string) error { } func (r *RepairIPAddress) recreateIPAddress(name string, svc *v1.Service) error { - err := r.client.NetworkingV1alpha1().IPAddresses().Delete(context.Background(), name, metav1.DeleteOptions{}) + err := r.client.NetworkingV1beta1().IPAddresses().Delete(context.Background(), name, metav1.DeleteOptions{}) if err != nil && !apierrors.IsNotFound(err) { return err } - _, err = r.client.NetworkingV1alpha1().IPAddresses().Create(context.Background(), newIPAddress(name, svc), metav1.CreateOptions{}) + _, err = r.client.NetworkingV1beta1().IPAddresses().Create(context.Background(), newIPAddress(name, svc), metav1.CreateOptions{}) if err != nil { return err } @@ -482,7 +482,7 @@ func (r *RepairIPAddress) syncIPAddress(key string) error { if ipAddress.Spec.ParentRef.Group != "" || ipAddress.Spec.ParentRef.Resource != "services" { runtime.HandleError(fmt.Errorf("IPAddress %s appears to have been modified, not referencing a Service %v: cleaning up", ipAddress.Name, ipAddress.Spec.ParentRef)) r.recorder.Eventf(ipAddress, nil, v1.EventTypeWarning, "IPAddressNotAllocated", "IPAddressAllocation", "IPAddress %s appears to have been modified, not referencing a Service %v: cleaning up", ipAddress.Name, ipAddress.Spec.ParentRef) - err := r.client.NetworkingV1alpha1().IPAddresses().Delete(context.Background(), ipAddress.Name, metav1.DeleteOptions{}) + err := r.client.NetworkingV1beta1().IPAddresses().Delete(context.Background(), ipAddress.Name, metav1.DeleteOptions{}) if err != nil && !apierrors.IsNotFound(err) { return err } @@ -499,7 +499,7 @@ func (r *RepairIPAddress) syncIPAddress(key string) error { if ipLifetime > gracePeriod { runtime.HandleError(fmt.Errorf("IPAddress %s appears to have leaked: cleaning up", ipAddress.Name)) r.recorder.Eventf(ipAddress, nil, v1.EventTypeWarning, "IPAddressNotAllocated", "IPAddressAllocation", "IPAddress: %s for Service %s/%s appears to have leaked: cleaning up", ipAddress.Name, ipAddress.Spec.ParentRef.Namespace, ipAddress.Spec.ParentRef.Name) - err := r.client.NetworkingV1alpha1().IPAddresses().Delete(context.Background(), ipAddress.Name, metav1.DeleteOptions{}) + err := r.client.NetworkingV1beta1().IPAddresses().Delete(context.Background(), ipAddress.Name, metav1.DeleteOptions{}) if err != nil && !apierrors.IsNotFound(err) { return err } @@ -522,7 +522,7 @@ func (r *RepairIPAddress) syncIPAddress(key string) error { } runtime.HandleError(fmt.Errorf("the IPAddress: %s for Service %s/%s has a wrong reference %#v; cleaning up", ipAddress.Name, svc.Name, svc.Namespace, ipAddress.Spec.ParentRef)) r.recorder.Eventf(ipAddress, nil, v1.EventTypeWarning, "IPAddressWrongReference", "IPAddressAllocation", "IPAddress: %s for Service %s/%s has a wrong reference; cleaning up", ipAddress.Name, svc.Namespace, svc.Name) - err = r.client.NetworkingV1alpha1().IPAddresses().Delete(context.Background(), ipAddress.Name, metav1.DeleteOptions{}) + err = r.client.NetworkingV1beta1().IPAddresses().Delete(context.Background(), ipAddress.Name, metav1.DeleteOptions{}) if err != nil && !apierrors.IsNotFound(err) { return err } @@ -535,31 +535,31 @@ func (r *RepairIPAddress) isIPOutOfRange(ip net.IP) bool { return len(servicecidr.ContainsIP(r.serviceCIDRLister, ip)) == 0 } -func newIPAddress(name string, svc *v1.Service) *networkingv1alpha1.IPAddress { +func newIPAddress(name string, svc *v1.Service) *networkingv1beta1.IPAddress { family := string(v1.IPv4Protocol) if netutils.IsIPv6String(name) { family = string(v1.IPv6Protocol) } - return &networkingv1alpha1.IPAddress{ + return &networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: family, - networkingv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingv1beta1.LabelIPAddressFamily: family, + networkingv1beta1.LabelManagedBy: ipallocator.ControllerName, }, }, - Spec: networkingv1alpha1.IPAddressSpec{ + Spec: networkingv1beta1.IPAddressSpec{ ParentRef: serviceToRef(svc), }, } } -func serviceToRef(svc *v1.Service) *networkingv1alpha1.ParentReference { +func serviceToRef(svc *v1.Service) *networkingv1beta1.ParentReference { if svc == nil { return nil } - return &networkingv1alpha1.ParentReference{ + return &networkingv1beta1.ParentReference{ Group: "", Resource: "services", Namespace: svc.Namespace, @@ -576,16 +576,16 @@ func getFamilyByIP(ip net.IP) v1.IPFamily { // managedByController returns true if the controller of the provided // EndpointSlices is the EndpointSlice controller. -func managedByController(ip *networkingv1alpha1.IPAddress) bool { - managedBy, ok := ip.Labels[networkingv1alpha1.LabelManagedBy] +func managedByController(ip *networkingv1beta1.IPAddress) bool { + managedBy, ok := ip.Labels[networkingv1beta1.LabelManagedBy] if !ok { return false } return managedBy == ipallocator.ControllerName } -func verifyIPAddressLabels(ip *networkingv1alpha1.IPAddress) bool { - labelFamily, ok := ip.Labels[networkingv1alpha1.LabelIPAddressFamily] +func verifyIPAddressLabels(ip *networkingv1beta1.IPAddress) bool { + labelFamily, ok := ip.Labels[networkingv1beta1.LabelIPAddressFamily] if !ok { return false } diff --git a/pkg/registry/core/service/ipallocator/controller/repairip_test.go b/pkg/registry/core/service/ipallocator/controller/repairip_test.go index 37dc56b1703..f2c0e10ec39 100644 --- a/pkg/registry/core/service/ipallocator/controller/repairip_test.go +++ b/pkg/registry/core/service/ipallocator/controller/repairip_test.go @@ -23,7 +23,7 @@ import ( "github.com/google/go-cmp/cmp" v1 "k8s.io/api/core/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -54,25 +54,25 @@ func newFakeRepair() (*fake.Clientset, *fakeRepair) { serviceInformer := informerFactory.Core().V1().Services() serviceIndexer := serviceInformer.Informer().GetIndexer() - serviceCIDRInformer := informerFactory.Networking().V1alpha1().ServiceCIDRs() + serviceCIDRInformer := informerFactory.Networking().V1beta1().ServiceCIDRs() serviceCIDRIndexer := serviceCIDRInformer.Informer().GetIndexer() - ipInformer := informerFactory.Networking().V1alpha1().IPAddresses() + ipInformer := informerFactory.Networking().V1beta1().IPAddresses() ipIndexer := ipInformer.Informer().GetIndexer() fakeClient.PrependReactor("create", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { - ip := action.(k8stesting.CreateAction).GetObject().(*networkingv1alpha1.IPAddress) + ip := action.(k8stesting.CreateAction).GetObject().(*networkingv1beta1.IPAddress) err := ipIndexer.Add(ip) return false, ip, err })) fakeClient.PrependReactor("update", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { - ip := action.(k8stesting.UpdateAction).GetObject().(*networkingv1alpha1.IPAddress) + ip := action.(k8stesting.UpdateAction).GetObject().(*networkingv1beta1.IPAddress) return false, ip, fmt.Errorf("IPAddress is inmutable after creation") })) fakeClient.PrependReactor("delete", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { ip := action.(k8stesting.DeleteAction).GetName() err := ipIndexer.Delete(ip) - return false, &networkingv1alpha1.IPAddress{}, err + return false, &networkingv1beta1.IPAddress{}, err })) r := NewRepairIPAddress(0*time.Second, @@ -88,8 +88,8 @@ func TestRepairServiceIP(t *testing.T) { tests := []struct { name string svcs []*v1.Service - ipAddresses []*networkingv1alpha1.IPAddress - cidrs []*networkingv1alpha1.ServiceCIDR + ipAddresses []*networkingv1beta1.IPAddress + cidrs []*networkingv1beta1.ServiceCIDR expectedIPs []string actions [][]string // verb and resource events []string @@ -97,10 +97,10 @@ func TestRepairServiceIP(t *testing.T) { { name: "no changes needed single stack", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc", []string{"10.0.1.1"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.1.1"}, @@ -110,11 +110,11 @@ func TestRepairServiceIP(t *testing.T) { { name: "no changes needed dual stack", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1", "2001:db8::10"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc", []string{"10.0.1.1"})), newIPAddress("2001:db8::10", newService("test-svc", []string{"2001:db8::10"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.1.1", "2001:db8::10"}, @@ -124,11 +124,11 @@ func TestRepairServiceIP(t *testing.T) { { name: "no changes needed dual stack multiple cidrs", svcs: []*v1.Service{newService("test-svc", []string{"192.168.0.1", "2001:db8:a:b::10"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("192.168.0.1", newService("test-svc", []string{"192.168.0.1"})), newIPAddress("2001:db8:a:b::10", newService("test-svc", []string{"2001:db8:a:b::10"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), newServiceCIDR("custom", "192.168.0.0/24", "2001:db8:a:b::/64"), }, @@ -140,7 +140,7 @@ func TestRepairServiceIP(t *testing.T) { { name: "create IPAddress single stack", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1"})}, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.1.1"}, @@ -150,7 +150,7 @@ func TestRepairServiceIP(t *testing.T) { { name: "create IPAddresses dual stack", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1", "2001:db8::10"})}, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.1.1", "2001:db8::10"}, @@ -163,7 +163,7 @@ func TestRepairServiceIP(t *testing.T) { { name: "create IPAddress single stack from secondary", svcs: []*v1.Service{newService("test-svc", []string{"192.168.1.1"})}, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), newServiceCIDR("custom", "192.168.1.0/24", ""), }, @@ -174,10 +174,10 @@ func TestRepairServiceIP(t *testing.T) { { name: "reconcile IPAddress single stack wrong reference", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc2", []string{"10.0.1.1"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.1.1"}, @@ -187,11 +187,11 @@ func TestRepairServiceIP(t *testing.T) { { name: "reconcile IPAddresses dual stack", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1", "2001:db8::10"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc2", []string{"10.0.1.1"})), newIPAddress("2001:db8::10", newService("test-svc2", []string{"2001:db8::10"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.1.1", "2001:db8::10"}, @@ -204,11 +204,11 @@ func TestRepairServiceIP(t *testing.T) { { name: "one IP out of range", svcs: []*v1.Service{newService("test-svc", []string{"192.168.1.1", "2001:db8::10"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("192.168.1.1", newService("test-svc", []string{"192.168.1.1"})), newIPAddress("2001:db8::10", newService("test-svc", []string{"2001:db8::10"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"2001:db8::10"}, @@ -217,10 +217,10 @@ func TestRepairServiceIP(t *testing.T) { }, { name: "one IP orphan", - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc", []string{"10.0.1.1"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, actions: [][]string{{"delete", "ipaddresses"}}, @@ -229,10 +229,10 @@ func TestRepairServiceIP(t *testing.T) { { name: "one IP out of range matching the network address", svcs: []*v1.Service{newService("test-svc", []string{"10.0.0.0"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.0.0", newService("test-svc", []string{"10.0.0.0"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.0.0"}, @@ -242,10 +242,10 @@ func TestRepairServiceIP(t *testing.T) { { name: "one IP out of range matching the broadcast address", svcs: []*v1.Service{newService("test-svc", []string{"10.0.255.255"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.255.255", newService("test-svc", []string{"10.0.255.255"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"10.0.255.255"}, @@ -255,10 +255,10 @@ func TestRepairServiceIP(t *testing.T) { { name: "one IPv6 out of range matching the subnet address", svcs: []*v1.Service{newService("test-svc", []string{"2001:db8::"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("2001:db8::", newService("test-svc", []string{"2001:db8::"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"2001:db8::"}, @@ -268,20 +268,20 @@ func TestRepairServiceIP(t *testing.T) { { name: "one IPv6 matching the broadcast address", svcs: []*v1.Service{newService("test-svc", []string{"2001:db8::ffff:ffff:ffff:ffff"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("2001:db8::ffff:ffff:ffff:ffff", newService("test-svc", []string{"2001:db8::ffff:ffff:ffff:ffff"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, expectedIPs: []string{"2001:db8::ffff:ffff:ffff:ffff"}, }, { name: "one IP orphan matching the broadcast address", - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.255.255", newService("test-svc", []string{"10.0.255.255"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, actions: [][]string{{"delete", "ipaddresses"}}, @@ -290,11 +290,11 @@ func TestRepairServiceIP(t *testing.T) { { name: "Two IPAddresses referencing the same service", svcs: []*v1.Service{newService("test-svc", []string{"10.0.1.1"})}, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc", []string{"10.0.1.1"})), newIPAddress("10.0.1.2", newService("test-svc", []string{"10.0.1.1"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, actions: [][]string{{"delete", "ipaddresses"}}, @@ -306,10 +306,10 @@ func TestRepairServiceIP(t *testing.T) { newService("test-svc", []string{"10.0.1.1"}), newService("test-svc2", []string{"10.0.1.1"}), }, - ipAddresses: []*networkingv1alpha1.IPAddress{ + ipAddresses: []*networkingv1beta1.IPAddress{ newIPAddress("10.0.1.1", newService("test-svc2", []string{"10.0.1.1"})), }, - cidrs: []*networkingv1alpha1.ServiceCIDR{ + cidrs: []*networkingv1beta1.ServiceCIDR{ newServiceCIDR("kubernetes", serviceCIDRv4, serviceCIDRv6), }, events: []string{"Warning ClusterIPAlreadyAllocated Cluster IP [IPv4]:10.0.1.1 was assigned to multiple services; please recreate service"}, @@ -370,23 +370,23 @@ func TestRepairServiceIP(t *testing.T) { func TestRepairIPAddress_syncIPAddress(t *testing.T) { tests := []struct { name string - ip *networkingv1alpha1.IPAddress + ip *networkingv1beta1.IPAddress actions [][]string // verb and resource wantErr bool }{ { name: "correct ipv4 address", - ip: &networkingv1alpha1.IPAddress{ + ip: &networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: "10.0.1.1", Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(v1.IPv4Protocol), - networkingv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(v1.IPv4Protocol), + networkingv1beta1.LabelManagedBy: ipallocator.ControllerName, }, CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, - Spec: networkingv1alpha1.IPAddressSpec{ - ParentRef: &networkingv1alpha1.ParentReference{ + Spec: networkingv1beta1.IPAddressSpec{ + ParentRef: &networkingv1beta1.ParentReference{ Group: "", Resource: "services", Name: "foo", @@ -397,17 +397,17 @@ func TestRepairIPAddress_syncIPAddress(t *testing.T) { }, { name: "correct ipv6 address", - ip: &networkingv1alpha1.IPAddress{ + ip: &networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: "2001:db8::11", Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(v1.IPv6Protocol), - networkingv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(v1.IPv6Protocol), + networkingv1beta1.LabelManagedBy: ipallocator.ControllerName, }, CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, - Spec: networkingv1alpha1.IPAddressSpec{ - ParentRef: &networkingv1alpha1.ParentReference{ + Spec: networkingv1beta1.IPAddressSpec{ + ParentRef: &networkingv1beta1.ParentReference{ Group: "", Resource: "services", Name: "foo", @@ -418,17 +418,17 @@ func TestRepairIPAddress_syncIPAddress(t *testing.T) { }, { name: "not managed by this controller", - ip: &networkingv1alpha1.IPAddress{ + ip: &networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: "2001:db8::11", Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(v1.IPv6Protocol), - networkingv1alpha1.LabelManagedBy: "controller-foo", + networkingv1beta1.LabelIPAddressFamily: string(v1.IPv6Protocol), + networkingv1beta1.LabelManagedBy: "controller-foo", }, CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, - Spec: networkingv1alpha1.IPAddressSpec{ - ParentRef: &networkingv1alpha1.ParentReference{ + Spec: networkingv1beta1.IPAddressSpec{ + ParentRef: &networkingv1beta1.ParentReference{ Group: "networking.gateway.k8s.io", Resource: "gateway", Name: "foo", @@ -439,17 +439,17 @@ func TestRepairIPAddress_syncIPAddress(t *testing.T) { }, { name: "out of range", - ip: &networkingv1alpha1.IPAddress{ + ip: &networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: "fd00:db8::11", Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(v1.IPv6Protocol), - networkingv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(v1.IPv6Protocol), + networkingv1beta1.LabelManagedBy: ipallocator.ControllerName, }, CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, - Spec: networkingv1alpha1.IPAddressSpec{ - ParentRef: &networkingv1alpha1.ParentReference{ + Spec: networkingv1beta1.IPAddressSpec{ + ParentRef: &networkingv1beta1.ParentReference{ Group: "", Resource: "services", Name: "foo", @@ -460,17 +460,17 @@ func TestRepairIPAddress_syncIPAddress(t *testing.T) { }, { name: "leaked ip", - ip: &networkingv1alpha1.IPAddress{ + ip: &networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: "10.0.1.1", Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(v1.IPv6Protocol), - networkingv1alpha1.LabelManagedBy: ipallocator.ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(v1.IPv6Protocol), + networkingv1beta1.LabelManagedBy: ipallocator.ControllerName, }, CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, - Spec: networkingv1alpha1.IPAddressSpec{ - ParentRef: &networkingv1alpha1.ParentReference{ + Spec: networkingv1beta1.IPAddressSpec{ + ParentRef: &networkingv1beta1.ParentReference{ Group: "", Resource: "services", Name: "noexist", @@ -522,12 +522,12 @@ func newService(name string, ips []string) *v1.Service { return svc } -func newServiceCIDR(name, primary, secondary string) *networkingv1alpha1.ServiceCIDR { - serviceCIDR := &networkingv1alpha1.ServiceCIDR{ +func newServiceCIDR(name, primary, secondary string) *networkingv1beta1.ServiceCIDR { + serviceCIDR := &networkingv1beta1.ServiceCIDR{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: networkingv1alpha1.ServiceCIDRSpec{}, + Spec: networkingv1beta1.ServiceCIDRSpec{}, } serviceCIDR.Spec.CIDRs = append(serviceCIDR.Spec.CIDRs, primary) if secondary != "" { diff --git a/pkg/registry/core/service/ipallocator/ipallocator.go b/pkg/registry/core/service/ipallocator/ipallocator.go index 53b0109e5f7..9d52af45ac2 100644 --- a/pkg/registry/core/service/ipallocator/ipallocator.go +++ b/pkg/registry/core/service/ipallocator/ipallocator.go @@ -27,13 +27,13 @@ import ( "sync/atomic" "time" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - networkingv1alpha1informers "k8s.io/client-go/informers/networking/v1alpha1" - networkingv1alpha1client "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - networkingv1alpha1listers "k8s.io/client-go/listers/networking/v1alpha1" + networkingv1beta1informers "k8s.io/client-go/informers/networking/v1beta1" + networkingv1beta1client "k8s.io/client-go/kubernetes/typed/networking/v1beta1" + networkingv1beta1listers "k8s.io/client-go/listers/networking/v1beta1" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" api "k8s.io/kubernetes/pkg/apis/core" @@ -56,8 +56,8 @@ type Allocator struct { rangeOffset int // subdivides the assigned IP range to prefer dynamic allocation from the upper range size uint64 // cap the total number of IPs available to maxInt64 - client networkingv1alpha1client.NetworkingV1alpha1Interface - ipAddressLister networkingv1alpha1listers.IPAddressLister + client networkingv1beta1client.NetworkingV1beta1Interface + ipAddressLister networkingv1beta1listers.IPAddressLister ipAddressSynced cache.InformerSynced // ready indicates if the allocator is able to allocate new IP addresses. // This is required because it depends on the ServiceCIDR to be ready. @@ -77,8 +77,8 @@ var _ Interface = &Allocator{} // using an informer cache as storage. func NewIPAllocator( cidr *net.IPNet, - client networkingv1alpha1client.NetworkingV1alpha1Interface, - ipAddressInformer networkingv1alpha1informers.IPAddressInformer, + client networkingv1beta1client.NetworkingV1beta1Interface, + ipAddressInformer networkingv1beta1informers.IPAddressInformer, ) (*Allocator, error) { prefix, err := netip.ParsePrefix(cidr.String()) if err != nil { @@ -139,15 +139,15 @@ func NewIPAllocator( } func (a *Allocator) createIPAddress(name string, svc *api.Service, scope string) error { - ipAddress := networkingv1alpha1.IPAddress{ + ipAddress := networkingv1beta1.IPAddress{ ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(a.IPFamily()), - networkingv1alpha1.LabelManagedBy: ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(a.IPFamily()), + networkingv1beta1.LabelManagedBy: ControllerName, }, }, - Spec: networkingv1alpha1.IPAddressSpec{ + Spec: networkingv1beta1.IPAddressSpec{ ParentRef: serviceToRef(svc), }, } @@ -379,8 +379,8 @@ func (a *Allocator) release(ip net.IP, dryRun bool) error { // This is required to satisfy the Allocator Interface only func (a *Allocator) ForEach(f func(net.IP)) { ipLabelSelector := labels.Set(map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(a.IPFamily()), - networkingv1alpha1.LabelManagedBy: ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(a.IPFamily()), + networkingv1beta1.LabelManagedBy: ControllerName, }).AsSelectorPreValidated() ips, err := a.ipAddressLister.List(ipLabelSelector) if err != nil { @@ -413,8 +413,8 @@ func (a *Allocator) IPFamily() api.IPFamily { // for testing, it assumes this is the allocator is unique for the ipFamily func (a *Allocator) Used() int { ipLabelSelector := labels.Set(map[string]string{ - networkingv1alpha1.LabelIPAddressFamily: string(a.IPFamily()), - networkingv1alpha1.LabelManagedBy: ControllerName, + networkingv1beta1.LabelIPAddressFamily: string(a.IPFamily()), + networkingv1beta1.LabelManagedBy: ControllerName, }).AsSelectorPreValidated() ips, err := a.ipAddressLister.List(ipLabelSelector) if err != nil { @@ -568,12 +568,12 @@ func broadcastAddress(subnet netip.Prefix) (netip.Addr, error) { } // serviceToRef obtain the Service Parent Reference -func serviceToRef(svc *api.Service) *networkingv1alpha1.ParentReference { +func serviceToRef(svc *api.Service) *networkingv1beta1.ParentReference { if svc == nil { return nil } - return &networkingv1alpha1.ParentReference{ + return &networkingv1beta1.ParentReference{ Group: "", Resource: "services", Namespace: svc.Namespace, diff --git a/pkg/registry/core/service/ipallocator/ipallocator_test.go b/pkg/registry/core/service/ipallocator/ipallocator_test.go index 6c5c73cde76..e211f3aaebe 100644 --- a/pkg/registry/core/service/ipallocator/ipallocator_test.go +++ b/pkg/registry/core/service/ipallocator/ipallocator_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/informers" @@ -40,11 +40,11 @@ func newTestAllocator(cidr *net.IPNet) (*Allocator, error) { client := fake.NewSimpleClientset() informerFactory := informers.NewSharedInformerFactory(client, 0*time.Second) - ipInformer := informerFactory.Networking().V1alpha1().IPAddresses() + ipInformer := informerFactory.Networking().V1beta1().IPAddresses() ipStore := ipInformer.Informer().GetIndexer() client.PrependReactor("create", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { - ip := action.(k8stesting.CreateAction).GetObject().(*networkingv1alpha1.IPAddress) + ip := action.(k8stesting.CreateAction).GetObject().(*networkingv1beta1.IPAddress) _, exists, err := ipStore.GetByKey(ip.Name) if exists && err != nil { return false, nil, fmt.Errorf("ip already exist") @@ -56,15 +56,15 @@ func newTestAllocator(cidr *net.IPNet) (*Allocator, error) { client.PrependReactor("delete", "ipaddresses", k8stesting.ReactionFunc(func(action k8stesting.Action) (bool, runtime.Object, error) { name := action.(k8stesting.DeleteAction).GetName() obj, exists, err := ipStore.GetByKey(name) - ip := &networkingv1alpha1.IPAddress{} + ip := &networkingv1beta1.IPAddress{} if exists && err == nil { - ip = obj.(*networkingv1alpha1.IPAddress) + ip = obj.(*networkingv1beta1.IPAddress) err = ipStore.Delete(ip) } return false, ip, err })) - c, err := NewIPAllocator(cidr, client.NetworkingV1alpha1(), ipInformer) + c, err := NewIPAllocator(cidr, client.NetworkingV1beta1(), ipInformer) if err != nil { return nil, err } From bc8bce2ef98b85d642c7e805e8c6d1fd92cbcf53 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 21 May 2024 11:58:12 +0000 Subject: [PATCH 10/10] make update --- api/discovery/aggregated_v2.json | 2 +- api/discovery/aggregated_v2beta1.json | 2 +- api/discovery/apis.json | 4 +- api/discovery/apis__networking.k8s.io.json | 4 +- ... => apis__networking.k8s.io__v1beta1.json} | 6 +- api/openapi-spec/swagger.json | 244 +-- ...__networking.k8s.io__v1beta1_openapi.json} | 344 +-- .../v1beta1/zz_generated.conversion.go | 269 +++ pkg/generated/openapi/zz_generated.openapi.go | 339 +++ .../api/networking/v1beta1/generated.pb.go | 1926 ++++++++++++++++- .../api/networking/v1beta1/generated.proto | 109 + .../v1beta1/types_swagger_doc_generated.go | 80 + .../v1beta1/zz_generated.deepcopy.go | 203 ++ .../zz_generated.prerelease-lifecycle.go | 72 + .../networking.k8s.io.v1beta1.IPAddress.json | 54 + .../networking.k8s.io.v1beta1.IPAddress.pb | Bin 0 -> 464 bytes .../networking.k8s.io.v1beta1.IPAddress.yaml | 40 + ...networking.k8s.io.v1beta1.ServiceCIDR.json | 63 + .../networking.k8s.io.v1beta1.ServiceCIDR.pb | Bin 0 -> 489 bytes ...networking.k8s.io.v1beta1.ServiceCIDR.yaml | 45 + .../applyconfigurations/internal/internal.go | 79 + .../networking/v1beta1/ipaddress.go | 253 +++ .../networking/v1beta1/ipaddressspec.go | 39 + .../networking/v1beta1/parentreference.go | 66 + .../networking/v1beta1/servicecidr.go | 262 +++ .../networking/v1beta1/servicecidrspec.go | 41 + .../networking/v1beta1/servicecidrstatus.go | 48 + .../client-go/applyconfigurations/utils.go | 12 + .../src/k8s.io/client-go/informers/generic.go | 4 + .../informers/networking/v1beta1/interface.go | 14 + .../informers/networking/v1beta1/ipaddress.go | 89 + .../networking/v1beta1/servicecidr.go | 89 + .../networking/v1beta1/fake/fake_ipaddress.go | 151 ++ .../v1beta1/fake/fake_networking_client.go | 8 + .../v1beta1/fake/fake_servicecidr.go | 186 ++ .../networking/v1beta1/generated_expansion.go | 4 + .../typed/networking/v1beta1/ipaddress.go | 69 + .../networking/v1beta1/networking_client.go | 10 + .../typed/networking/v1beta1/servicecidr.go | 73 + .../networking/v1beta1/expansion_generated.go | 8 + .../listers/networking/v1beta1/ipaddress.go | 48 + .../listers/networking/v1beta1/servicecidr.go | 48 + 42 files changed, 5010 insertions(+), 397 deletions(-) rename api/discovery/{apis__networking.k8s.io__v1alpha1.json => apis__networking.k8s.io__v1beta1.json} (87%) rename api/openapi-spec/v3/{apis__networking.k8s.io__v1alpha1_openapi.json => apis__networking.k8s.io__v1beta1_openapi.json} (96%) create mode 100644 staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.json create mode 100644 staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.pb create mode 100644 staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.yaml create mode 100644 staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.json create mode 100644 staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.pb create mode 100644 staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.yaml create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddress.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go create mode 100644 staging/src/k8s.io/client-go/informers/networking/v1beta1/ipaddress.go create mode 100644 staging/src/k8s.io/client-go/informers/networking/v1beta1/servicecidr.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ipaddress.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_servicecidr.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ipaddress.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/servicecidr.go create mode 100644 staging/src/k8s.io/client-go/listers/networking/v1beta1/ipaddress.go create mode 100644 staging/src/k8s.io/client-go/listers/networking/v1beta1/servicecidr.go diff --git a/api/discovery/aggregated_v2.json b/api/discovery/aggregated_v2.json index 5dc515b31fa..b710275edd8 100644 --- a/api/discovery/aggregated_v2.json +++ b/api/discovery/aggregated_v2.json @@ -912,7 +912,7 @@ ] } ], - "version": "v1alpha1" + "version": "v1beta1" } ] }, diff --git a/api/discovery/aggregated_v2beta1.json b/api/discovery/aggregated_v2beta1.json index 96efbfd60ed..f4ee9917bc5 100644 --- a/api/discovery/aggregated_v2beta1.json +++ b/api/discovery/aggregated_v2beta1.json @@ -912,7 +912,7 @@ ] } ], - "version": "v1alpha1" + "version": "v1beta1" } ] }, diff --git a/api/discovery/apis.json b/api/discovery/apis.json index 09237dde512..1a4d60b3ad8 100644 --- a/api/discovery/apis.json +++ b/api/discovery/apis.json @@ -133,8 +133,8 @@ "version": "v1" }, { - "groupVersion": "networking.k8s.io/v1alpha1", - "version": "v1alpha1" + "groupVersion": "networking.k8s.io/v1beta1", + "version": "v1beta1" } ] }, diff --git a/api/discovery/apis__networking.k8s.io.json b/api/discovery/apis__networking.k8s.io.json index 8b3c388226b..1a260453f01 100644 --- a/api/discovery/apis__networking.k8s.io.json +++ b/api/discovery/apis__networking.k8s.io.json @@ -12,8 +12,8 @@ "version": "v1" }, { - "groupVersion": "networking.k8s.io/v1alpha1", - "version": "v1alpha1" + "groupVersion": "networking.k8s.io/v1beta1", + "version": "v1beta1" } ] } diff --git a/api/discovery/apis__networking.k8s.io__v1alpha1.json b/api/discovery/apis__networking.k8s.io__v1beta1.json similarity index 87% rename from api/discovery/apis__networking.k8s.io__v1alpha1.json rename to api/discovery/apis__networking.k8s.io__v1beta1.json index 77f19eb4719..f2d870ff85a 100644 --- a/api/discovery/apis__networking.k8s.io__v1alpha1.json +++ b/api/discovery/apis__networking.k8s.io__v1beta1.json @@ -1,6 +1,6 @@ { "apiVersion": "v1", - "groupVersion": "networking.k8s.io/v1alpha1", + "groupVersion": "networking.k8s.io/v1beta1", "kind": "APIResourceList", "resources": [ { @@ -11,7 +11,7 @@ "ip" ], "singularName": "ipaddress", - "storageVersionHash": "3APLM23DOxw=", + "storageVersionHash": "O4H8VxQhW5Y=", "verbs": [ "create", "delete", @@ -28,7 +28,7 @@ "name": "servicecidrs", "namespaced": false, "singularName": "servicecidr", - "storageVersionHash": "3cDF5hqTkLY=", + "storageVersionHash": "8ufAXOnr3Yg=", "verbs": [ "create", "delete", diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index d908bd11a9f..764de687afa 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14064,7 +14064,7 @@ }, "type": "object" }, - "io.k8s.api.networking.v1alpha1.IPAddress": { + "io.k8s.api.networking.v1beta1.IPAddress": { "description": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", "properties": { "apiVersion": { @@ -14080,7 +14080,7 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddressSpec", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddressSpec", "description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, @@ -14089,11 +14089,11 @@ { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.IPAddressList": { + "io.k8s.api.networking.v1beta1.IPAddressList": { "description": "IPAddressList contains a list of IPAddress.", "properties": { "apiVersion": { @@ -14103,7 +14103,7 @@ "items": { "description": "items is the list of IPAddresses.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" }, "type": "array" }, @@ -14124,15 +14124,15 @@ { "group": "networking.k8s.io", "kind": "IPAddressList", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.IPAddressSpec": { + "io.k8s.api.networking.v1beta1.IPAddressSpec": { "description": "IPAddressSpec describe the attributes in an IP Address.", "properties": { "parentRef": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ParentReference", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ParentReference", "description": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object." } }, @@ -14141,7 +14141,7 @@ ], "type": "object" }, - "io.k8s.api.networking.v1alpha1.ParentReference": { + "io.k8s.api.networking.v1beta1.ParentReference": { "description": "ParentReference describes a reference to a parent object.", "properties": { "group": { @@ -14167,7 +14167,7 @@ ], "type": "object" }, - "io.k8s.api.networking.v1alpha1.ServiceCIDR": { + "io.k8s.api.networking.v1beta1.ServiceCIDR": { "description": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", "properties": { "apiVersion": { @@ -14183,11 +14183,11 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDRSpec", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRSpec", "description": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" }, "status": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDRStatus", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRStatus", "description": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, @@ -14196,11 +14196,11 @@ { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.ServiceCIDRList": { + "io.k8s.api.networking.v1beta1.ServiceCIDRList": { "description": "ServiceCIDRList contains a list of ServiceCIDR objects.", "properties": { "apiVersion": { @@ -14210,7 +14210,7 @@ "items": { "description": "items is the list of ServiceCIDRs.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" }, "type": "array" }, @@ -14231,15 +14231,15 @@ { "group": "networking.k8s.io", "kind": "ServiceCIDRList", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.ServiceCIDRSpec": { + "io.k8s.api.networking.v1beta1.ServiceCIDRSpec": { "description": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", "properties": { "cidrs": { - "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. The network address of each CIDR, the address that identifies the subnet of a host, is reserved and will not be allocated. The broadcast address for IPv4 CIDRs is also reserved and will not be allocated. This field is immutable.", + "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", "items": { "type": "string" }, @@ -14249,7 +14249,7 @@ }, "type": "object" }, - "io.k8s.api.networking.v1alpha1.ServiceCIDRStatus": { + "io.k8s.api.networking.v1beta1.ServiceCIDRStatus": { "description": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", "properties": { "conditions": { @@ -64233,7 +64233,7 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/": { + "/apis/networking.k8s.io/v1beta1/": { "get": { "consumes": [ "application/json", @@ -64241,7 +64241,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get available resources", - "operationId": "getNetworkingV1alpha1APIResources", + "operationId": "getNetworkingV1beta1APIResources", "produces": [ "application/json", "application/yaml", @@ -64262,17 +64262,17 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ] } }, - "/apis/networking.k8s.io/v1alpha1/ipaddresses": { + "/apis/networking.k8s.io/v1beta1/ipaddresses": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of IPAddress", - "operationId": "deleteNetworkingV1alpha1CollectionIPAddress", + "operationId": "deleteNetworkingV1beta1CollectionIPAddress", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -64338,13 +64338,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { @@ -64352,7 +64352,7 @@ "*/*" ], "description": "list or watch objects of kind IPAddress", - "operationId": "listNetworkingV1alpha1IPAddress", + "operationId": "listNetworkingV1beta1IPAddress", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -64396,7 +64396,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddressList" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddressList" } }, "401": { @@ -64407,13 +64407,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -64426,14 +64426,14 @@ "*/*" ], "description": "create an IPAddress", - "operationId": "createNetworkingV1alpha1IPAddress", + "operationId": "createNetworkingV1beta1IPAddress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, { @@ -64463,19 +64463,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -64486,23 +64486,23 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}": { + "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete an IPAddress", - "operationId": "deleteNetworkingV1alpha1IPAddress", + "operationId": "deleteNetworkingV1beta1IPAddress", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -64550,13 +64550,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { @@ -64564,7 +64564,7 @@ "*/*" ], "description": "read the specified IPAddress", - "operationId": "readNetworkingV1alpha1IPAddress", + "operationId": "readNetworkingV1beta1IPAddress", "produces": [ "application/json", "application/yaml", @@ -64574,7 +64574,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -64585,13 +64585,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -64615,7 +64615,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified IPAddress", - "operationId": "patchNetworkingV1alpha1IPAddress", + "operationId": "patchNetworkingV1beta1IPAddress", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -64650,13 +64650,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -64667,13 +64667,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "put": { @@ -64681,14 +64681,14 @@ "*/*" ], "description": "replace the specified IPAddress", - "operationId": "replaceNetworkingV1alpha1IPAddress", + "operationId": "replaceNetworkingV1beta1IPAddress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, { @@ -64718,13 +64718,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -64735,23 +64735,23 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/servicecidrs": { + "/apis/networking.k8s.io/v1beta1/servicecidrs": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ServiceCIDR", - "operationId": "deleteNetworkingV1alpha1CollectionServiceCIDR", + "operationId": "deleteNetworkingV1beta1CollectionServiceCIDR", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -64817,13 +64817,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { @@ -64831,7 +64831,7 @@ "*/*" ], "description": "list or watch objects of kind ServiceCIDR", - "operationId": "listNetworkingV1alpha1ServiceCIDR", + "operationId": "listNetworkingV1beta1ServiceCIDR", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -64875,7 +64875,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDRList" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRList" } }, "401": { @@ -64886,13 +64886,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -64905,14 +64905,14 @@ "*/*" ], "description": "create a ServiceCIDR", - "operationId": "createNetworkingV1alpha1ServiceCIDR", + "operationId": "createNetworkingV1beta1ServiceCIDR", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, { @@ -64942,19 +64942,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -64965,23 +64965,23 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}": { + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ServiceCIDR", - "operationId": "deleteNetworkingV1alpha1ServiceCIDR", + "operationId": "deleteNetworkingV1beta1ServiceCIDR", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -65029,13 +65029,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { @@ -65043,7 +65043,7 @@ "*/*" ], "description": "read the specified ServiceCIDR", - "operationId": "readNetworkingV1alpha1ServiceCIDR", + "operationId": "readNetworkingV1beta1ServiceCIDR", "produces": [ "application/json", "application/yaml", @@ -65053,7 +65053,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -65064,13 +65064,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -65094,7 +65094,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ServiceCIDR", - "operationId": "patchNetworkingV1alpha1ServiceCIDR", + "operationId": "patchNetworkingV1beta1ServiceCIDR", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -65129,13 +65129,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -65146,13 +65146,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "put": { @@ -65160,14 +65160,14 @@ "*/*" ], "description": "replace the specified ServiceCIDR", - "operationId": "replaceNetworkingV1alpha1ServiceCIDR", + "operationId": "replaceNetworkingV1beta1ServiceCIDR", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, { @@ -65197,13 +65197,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -65214,23 +65214,23 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status": { + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status": { "get": { "consumes": [ "*/*" ], "description": "read status of the specified ServiceCIDR", - "operationId": "readNetworkingV1alpha1ServiceCIDRStatus", + "operationId": "readNetworkingV1beta1ServiceCIDRStatus", "produces": [ "application/json", "application/yaml", @@ -65240,7 +65240,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -65251,13 +65251,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -65281,7 +65281,7 @@ "application/apply-patch+yaml" ], "description": "partially update status of the specified ServiceCIDR", - "operationId": "patchNetworkingV1alpha1ServiceCIDRStatus", + "operationId": "patchNetworkingV1beta1ServiceCIDRStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -65316,13 +65316,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -65333,13 +65333,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "put": { @@ -65347,14 +65347,14 @@ "*/*" ], "description": "replace status of the specified ServiceCIDR", - "operationId": "replaceNetworkingV1alpha1ServiceCIDRStatus", + "operationId": "replaceNetworkingV1beta1ServiceCIDRStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, { @@ -65384,13 +65384,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -65401,23 +65401,23 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/watch/ipaddresses": { + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of IPAddress. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1alpha1IPAddressList", + "operationId": "watchNetworkingV1beta1IPAddressList", "produces": [ "application/json", "application/yaml", @@ -65440,13 +65440,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -65485,13 +65485,13 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/watch/ipaddresses/{name}": { + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind IPAddress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1alpha1IPAddress", + "operationId": "watchNetworkingV1beta1IPAddress", "produces": [ "application/json", "application/yaml", @@ -65514,13 +65514,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -65567,13 +65567,13 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/watch/servicecidrs": { + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1alpha1ServiceCIDRList", + "operationId": "watchNetworkingV1beta1ServiceCIDRList", "produces": [ "application/json", "application/yaml", @@ -65596,13 +65596,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -65641,13 +65641,13 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/watch/servicecidrs/{name}": { + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1alpha1ServiceCIDR", + "operationId": "watchNetworkingV1beta1ServiceCIDR", "produces": [ "application/json", "application/yaml", @@ -65670,13 +65670,13 @@ "https" ], "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json similarity index 96% rename from api/openapi-spec/v3/apis__networking.k8s.io__v1alpha1_openapi.json rename to api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json index fa672c48428..5e385fde4f7 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json @@ -1,7 +1,7 @@ { "components": { "schemas": { - "io.k8s.api.networking.v1alpha1.IPAddress": { + "io.k8s.api.networking.v1beta1.IPAddress": { "description": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", "properties": { "apiVersion": { @@ -24,7 +24,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddressSpec" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddressSpec" } ], "default": {}, @@ -36,11 +36,11 @@ { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.IPAddressList": { + "io.k8s.api.networking.v1beta1.IPAddressList": { "description": "IPAddressList contains a list of IPAddress.", "properties": { "apiVersion": { @@ -52,7 +52,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } ], "default": {} @@ -81,17 +81,17 @@ { "group": "networking.k8s.io", "kind": "IPAddressList", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.IPAddressSpec": { + "io.k8s.api.networking.v1beta1.IPAddressSpec": { "description": "IPAddressSpec describe the attributes in an IP Address.", "properties": { "parentRef": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ParentReference" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ParentReference" } ], "description": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object." @@ -102,7 +102,7 @@ ], "type": "object" }, - "io.k8s.api.networking.v1alpha1.ParentReference": { + "io.k8s.api.networking.v1beta1.ParentReference": { "description": "ParentReference describes a reference to a parent object.", "properties": { "group": { @@ -128,7 +128,7 @@ ], "type": "object" }, - "io.k8s.api.networking.v1alpha1.ServiceCIDR": { + "io.k8s.api.networking.v1beta1.ServiceCIDR": { "description": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", "properties": { "apiVersion": { @@ -151,7 +151,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRSpec" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRSpec" } ], "default": {}, @@ -160,7 +160,7 @@ "status": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRStatus" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRStatus" } ], "default": {}, @@ -172,11 +172,11 @@ { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.ServiceCIDRList": { + "io.k8s.api.networking.v1beta1.ServiceCIDRList": { "description": "ServiceCIDRList contains a list of ServiceCIDR objects.", "properties": { "apiVersion": { @@ -188,7 +188,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } ], "default": {} @@ -217,15 +217,15 @@ { "group": "networking.k8s.io", "kind": "ServiceCIDRList", - "version": "v1alpha1" + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1alpha1.ServiceCIDRSpec": { + "io.k8s.api.networking.v1beta1.ServiceCIDRSpec": { "description": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", "properties": { "cidrs": { - "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. The network address of each CIDR, the address that identifies the subnet of a host, is reserved and will not be allocated. The broadcast address for IPv4 CIDRs is also reserved and will not be allocated. This field is immutable.", + "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", "items": { "default": "", "type": "string" @@ -236,7 +236,7 @@ }, "type": "object" }, - "io.k8s.api.networking.v1alpha1.ServiceCIDRStatus": { + "io.k8s.api.networking.v1beta1.ServiceCIDRStatus": { "description": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", "properties": { "conditions": { @@ -1465,10 +1465,10 @@ }, "openapi": "3.0.0", "paths": { - "/apis/networking.k8s.io/v1alpha1/": { + "/apis/networking.k8s.io/v1beta1/": { "get": { "description": "get available resources", - "operationId": "getNetworkingV1alpha1APIResources", + "operationId": "getNetworkingV1beta1APIResources", "responses": { "200": { "content": { @@ -1495,14 +1495,14 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ] } }, - "/apis/networking.k8s.io/v1alpha1/ipaddresses": { + "/apis/networking.k8s.io/v1beta1/ipaddresses": { "delete": { "description": "delete collection of IPAddress", - "operationId": "deleteNetworkingV1alpha1CollectionIPAddress", + "operationId": "deleteNetworkingV1beta1CollectionIPAddress", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -1648,18 +1648,18 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { "description": "list or watch objects of kind IPAddress", - "operationId": "listNetworkingV1alpha1IPAddress", + "operationId": "listNetworkingV1beta1IPAddress", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -1757,27 +1757,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddressList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddressList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddressList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddressList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddressList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddressList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddressList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddressList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddressList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddressList" } } }, @@ -1788,13 +1788,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -1810,7 +1810,7 @@ ], "post": { "description": "create an IPAddress", - "operationId": "createNetworkingV1alpha1IPAddress", + "operationId": "createNetworkingV1beta1IPAddress", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -1844,7 +1844,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -1855,17 +1855,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -1875,17 +1875,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -1895,17 +1895,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -1916,20 +1916,20 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}": { + "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}": { "delete": { "description": "delete an IPAddress", - "operationId": "deleteNetworkingV1alpha1IPAddress", + "operationId": "deleteNetworkingV1beta1IPAddress", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2023,34 +2023,34 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { "description": "read the specified IPAddress", - "operationId": "readNetworkingV1alpha1IPAddress", + "operationId": "readNetworkingV1beta1IPAddress", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -2061,13 +2061,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -2093,7 +2093,7 @@ ], "patch": { "description": "partially update the specified IPAddress", - "operationId": "patchNetworkingV1alpha1IPAddress", + "operationId": "patchNetworkingV1beta1IPAddress", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2162,17 +2162,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -2182,17 +2182,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -2203,18 +2203,18 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "put": { "description": "replace the specified IPAddress", - "operationId": "replaceNetworkingV1alpha1IPAddress", + "operationId": "replaceNetworkingV1beta1IPAddress", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2248,7 +2248,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -2259,17 +2259,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -2279,17 +2279,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.IPAddress" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.IPAddress" } } }, @@ -2300,20 +2300,20 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/servicecidrs": { + "/apis/networking.k8s.io/v1beta1/servicecidrs": { "delete": { "description": "delete collection of ServiceCIDR", - "operationId": "deleteNetworkingV1alpha1CollectionServiceCIDR", + "operationId": "deleteNetworkingV1beta1CollectionServiceCIDR", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -2459,18 +2459,18 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { "description": "list or watch objects of kind ServiceCIDR", - "operationId": "listNetworkingV1alpha1ServiceCIDR", + "operationId": "listNetworkingV1beta1ServiceCIDR", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -2568,27 +2568,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDRList" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDRList" } } }, @@ -2599,13 +2599,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -2621,7 +2621,7 @@ ], "post": { "description": "create a ServiceCIDR", - "operationId": "createNetworkingV1alpha1ServiceCIDR", + "operationId": "createNetworkingV1beta1ServiceCIDR", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2655,7 +2655,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -2666,17 +2666,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -2686,17 +2686,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -2706,17 +2706,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -2727,20 +2727,20 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}": { + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}": { "delete": { "description": "delete a ServiceCIDR", - "operationId": "deleteNetworkingV1alpha1ServiceCIDR", + "operationId": "deleteNetworkingV1beta1ServiceCIDR", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2834,34 +2834,34 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "get": { "description": "read the specified ServiceCIDR", - "operationId": "readNetworkingV1alpha1ServiceCIDR", + "operationId": "readNetworkingV1beta1ServiceCIDR", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -2872,13 +2872,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -2904,7 +2904,7 @@ ], "patch": { "description": "partially update the specified ServiceCIDR", - "operationId": "patchNetworkingV1alpha1ServiceCIDR", + "operationId": "patchNetworkingV1beta1ServiceCIDR", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2973,17 +2973,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -2993,17 +2993,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3014,18 +3014,18 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "put": { "description": "replace the specified ServiceCIDR", - "operationId": "replaceNetworkingV1alpha1ServiceCIDR", + "operationId": "replaceNetworkingV1beta1ServiceCIDR", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3059,7 +3059,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3070,17 +3070,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3090,17 +3090,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3111,36 +3111,36 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status": { + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status": { "get": { "description": "read status of the specified ServiceCIDR", - "operationId": "readNetworkingV1alpha1ServiceCIDRStatus", + "operationId": "readNetworkingV1beta1ServiceCIDRStatus", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3151,13 +3151,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -3183,7 +3183,7 @@ ], "patch": { "description": "partially update status of the specified ServiceCIDR", - "operationId": "patchNetworkingV1alpha1ServiceCIDRStatus", + "operationId": "patchNetworkingV1beta1ServiceCIDRStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3252,17 +3252,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3272,17 +3272,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3293,18 +3293,18 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "put": { "description": "replace status of the specified ServiceCIDR", - "operationId": "replaceNetworkingV1alpha1ServiceCIDRStatus", + "operationId": "replaceNetworkingV1beta1ServiceCIDRStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3338,7 +3338,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3349,17 +3349,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3369,17 +3369,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.networking.v1alpha1.ServiceCIDR" + "$ref": "#/components/schemas/io.k8s.api.networking.v1beta1.ServiceCIDR" } } }, @@ -3390,20 +3390,20 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1alpha1/watch/ipaddresses": { + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses": { "get": { "description": "watch individual changes to a list of IPAddress. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1alpha1IPAddressList", + "operationId": "watchNetworkingV1beta1IPAddressList", "responses": { "200": { "content": { @@ -3440,13 +3440,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -3551,10 +3551,10 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/watch/ipaddresses/{name}": { + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses/{name}": { "get": { "description": "watch changes to an object of kind IPAddress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1alpha1IPAddress", + "operationId": "watchNetworkingV1beta1IPAddress", "responses": { "200": { "content": { @@ -3591,13 +3591,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "IPAddress", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -3712,10 +3712,10 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/watch/servicecidrs": { + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs": { "get": { "description": "watch individual changes to a list of ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1alpha1ServiceCIDRList", + "operationId": "watchNetworkingV1beta1ServiceCIDRList", "responses": { "200": { "content": { @@ -3752,13 +3752,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -3863,10 +3863,10 @@ } ] }, - "/apis/networking.k8s.io/v1alpha1/watch/servicecidrs/{name}": { + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs/{name}": { "get": { "description": "watch changes to an object of kind ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1alpha1ServiceCIDR", + "operationId": "watchNetworkingV1beta1ServiceCIDR", "responses": { "200": { "content": { @@ -3903,13 +3903,13 @@ } }, "tags": [ - "networking_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "ServiceCIDR", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ diff --git a/pkg/apis/networking/v1beta1/zz_generated.conversion.go b/pkg/apis/networking/v1beta1/zz_generated.conversion.go index b5a1a7cb4c6..cda4bf95648 100644 --- a/pkg/apis/networking/v1beta1/zz_generated.conversion.go +++ b/pkg/apis/networking/v1beta1/zz_generated.conversion.go @@ -26,6 +26,7 @@ import ( v1 "k8s.io/api/core/v1" v1beta1 "k8s.io/api/networking/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" core "k8s.io/kubernetes/pkg/apis/core" @@ -59,6 +60,36 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1beta1.IPAddress)(nil), (*networking.IPAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IPAddress_To_networking_IPAddress(a.(*v1beta1.IPAddress), b.(*networking.IPAddress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IPAddress)(nil), (*v1beta1.IPAddress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IPAddress_To_v1beta1_IPAddress(a.(*networking.IPAddress), b.(*v1beta1.IPAddress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.IPAddressList)(nil), (*networking.IPAddressList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IPAddressList_To_networking_IPAddressList(a.(*v1beta1.IPAddressList), b.(*networking.IPAddressList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IPAddressList)(nil), (*v1beta1.IPAddressList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IPAddressList_To_v1beta1_IPAddressList(a.(*networking.IPAddressList), b.(*v1beta1.IPAddressList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.IPAddressSpec)(nil), (*networking.IPAddressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IPAddressSpec_To_networking_IPAddressSpec(a.(*v1beta1.IPAddressSpec), b.(*networking.IPAddressSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IPAddressSpec)(nil), (*v1beta1.IPAddressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IPAddressSpec_To_v1beta1_IPAddressSpec(a.(*networking.IPAddressSpec), b.(*v1beta1.IPAddressSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1beta1.Ingress)(nil), (*networking.Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_Ingress_To_networking_Ingress(a.(*v1beta1.Ingress), b.(*networking.Ingress), scope) }); err != nil { @@ -189,6 +220,56 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1beta1.ParentReference)(nil), (*networking.ParentReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ParentReference_To_networking_ParentReference(a.(*v1beta1.ParentReference), b.(*networking.ParentReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.ParentReference)(nil), (*v1beta1.ParentReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_ParentReference_To_v1beta1_ParentReference(a.(*networking.ParentReference), b.(*v1beta1.ParentReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ServiceCIDR)(nil), (*networking.ServiceCIDR)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceCIDR_To_networking_ServiceCIDR(a.(*v1beta1.ServiceCIDR), b.(*networking.ServiceCIDR), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.ServiceCIDR)(nil), (*v1beta1.ServiceCIDR)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_ServiceCIDR_To_v1beta1_ServiceCIDR(a.(*networking.ServiceCIDR), b.(*v1beta1.ServiceCIDR), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ServiceCIDRList)(nil), (*networking.ServiceCIDRList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceCIDRList_To_networking_ServiceCIDRList(a.(*v1beta1.ServiceCIDRList), b.(*networking.ServiceCIDRList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.ServiceCIDRList)(nil), (*v1beta1.ServiceCIDRList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_ServiceCIDRList_To_v1beta1_ServiceCIDRList(a.(*networking.ServiceCIDRList), b.(*v1beta1.ServiceCIDRList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ServiceCIDRSpec)(nil), (*networking.ServiceCIDRSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceCIDRSpec_To_networking_ServiceCIDRSpec(a.(*v1beta1.ServiceCIDRSpec), b.(*networking.ServiceCIDRSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.ServiceCIDRSpec)(nil), (*v1beta1.ServiceCIDRSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_ServiceCIDRSpec_To_v1beta1_ServiceCIDRSpec(a.(*networking.ServiceCIDRSpec), b.(*v1beta1.ServiceCIDRSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ServiceCIDRStatus)(nil), (*networking.ServiceCIDRStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceCIDRStatus_To_networking_ServiceCIDRStatus(a.(*v1beta1.ServiceCIDRStatus), b.(*networking.ServiceCIDRStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.ServiceCIDRStatus)(nil), (*v1beta1.ServiceCIDRStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_ServiceCIDRStatus_To_v1beta1_ServiceCIDRStatus(a.(*networking.ServiceCIDRStatus), b.(*v1beta1.ServiceCIDRStatus), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*networking.IngressBackend)(nil), (*v1beta1.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_networking_IngressBackend_To_v1beta1_IngressBackend(a.(*networking.IngressBackend), b.(*v1beta1.IngressBackend), scope) }); err != nil { @@ -280,6 +361,74 @@ func Convert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in return autoConvert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in, out, s) } +func autoConvert_v1beta1_IPAddress_To_networking_IPAddress(in *v1beta1.IPAddress, out *networking.IPAddress, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_IPAddressSpec_To_networking_IPAddressSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_IPAddress_To_networking_IPAddress is an autogenerated conversion function. +func Convert_v1beta1_IPAddress_To_networking_IPAddress(in *v1beta1.IPAddress, out *networking.IPAddress, s conversion.Scope) error { + return autoConvert_v1beta1_IPAddress_To_networking_IPAddress(in, out, s) +} + +func autoConvert_networking_IPAddress_To_v1beta1_IPAddress(in *networking.IPAddress, out *v1beta1.IPAddress, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_networking_IPAddressSpec_To_v1beta1_IPAddressSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_networking_IPAddress_To_v1beta1_IPAddress is an autogenerated conversion function. +func Convert_networking_IPAddress_To_v1beta1_IPAddress(in *networking.IPAddress, out *v1beta1.IPAddress, s conversion.Scope) error { + return autoConvert_networking_IPAddress_To_v1beta1_IPAddress(in, out, s) +} + +func autoConvert_v1beta1_IPAddressList_To_networking_IPAddressList(in *v1beta1.IPAddressList, out *networking.IPAddressList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]networking.IPAddress)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_IPAddressList_To_networking_IPAddressList is an autogenerated conversion function. +func Convert_v1beta1_IPAddressList_To_networking_IPAddressList(in *v1beta1.IPAddressList, out *networking.IPAddressList, s conversion.Scope) error { + return autoConvert_v1beta1_IPAddressList_To_networking_IPAddressList(in, out, s) +} + +func autoConvert_networking_IPAddressList_To_v1beta1_IPAddressList(in *networking.IPAddressList, out *v1beta1.IPAddressList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.IPAddress)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_networking_IPAddressList_To_v1beta1_IPAddressList is an autogenerated conversion function. +func Convert_networking_IPAddressList_To_v1beta1_IPAddressList(in *networking.IPAddressList, out *v1beta1.IPAddressList, s conversion.Scope) error { + return autoConvert_networking_IPAddressList_To_v1beta1_IPAddressList(in, out, s) +} + +func autoConvert_v1beta1_IPAddressSpec_To_networking_IPAddressSpec(in *v1beta1.IPAddressSpec, out *networking.IPAddressSpec, s conversion.Scope) error { + out.ParentRef = (*networking.ParentReference)(unsafe.Pointer(in.ParentRef)) + return nil +} + +// Convert_v1beta1_IPAddressSpec_To_networking_IPAddressSpec is an autogenerated conversion function. +func Convert_v1beta1_IPAddressSpec_To_networking_IPAddressSpec(in *v1beta1.IPAddressSpec, out *networking.IPAddressSpec, s conversion.Scope) error { + return autoConvert_v1beta1_IPAddressSpec_To_networking_IPAddressSpec(in, out, s) +} + +func autoConvert_networking_IPAddressSpec_To_v1beta1_IPAddressSpec(in *networking.IPAddressSpec, out *v1beta1.IPAddressSpec, s conversion.Scope) error { + out.ParentRef = (*v1beta1.ParentReference)(unsafe.Pointer(in.ParentRef)) + return nil +} + +// Convert_networking_IPAddressSpec_To_v1beta1_IPAddressSpec is an autogenerated conversion function. +func Convert_networking_IPAddressSpec_To_v1beta1_IPAddressSpec(in *networking.IPAddressSpec, out *v1beta1.IPAddressSpec, s conversion.Scope) error { + return autoConvert_networking_IPAddressSpec_To_v1beta1_IPAddressSpec(in, out, s) +} + func autoConvert_v1beta1_Ingress_To_networking_Ingress(in *v1beta1.Ingress, out *networking.Ingress, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_IngressSpec_To_networking_IngressSpec(&in.Spec, &out.Spec, s); err != nil { @@ -676,3 +825,123 @@ func autoConvert_networking_IngressTLS_To_v1beta1_IngressTLS(in *networking.Ingr func Convert_networking_IngressTLS_To_v1beta1_IngressTLS(in *networking.IngressTLS, out *v1beta1.IngressTLS, s conversion.Scope) error { return autoConvert_networking_IngressTLS_To_v1beta1_IngressTLS(in, out, s) } + +func autoConvert_v1beta1_ParentReference_To_networking_ParentReference(in *v1beta1.ParentReference, out *networking.ParentReference, s conversion.Scope) error { + out.Group = in.Group + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + return nil +} + +// Convert_v1beta1_ParentReference_To_networking_ParentReference is an autogenerated conversion function. +func Convert_v1beta1_ParentReference_To_networking_ParentReference(in *v1beta1.ParentReference, out *networking.ParentReference, s conversion.Scope) error { + return autoConvert_v1beta1_ParentReference_To_networking_ParentReference(in, out, s) +} + +func autoConvert_networking_ParentReference_To_v1beta1_ParentReference(in *networking.ParentReference, out *v1beta1.ParentReference, s conversion.Scope) error { + out.Group = in.Group + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + return nil +} + +// Convert_networking_ParentReference_To_v1beta1_ParentReference is an autogenerated conversion function. +func Convert_networking_ParentReference_To_v1beta1_ParentReference(in *networking.ParentReference, out *v1beta1.ParentReference, s conversion.Scope) error { + return autoConvert_networking_ParentReference_To_v1beta1_ParentReference(in, out, s) +} + +func autoConvert_v1beta1_ServiceCIDR_To_networking_ServiceCIDR(in *v1beta1.ServiceCIDR, out *networking.ServiceCIDR, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_ServiceCIDRSpec_To_networking_ServiceCIDRSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ServiceCIDRStatus_To_networking_ServiceCIDRStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_ServiceCIDR_To_networking_ServiceCIDR is an autogenerated conversion function. +func Convert_v1beta1_ServiceCIDR_To_networking_ServiceCIDR(in *v1beta1.ServiceCIDR, out *networking.ServiceCIDR, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceCIDR_To_networking_ServiceCIDR(in, out, s) +} + +func autoConvert_networking_ServiceCIDR_To_v1beta1_ServiceCIDR(in *networking.ServiceCIDR, out *v1beta1.ServiceCIDR, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_networking_ServiceCIDRSpec_To_v1beta1_ServiceCIDRSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_networking_ServiceCIDRStatus_To_v1beta1_ServiceCIDRStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_networking_ServiceCIDR_To_v1beta1_ServiceCIDR is an autogenerated conversion function. +func Convert_networking_ServiceCIDR_To_v1beta1_ServiceCIDR(in *networking.ServiceCIDR, out *v1beta1.ServiceCIDR, s conversion.Scope) error { + return autoConvert_networking_ServiceCIDR_To_v1beta1_ServiceCIDR(in, out, s) +} + +func autoConvert_v1beta1_ServiceCIDRList_To_networking_ServiceCIDRList(in *v1beta1.ServiceCIDRList, out *networking.ServiceCIDRList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]networking.ServiceCIDR)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_ServiceCIDRList_To_networking_ServiceCIDRList is an autogenerated conversion function. +func Convert_v1beta1_ServiceCIDRList_To_networking_ServiceCIDRList(in *v1beta1.ServiceCIDRList, out *networking.ServiceCIDRList, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceCIDRList_To_networking_ServiceCIDRList(in, out, s) +} + +func autoConvert_networking_ServiceCIDRList_To_v1beta1_ServiceCIDRList(in *networking.ServiceCIDRList, out *v1beta1.ServiceCIDRList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1beta1.ServiceCIDR)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_networking_ServiceCIDRList_To_v1beta1_ServiceCIDRList is an autogenerated conversion function. +func Convert_networking_ServiceCIDRList_To_v1beta1_ServiceCIDRList(in *networking.ServiceCIDRList, out *v1beta1.ServiceCIDRList, s conversion.Scope) error { + return autoConvert_networking_ServiceCIDRList_To_v1beta1_ServiceCIDRList(in, out, s) +} + +func autoConvert_v1beta1_ServiceCIDRSpec_To_networking_ServiceCIDRSpec(in *v1beta1.ServiceCIDRSpec, out *networking.ServiceCIDRSpec, s conversion.Scope) error { + out.CIDRs = *(*[]string)(unsafe.Pointer(&in.CIDRs)) + return nil +} + +// Convert_v1beta1_ServiceCIDRSpec_To_networking_ServiceCIDRSpec is an autogenerated conversion function. +func Convert_v1beta1_ServiceCIDRSpec_To_networking_ServiceCIDRSpec(in *v1beta1.ServiceCIDRSpec, out *networking.ServiceCIDRSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceCIDRSpec_To_networking_ServiceCIDRSpec(in, out, s) +} + +func autoConvert_networking_ServiceCIDRSpec_To_v1beta1_ServiceCIDRSpec(in *networking.ServiceCIDRSpec, out *v1beta1.ServiceCIDRSpec, s conversion.Scope) error { + out.CIDRs = *(*[]string)(unsafe.Pointer(&in.CIDRs)) + return nil +} + +// Convert_networking_ServiceCIDRSpec_To_v1beta1_ServiceCIDRSpec is an autogenerated conversion function. +func Convert_networking_ServiceCIDRSpec_To_v1beta1_ServiceCIDRSpec(in *networking.ServiceCIDRSpec, out *v1beta1.ServiceCIDRSpec, s conversion.Scope) error { + return autoConvert_networking_ServiceCIDRSpec_To_v1beta1_ServiceCIDRSpec(in, out, s) +} + +func autoConvert_v1beta1_ServiceCIDRStatus_To_networking_ServiceCIDRStatus(in *v1beta1.ServiceCIDRStatus, out *networking.ServiceCIDRStatus, s conversion.Scope) error { + out.Conditions = *(*[]metav1.Condition)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_v1beta1_ServiceCIDRStatus_To_networking_ServiceCIDRStatus is an autogenerated conversion function. +func Convert_v1beta1_ServiceCIDRStatus_To_networking_ServiceCIDRStatus(in *v1beta1.ServiceCIDRStatus, out *networking.ServiceCIDRStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceCIDRStatus_To_networking_ServiceCIDRStatus(in, out, s) +} + +func autoConvert_networking_ServiceCIDRStatus_To_v1beta1_ServiceCIDRStatus(in *networking.ServiceCIDRStatus, out *v1beta1.ServiceCIDRStatus, s conversion.Scope) error { + out.Conditions = *(*[]metav1.Condition)(unsafe.Pointer(&in.Conditions)) + return nil +} + +// Convert_networking_ServiceCIDRStatus_To_v1beta1_ServiceCIDRStatus is an autogenerated conversion function. +func Convert_networking_ServiceCIDRStatus_To_v1beta1_ServiceCIDRStatus(in *networking.ServiceCIDRStatus, out *v1beta1.ServiceCIDRStatus, s conversion.Scope) error { + return autoConvert_networking_ServiceCIDRStatus_To_v1beta1_ServiceCIDRStatus(in, out, s) +} diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 4a847548c8c..806b2a2e4f9 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -801,6 +801,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/networking/v1alpha1.ServiceCIDRStatus": schema_k8sio_api_networking_v1alpha1_ServiceCIDRStatus(ref), "k8s.io/api/networking/v1beta1.HTTPIngressPath": schema_k8sio_api_networking_v1beta1_HTTPIngressPath(ref), "k8s.io/api/networking/v1beta1.HTTPIngressRuleValue": schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref), + "k8s.io/api/networking/v1beta1.IPAddress": schema_k8sio_api_networking_v1beta1_IPAddress(ref), + "k8s.io/api/networking/v1beta1.IPAddressList": schema_k8sio_api_networking_v1beta1_IPAddressList(ref), + "k8s.io/api/networking/v1beta1.IPAddressSpec": schema_k8sio_api_networking_v1beta1_IPAddressSpec(ref), "k8s.io/api/networking/v1beta1.Ingress": schema_k8sio_api_networking_v1beta1_Ingress(ref), "k8s.io/api/networking/v1beta1.IngressBackend": schema_k8sio_api_networking_v1beta1_IngressBackend(ref), "k8s.io/api/networking/v1beta1.IngressClass": schema_k8sio_api_networking_v1beta1_IngressClass(ref), @@ -816,6 +819,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/networking/v1beta1.IngressSpec": schema_k8sio_api_networking_v1beta1_IngressSpec(ref), "k8s.io/api/networking/v1beta1.IngressStatus": schema_k8sio_api_networking_v1beta1_IngressStatus(ref), "k8s.io/api/networking/v1beta1.IngressTLS": schema_k8sio_api_networking_v1beta1_IngressTLS(ref), + "k8s.io/api/networking/v1beta1.ParentReference": schema_k8sio_api_networking_v1beta1_ParentReference(ref), + "k8s.io/api/networking/v1beta1.ServiceCIDR": schema_k8sio_api_networking_v1beta1_ServiceCIDR(ref), + "k8s.io/api/networking/v1beta1.ServiceCIDRList": schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref), + "k8s.io/api/networking/v1beta1.ServiceCIDRSpec": schema_k8sio_api_networking_v1beta1_ServiceCIDRSpec(ref), + "k8s.io/api/networking/v1beta1.ServiceCIDRStatus": schema_k8sio_api_networking_v1beta1_ServiceCIDRStatus(ref), "k8s.io/api/node/v1.Overhead": schema_k8sio_api_node_v1_Overhead(ref), "k8s.io/api/node/v1.RuntimeClass": schema_k8sio_api_node_v1_RuntimeClass(ref), "k8s.io/api/node/v1.RuntimeClassList": schema_k8sio_api_node_v1_RuntimeClassList(ref), @@ -41226,6 +41234,122 @@ func schema_k8sio_api_networking_v1beta1_HTTPIngressRuleValue(ref common.Referen } } +func schema_k8sio_api_networking_v1beta1_IPAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IPAddressSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IPAddressSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IPAddressList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAddressList contains a list of IPAddress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of IPAddresses.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.IPAddress"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.IPAddress", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_IPAddressSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAddressSpec describe the attributes in an IP Address.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "parentRef": { + SchemaProps: spec.SchemaProps{ + Description: "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object.", + Ref: ref("k8s.io/api/networking/v1beta1.ParentReference"), + }, + }, + }, + Required: []string{"parentRef"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.ParentReference"}, + } +} + func schema_k8sio_api_networking_v1beta1_Ingress(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -41829,6 +41953,221 @@ func schema_k8sio_api_networking_v1beta1_IngressTLS(ref common.ReferenceCallback } } +func schema_k8sio_api_networking_v1beta1_ParentReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ParentReference describes a reference to a parent object.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "group": { + SchemaProps: spec.SchemaProps{ + Description: "Group is the group of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "resource": { + SchemaProps: spec.SchemaProps{ + Description: "Resource is the resource of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace is the namespace of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"resource", "name"}, + }, + }, + } +} + +func schema_k8sio_api_networking_v1beta1_ServiceCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.ServiceCIDRSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.ServiceCIDRStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.ServiceCIDRSpec", "k8s.io/api/networking/v1beta1.ServiceCIDRStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_ServiceCIDRList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceCIDRList contains a list of ServiceCIDR objects.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "items is the list of ServiceCIDRs.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/networking/v1beta1.ServiceCIDR"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/networking/v1beta1.ServiceCIDR", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_k8sio_api_networking_v1beta1_ServiceCIDRSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cidrs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_k8sio_api_networking_v1beta1_ServiceCIDRStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceCIDRStatus describes the current state of the ServiceCIDR.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + } +} + func schema_k8sio_api_node_v1_Overhead(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go b/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go index 13d4f53855c..a924725f284 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go +++ b/staging/src/k8s.io/api/networking/v1beta1/generated.pb.go @@ -27,6 +27,7 @@ import ( proto "github.com/gogo/protobuf/proto" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" @@ -101,10 +102,94 @@ func (m *HTTPIngressRuleValue) XXX_DiscardUnknown() { var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo +func (m *IPAddress) Reset() { *m = IPAddress{} } +func (*IPAddress) ProtoMessage() {} +func (*IPAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{2} +} +func (m *IPAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IPAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_IPAddress.Merge(m, src) +} +func (m *IPAddress) XXX_Size() int { + return m.Size() +} +func (m *IPAddress) XXX_DiscardUnknown() { + xxx_messageInfo_IPAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_IPAddress proto.InternalMessageInfo + +func (m *IPAddressList) Reset() { *m = IPAddressList{} } +func (*IPAddressList) ProtoMessage() {} +func (*IPAddressList) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{3} +} +func (m *IPAddressList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IPAddressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IPAddressList) XXX_Merge(src proto.Message) { + xxx_messageInfo_IPAddressList.Merge(m, src) +} +func (m *IPAddressList) XXX_Size() int { + return m.Size() +} +func (m *IPAddressList) XXX_DiscardUnknown() { + xxx_messageInfo_IPAddressList.DiscardUnknown(m) +} + +var xxx_messageInfo_IPAddressList proto.InternalMessageInfo + +func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } +func (*IPAddressSpec) ProtoMessage() {} +func (*IPAddressSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{4} +} +func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IPAddressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IPAddressSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_IPAddressSpec.Merge(m, src) +} +func (m *IPAddressSpec) XXX_Size() int { + return m.Size() +} +func (m *IPAddressSpec) XXX_DiscardUnknown() { + xxx_messageInfo_IPAddressSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo + func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{2} + return fileDescriptor_9497719c79c89d2d, []int{5} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +217,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{3} + return fileDescriptor_9497719c79c89d2d, []int{6} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +245,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressClass) Reset() { *m = IngressClass{} } func (*IngressClass) ProtoMessage() {} func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{4} + return fileDescriptor_9497719c79c89d2d, []int{7} } func (m *IngressClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +273,7 @@ var xxx_messageInfo_IngressClass proto.InternalMessageInfo func (m *IngressClassList) Reset() { *m = IngressClassList{} } func (*IngressClassList) ProtoMessage() {} func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{5} + return fileDescriptor_9497719c79c89d2d, []int{8} } func (m *IngressClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +301,7 @@ var xxx_messageInfo_IngressClassList proto.InternalMessageInfo func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } func (*IngressClassParametersReference) ProtoMessage() {} func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{6} + return fileDescriptor_9497719c79c89d2d, []int{9} } func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +329,7 @@ var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } func (*IngressClassSpec) ProtoMessage() {} func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{7} + return fileDescriptor_9497719c79c89d2d, []int{10} } func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +357,7 @@ var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{8} + return fileDescriptor_9497719c79c89d2d, []int{11} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +385,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{9} + return fileDescriptor_9497719c79c89d2d, []int{12} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +413,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{10} + return fileDescriptor_9497719c79c89d2d, []int{13} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,7 +441,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{11} + return fileDescriptor_9497719c79c89d2d, []int{14} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +469,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{12} + return fileDescriptor_9497719c79c89d2d, []int{15} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +497,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{13} + return fileDescriptor_9497719c79c89d2d, []int{16} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -440,7 +525,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{14} + return fileDescriptor_9497719c79c89d2d, []int{17} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +553,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{15} + return fileDescriptor_9497719c79c89d2d, []int{18} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,7 +581,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_9497719c79c89d2d, []int{16} + return fileDescriptor_9497719c79c89d2d, []int{19} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,9 +606,152 @@ func (m *IngressTLS) XXX_DiscardUnknown() { var xxx_messageInfo_IngressTLS proto.InternalMessageInfo +func (m *ParentReference) Reset() { *m = ParentReference{} } +func (*ParentReference) ProtoMessage() {} +func (*ParentReference) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{20} +} +func (m *ParentReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParentReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ParentReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParentReference.Merge(m, src) +} +func (m *ParentReference) XXX_Size() int { + return m.Size() +} +func (m *ParentReference) XXX_DiscardUnknown() { + xxx_messageInfo_ParentReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ParentReference proto.InternalMessageInfo + +func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } +func (*ServiceCIDR) ProtoMessage() {} +func (*ServiceCIDR) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{21} +} +func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceCIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceCIDR) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceCIDR.Merge(m, src) +} +func (m *ServiceCIDR) XXX_Size() int { + return m.Size() +} +func (m *ServiceCIDR) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceCIDR.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo + +func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } +func (*ServiceCIDRList) ProtoMessage() {} +func (*ServiceCIDRList) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{22} +} +func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceCIDRList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceCIDRList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceCIDRList.Merge(m, src) +} +func (m *ServiceCIDRList) XXX_Size() int { + return m.Size() +} +func (m *ServiceCIDRList) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceCIDRList.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo + +func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } +func (*ServiceCIDRSpec) ProtoMessage() {} +func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{23} +} +func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceCIDRSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceCIDRSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceCIDRSpec.Merge(m, src) +} +func (m *ServiceCIDRSpec) XXX_Size() int { + return m.Size() +} +func (m *ServiceCIDRSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceCIDRSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo + +func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } +func (*ServiceCIDRStatus) ProtoMessage() {} +func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_9497719c79c89d2d, []int{24} +} +func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceCIDRStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceCIDRStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceCIDRStatus.Merge(m, src) +} +func (m *ServiceCIDRStatus) XXX_Size() int { + return m.Size() +} +func (m *ServiceCIDRStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceCIDRStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceCIDRStatus proto.InternalMessageInfo + func init() { proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.networking.v1beta1.HTTPIngressPath") proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.networking.v1beta1.HTTPIngressRuleValue") + proto.RegisterType((*IPAddress)(nil), "k8s.io.api.networking.v1beta1.IPAddress") + proto.RegisterType((*IPAddressList)(nil), "k8s.io.api.networking.v1beta1.IPAddressList") + proto.RegisterType((*IPAddressSpec)(nil), "k8s.io.api.networking.v1beta1.IPAddressSpec") proto.RegisterType((*Ingress)(nil), "k8s.io.api.networking.v1beta1.Ingress") proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.networking.v1beta1.IngressBackend") proto.RegisterType((*IngressClass)(nil), "k8s.io.api.networking.v1beta1.IngressClass") @@ -539,6 +767,11 @@ func init() { proto.RegisterType((*IngressSpec)(nil), "k8s.io.api.networking.v1beta1.IngressSpec") proto.RegisterType((*IngressStatus)(nil), "k8s.io.api.networking.v1beta1.IngressStatus") proto.RegisterType((*IngressTLS)(nil), "k8s.io.api.networking.v1beta1.IngressTLS") + proto.RegisterType((*ParentReference)(nil), "k8s.io.api.networking.v1beta1.ParentReference") + proto.RegisterType((*ServiceCIDR)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDR") + proto.RegisterType((*ServiceCIDRList)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDRList") + proto.RegisterType((*ServiceCIDRSpec)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDRSpec") + proto.RegisterType((*ServiceCIDRStatus)(nil), "k8s.io.api.networking.v1beta1.ServiceCIDRStatus") } func init() { @@ -546,85 +779,99 @@ func init() { } var fileDescriptor_9497719c79c89d2d = []byte{ - // 1234 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, - 0x1b, 0xcf, 0xda, 0x71, 0xe3, 0x8c, 0xd3, 0x34, 0xff, 0xf9, 0xe7, 0x60, 0x82, 0x6a, 0x47, 0x7b, - 0x40, 0x81, 0x36, 0xbb, 0x4d, 0x5a, 0x50, 0xb9, 0x20, 0xd8, 0x08, 0x91, 0x28, 0x21, 0x31, 0x63, - 0xf3, 0x22, 0xc4, 0x81, 0xc9, 0x7a, 0x6a, 0x2f, 0x5e, 0xef, 0xae, 0x66, 0x66, 0x83, 0x7a, 0x03, - 0x71, 0xe2, 0x04, 0xdf, 0x01, 0x89, 0x8f, 0x80, 0xb8, 0x20, 0x21, 0xb8, 0xe4, 0xd8, 0x63, 0x2f, - 0x44, 0xc4, 0x7c, 0x8b, 0x9e, 0xd0, 0x33, 0x3b, 0xfb, 0xe2, 0x97, 0xb4, 0x0e, 0x87, 0x9e, 0xe2, - 0x7d, 0x5e, 0x7e, 0xcf, 0xfb, 0x33, 0x4f, 0xd0, 0xf6, 0xe0, 0xa1, 0xb0, 0xbc, 0xd0, 0xa6, 0x91, - 0x67, 0x07, 0x4c, 0x7e, 0x1d, 0xf2, 0x81, 0x17, 0xf4, 0xec, 0xb3, 0x9d, 0x53, 0x26, 0xe9, 0x8e, - 0xdd, 0x63, 0x01, 0xe3, 0x54, 0xb2, 0xae, 0x15, 0xf1, 0x50, 0x86, 0xf8, 0x76, 0x22, 0x6e, 0xd1, - 0xc8, 0xb3, 0x72, 0x71, 0x4b, 0x8b, 0x6f, 0x6c, 0xf7, 0x3c, 0xd9, 0x8f, 0x4f, 0x2d, 0x37, 0x1c, - 0xda, 0xbd, 0xb0, 0x17, 0xda, 0x4a, 0xeb, 0x34, 0x7e, 0xa4, 0xbe, 0xd4, 0x87, 0xfa, 0x95, 0xa0, - 0x6d, 0x98, 0x05, 0xe3, 0x6e, 0xc8, 0x99, 0x7d, 0x36, 0x65, 0x71, 0xe3, 0x41, 0x2e, 0x33, 0xa4, - 0x6e, 0xdf, 0x0b, 0x18, 0x7f, 0x6c, 0x47, 0x83, 0x1e, 0x10, 0x84, 0x3d, 0x64, 0x92, 0xce, 0xd2, - 0xb2, 0xaf, 0xd2, 0xe2, 0x71, 0x20, 0xbd, 0x21, 0x9b, 0x52, 0x78, 0xeb, 0x45, 0x0a, 0xc2, 0xed, - 0xb3, 0x21, 0x9d, 0xd2, 0xbb, 0x7f, 0x95, 0x5e, 0x2c, 0x3d, 0xdf, 0xf6, 0x02, 0x29, 0x24, 0x9f, - 0x54, 0x32, 0xff, 0x34, 0xd0, 0xad, 0xfd, 0x4e, 0xa7, 0x75, 0x10, 0xf4, 0x38, 0x13, 0xa2, 0x45, - 0x65, 0x1f, 0x6f, 0xa2, 0xc5, 0x88, 0xca, 0x7e, 0xdd, 0xd8, 0x34, 0xb6, 0x96, 0x9d, 0x95, 0xf3, - 0x8b, 0xe6, 0xc2, 0xe8, 0xa2, 0xb9, 0x08, 0x3c, 0xa2, 0x38, 0xf8, 0x01, 0xaa, 0xc2, 0xdf, 0xce, - 0xe3, 0x88, 0xd5, 0xcb, 0x4a, 0xaa, 0x3e, 0xba, 0x68, 0x56, 0x5b, 0x9a, 0xf6, 0xac, 0xf0, 0x9b, - 0x64, 0x92, 0xf8, 0x33, 0xb4, 0x74, 0x4a, 0xdd, 0x01, 0x0b, 0xba, 0xf5, 0xd2, 0xa6, 0xb1, 0x55, - 0xdb, 0xdd, 0xb6, 0x9e, 0x5b, 0x43, 0x4b, 0x3b, 0xe5, 0x24, 0x4a, 0xce, 0x2d, 0xed, 0xc9, 0x92, - 0x26, 0x90, 0x14, 0xce, 0x1c, 0xa0, 0xf5, 0x42, 0x10, 0x24, 0xf6, 0xd9, 0x27, 0xd4, 0x8f, 0x19, - 0x6e, 0xa3, 0x0a, 0x58, 0x17, 0x75, 0x63, 0xb3, 0xbc, 0x55, 0xdb, 0xb5, 0x5e, 0x60, 0x6f, 0x22, - 0x11, 0xce, 0x4d, 0x6d, 0xb0, 0x02, 0x5f, 0x82, 0x24, 0x58, 0xe6, 0x0f, 0x25, 0xb4, 0xa4, 0xa5, - 0xf0, 0x97, 0xa8, 0x0a, 0x75, 0xef, 0x52, 0x49, 0x55, 0xba, 0x6a, 0xbb, 0xf7, 0x0a, 0x36, 0xb2, - 0x32, 0x58, 0xd1, 0xa0, 0x07, 0x04, 0x61, 0x81, 0xb4, 0x75, 0xb6, 0x63, 0x9d, 0x9c, 0x7e, 0xc5, - 0x5c, 0xf9, 0x21, 0x93, 0xd4, 0xc1, 0xda, 0x0a, 0xca, 0x69, 0x24, 0x43, 0xc5, 0x47, 0x68, 0x51, - 0x44, 0xcc, 0xd5, 0x19, 0x7b, 0x63, 0xbe, 0x8c, 0xb5, 0x23, 0xe6, 0xe6, 0x85, 0x83, 0x2f, 0xa2, - 0x50, 0x70, 0x07, 0xdd, 0x10, 0x92, 0xca, 0x58, 0xa8, 0xb2, 0xd5, 0x76, 0xef, 0xce, 0x89, 0xa7, - 0x74, 0x9c, 0x55, 0x8d, 0x78, 0x23, 0xf9, 0x26, 0x1a, 0xcb, 0xfc, 0xbe, 0x84, 0x56, 0xc7, 0x6b, - 0x85, 0xdf, 0x44, 0x35, 0xc1, 0xf8, 0x99, 0xe7, 0xb2, 0x63, 0x3a, 0x64, 0xba, 0x95, 0xfe, 0xaf, - 0xf5, 0x6b, 0xed, 0x9c, 0x45, 0x8a, 0x72, 0xb8, 0x97, 0xa9, 0xb5, 0x42, 0x2e, 0x75, 0xd0, 0x57, - 0xa7, 0x14, 0x3a, 0xdb, 0x4a, 0x3a, 0xdb, 0x3a, 0x08, 0xe4, 0x09, 0x6f, 0x4b, 0xee, 0x05, 0xbd, - 0x29, 0x43, 0x00, 0x46, 0x8a, 0xc8, 0xf8, 0x53, 0x54, 0xe5, 0x4c, 0x84, 0x31, 0x77, 0x99, 0x4e, - 0xc5, 0x58, 0x33, 0xc2, 0x0a, 0x80, 0x32, 0x41, 0xdf, 0x76, 0x8f, 0x42, 0x97, 0xfa, 0x49, 0x71, - 0x08, 0x7b, 0xc4, 0x38, 0x0b, 0x5c, 0xe6, 0xac, 0x40, 0xc3, 0x13, 0x0d, 0x41, 0x32, 0x30, 0x18, - 0xa8, 0x15, 0x9d, 0x8b, 0x3d, 0x9f, 0xbe, 0x94, 0x16, 0xf9, 0x68, 0xac, 0x45, 0xec, 0xf9, 0x4a, - 0xaa, 0x9c, 0xbb, 0xaa, 0x4f, 0xcc, 0x3f, 0x0c, 0xb4, 0x56, 0x14, 0x3c, 0xf2, 0x84, 0xc4, 0x5f, - 0x4c, 0x45, 0x62, 0xcd, 0x17, 0x09, 0x68, 0xab, 0x38, 0xd6, 0xb4, 0xa9, 0x6a, 0x4a, 0x29, 0x44, - 0xd1, 0x42, 0x15, 0x4f, 0xb2, 0xa1, 0xa8, 0x97, 0xd4, 0xac, 0xde, 0xb9, 0x46, 0x18, 0xf9, 0xa0, - 0x1e, 0x00, 0x02, 0x49, 0x80, 0xcc, 0xbf, 0x0c, 0xd4, 0x2c, 0x8a, 0xb5, 0x28, 0xa7, 0x43, 0x26, - 0x19, 0x17, 0x59, 0x19, 0xf1, 0x16, 0xaa, 0xd2, 0xd6, 0xc1, 0x07, 0x3c, 0x8c, 0xa3, 0x74, 0xdf, - 0x81, 0x7f, 0xef, 0x69, 0x1a, 0xc9, 0xb8, 0xb0, 0x15, 0x07, 0x9e, 0x5e, 0x5d, 0x85, 0xad, 0x78, - 0xe8, 0x05, 0x5d, 0xa2, 0x38, 0x20, 0x11, 0x40, 0xb3, 0x97, 0xc7, 0x25, 0x54, 0x97, 0x2b, 0x0e, - 0x6e, 0xa2, 0x8a, 0x70, 0xc3, 0x88, 0xd5, 0x17, 0x95, 0xc8, 0x32, 0xb8, 0xdc, 0x06, 0x02, 0x49, - 0xe8, 0xf8, 0x0e, 0x5a, 0x06, 0x41, 0x11, 0x51, 0x97, 0xd5, 0x2b, 0x4a, 0xe8, 0xe6, 0xe8, 0xa2, - 0xb9, 0x7c, 0x9c, 0x12, 0x49, 0xce, 0x37, 0x7f, 0x99, 0x28, 0x12, 0xd4, 0x0f, 0xef, 0x22, 0xe4, - 0x86, 0x81, 0xe4, 0xa1, 0xef, 0x33, 0xae, 0x43, 0xca, 0xda, 0x67, 0x2f, 0xe3, 0x90, 0x82, 0x14, - 0x0e, 0x10, 0x8a, 0xb2, 0xdc, 0xe8, 0x36, 0x7a, 0xe7, 0x1a, 0xf9, 0x9f, 0x91, 0x58, 0x67, 0x15, - 0xec, 0x15, 0x18, 0x05, 0x0b, 0xe6, 0xaf, 0x06, 0xaa, 0x69, 0xfd, 0x97, 0xd0, 0x58, 0x87, 0xe3, - 0x8d, 0xf5, 0xda, 0x9c, 0x8f, 0xce, 0xec, 0x9e, 0xfa, 0xcd, 0x40, 0x1b, 0xa9, 0xeb, 0x21, 0xed, - 0x3a, 0xd4, 0xa7, 0x81, 0xcb, 0x78, 0xfa, 0x1e, 0x6c, 0xa0, 0x92, 0x97, 0x36, 0x12, 0xd2, 0x00, - 0xa5, 0x83, 0x16, 0x29, 0x79, 0x11, 0xbe, 0x8b, 0xaa, 0xfd, 0x50, 0x48, 0xd5, 0x22, 0x49, 0x13, - 0x65, 0x5e, 0xef, 0x6b, 0x3a, 0xc9, 0x24, 0xf0, 0xc7, 0xa8, 0x12, 0x85, 0x5c, 0x8a, 0xfa, 0xa2, - 0xf2, 0xfa, 0xde, 0x7c, 0x5e, 0xc3, 0x6e, 0xd3, 0xcb, 0x3a, 0x7f, 0xbc, 0x00, 0x86, 0x24, 0x68, - 0xe6, 0xb7, 0x06, 0x7a, 0x65, 0x86, 0xff, 0x89, 0x0e, 0xee, 0xa2, 0x25, 0x2f, 0x61, 0xea, 0x17, - 0xf3, 0xed, 0xf9, 0xcc, 0xce, 0x48, 0x45, 0xfe, 0x5a, 0xa7, 0xaf, 0x72, 0x0a, 0x6d, 0xfe, 0x64, - 0xa0, 0xff, 0x4d, 0xf9, 0xab, 0xae, 0x0e, 0xd8, 0xf9, 0x90, 0xbc, 0x4a, 0xe1, 0xea, 0x80, 0xd5, - 0xad, 0x38, 0xf8, 0x10, 0x55, 0xd5, 0xd1, 0xe2, 0x86, 0xbe, 0x4e, 0xa0, 0x9d, 0x26, 0xb0, 0xa5, - 0xe9, 0xcf, 0x2e, 0x9a, 0xaf, 0x4e, 0x5f, 0x72, 0x56, 0xca, 0x26, 0x19, 0x00, 0x8c, 0x22, 0xe3, - 0x3c, 0xe4, 0x7a, 0x5a, 0xd5, 0x28, 0xbe, 0x0f, 0x04, 0x92, 0xd0, 0xcd, 0x9f, 0xf3, 0x26, 0x85, - 0x83, 0x02, 0xfc, 0x83, 0xe2, 0x4c, 0x5e, 0x45, 0x50, 0x3a, 0xa2, 0x38, 0x38, 0x46, 0x6b, 0xde, - 0xc4, 0x05, 0x72, 0xbd, 0x9d, 0x9c, 0xa9, 0x39, 0x75, 0x0d, 0xbf, 0x36, 0xc9, 0x21, 0x53, 0x26, - 0x4c, 0x86, 0xa6, 0xa4, 0xe0, 0x49, 0xe8, 0x4b, 0x19, 0xe9, 0x69, 0xba, 0x3f, 0xff, 0xdd, 0x93, - 0xbb, 0x50, 0x55, 0xd1, 0x75, 0x3a, 0x2d, 0xa2, 0xa0, 0xcc, 0xdf, 0x4b, 0x59, 0x3e, 0xd4, 0xa2, - 0x79, 0x37, 0x8b, 0x56, 0xed, 0x00, 0xf5, 0xcc, 0x27, 0x6b, 0x6d, 0xbd, 0xe0, 0x78, 0xc6, 0x23, - 0x53, 0xd2, 0xb8, 0x93, 0xdf, 0x83, 0xc6, 0x7f, 0xb9, 0x07, 0x6b, 0xb3, 0x6e, 0x41, 0xbc, 0x8f, - 0xca, 0xd2, 0x4f, 0x87, 0xfd, 0xf5, 0xf9, 0x10, 0x3b, 0x47, 0x6d, 0xa7, 0xa6, 0x53, 0x5e, 0xee, - 0x1c, 0xb5, 0x09, 0x40, 0xe0, 0x13, 0x54, 0xe1, 0xb1, 0xcf, 0xe0, 0x56, 0x2a, 0xcf, 0x7f, 0x7b, - 0x41, 0x06, 0xf3, 0xe1, 0x83, 0x2f, 0x41, 0x12, 0x1c, 0xf3, 0x3b, 0x03, 0xdd, 0x1c, 0xbb, 0xa8, - 0x30, 0x47, 0x2b, 0x7e, 0x61, 0x76, 0x74, 0x1e, 0x1e, 0x5e, 0x7f, 0xea, 0xf4, 0xd0, 0xaf, 0x6b, - 0xbb, 0x2b, 0x45, 0x1e, 0x19, 0xb3, 0x61, 0x52, 0x84, 0xf2, 0xb0, 0x61, 0x0e, 0xa0, 0x79, 0x93, - 0x81, 0xd7, 0x73, 0x00, 0x3d, 0x2d, 0x48, 0x42, 0x87, 0x07, 0x45, 0x30, 0x97, 0x33, 0x79, 0x9c, - 0x2f, 0xae, 0xec, 0x41, 0x69, 0x67, 0x1c, 0x52, 0x90, 0x72, 0xf6, 0xce, 0x2f, 0x1b, 0x0b, 0x4f, - 0x2e, 0x1b, 0x0b, 0x4f, 0x2f, 0x1b, 0x0b, 0xdf, 0x8c, 0x1a, 0xc6, 0xf9, 0xa8, 0x61, 0x3c, 0x19, - 0x35, 0x8c, 0xa7, 0xa3, 0x86, 0xf1, 0xf7, 0xa8, 0x61, 0xfc, 0xf8, 0x4f, 0x63, 0xe1, 0xf3, 0xdb, - 0xcf, 0xfd, 0x87, 0xef, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xf6, 0xe9, 0x27, 0x10, 0x0e, - 0x00, 0x00, + // 1457 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6f, 0x1b, 0xc5, + 0x1f, 0xcf, 0x3a, 0x71, 0xe3, 0x8c, 0xd3, 0x26, 0x9d, 0x5f, 0x0f, 0xfe, 0x05, 0xd5, 0x8e, 0x16, + 0x09, 0x85, 0x3e, 0x76, 0xdb, 0xb4, 0xa0, 0x72, 0x41, 0xd4, 0x01, 0x51, 0xab, 0x69, 0xb2, 0x8c, + 0x0d, 0x54, 0xc0, 0x81, 0xc9, 0x7a, 0x6a, 0x2f, 0x5e, 0xef, 0xae, 0x66, 0xc7, 0x81, 0xde, 0x40, + 0x9c, 0x38, 0xc1, 0x9d, 0x23, 0x12, 0x7f, 0x02, 0x70, 0xa0, 0x52, 0x05, 0x97, 0x1e, 0x7b, 0xec, + 0x85, 0x88, 0x9a, 0xff, 0xa2, 0x27, 0xf4, 0x9d, 0x9d, 0x7d, 0xf9, 0xd1, 0x6c, 0x38, 0xe4, 0x54, + 0xef, 0xf7, 0x3d, 0xdf, 0xe7, 0xa7, 0x41, 0x57, 0x07, 0xb7, 0x42, 0xc3, 0xf1, 0x4d, 0x1a, 0x38, + 0xa6, 0xc7, 0xc4, 0x97, 0x3e, 0x1f, 0x38, 0x5e, 0xcf, 0x3c, 0xbc, 0x7e, 0xc0, 0x04, 0xbd, 0x6e, + 0xf6, 0x98, 0xc7, 0x38, 0x15, 0xac, 0x6b, 0x04, 0xdc, 0x17, 0x3e, 0xbe, 0x18, 0x89, 0x1b, 0x34, + 0x70, 0x8c, 0x54, 0xdc, 0x50, 0xe2, 0x1b, 0x57, 0x7b, 0x8e, 0xe8, 0x8f, 0x0e, 0x0c, 0xdb, 0x1f, + 0x9a, 0x3d, 0xbf, 0xe7, 0x9b, 0x52, 0xeb, 0x60, 0xf4, 0x40, 0x7e, 0xc9, 0x0f, 0xf9, 0x2b, 0xb2, + 0xb6, 0xa1, 0x67, 0x9c, 0xdb, 0x3e, 0x67, 0xe6, 0xe1, 0x94, 0xc7, 0x8d, 0x9b, 0xa9, 0xcc, 0x90, + 0xda, 0x7d, 0xc7, 0x63, 0xfc, 0xa1, 0x19, 0x0c, 0x7a, 0x40, 0x08, 0xcd, 0x21, 0x13, 0x74, 0x96, + 0x96, 0x39, 0x4f, 0x8b, 0x8f, 0x3c, 0xe1, 0x0c, 0xd9, 0x94, 0xc2, 0x9b, 0xc7, 0x29, 0x84, 0x76, + 0x9f, 0x0d, 0xe9, 0x94, 0xde, 0x8d, 0x79, 0x7a, 0x23, 0xe1, 0xb8, 0xa6, 0xe3, 0x89, 0x50, 0xf0, + 0x49, 0x25, 0xfd, 0x4f, 0x0d, 0xad, 0xdd, 0xe9, 0x74, 0xac, 0x96, 0xd7, 0xe3, 0x2c, 0x0c, 0x2d, + 0x2a, 0xfa, 0x78, 0x13, 0x2d, 0x05, 0x54, 0xf4, 0x6b, 0xda, 0xa6, 0xb6, 0xb5, 0xd2, 0x5c, 0x7d, + 0x72, 0xd4, 0x58, 0x18, 0x1f, 0x35, 0x96, 0x80, 0x47, 0x24, 0x07, 0xdf, 0x44, 0x15, 0xf8, 0xb7, + 0xf3, 0x30, 0x60, 0xb5, 0x45, 0x29, 0x55, 0x1b, 0x1f, 0x35, 0x2a, 0x96, 0xa2, 0xbd, 0xc8, 0xfc, + 0x26, 0x89, 0x24, 0xbe, 0x8f, 0x96, 0x0f, 0xa8, 0x3d, 0x60, 0x5e, 0xb7, 0x56, 0xda, 0xd4, 0xb6, + 0xaa, 0xdb, 0x57, 0x8d, 0x97, 0xd6, 0xd0, 0x50, 0x41, 0x35, 0x23, 0xa5, 0xe6, 0x9a, 0x8a, 0x64, + 0x59, 0x11, 0x48, 0x6c, 0x4e, 0x1f, 0xa0, 0x0b, 0x99, 0x47, 0x90, 0x91, 0xcb, 0x3e, 0xa2, 0xee, + 0x88, 0xe1, 0x36, 0x2a, 0x83, 0xf7, 0xb0, 0xa6, 0x6d, 0x2e, 0x6e, 0x55, 0xb7, 0x8d, 0x63, 0xfc, + 0x4d, 0x24, 0xa2, 0x79, 0x56, 0x39, 0x2c, 0xc3, 0x57, 0x48, 0x22, 0x5b, 0xfa, 0x23, 0x0d, 0xad, + 0xb4, 0xac, 0xdb, 0xdd, 0x2e, 0xc8, 0xe1, 0xcf, 0x51, 0x05, 0x2a, 0xdf, 0xa5, 0x82, 0xca, 0x84, + 0x55, 0xb7, 0xaf, 0x65, 0xbc, 0x24, 0x85, 0x30, 0x82, 0x41, 0x0f, 0x08, 0xa1, 0x01, 0xd2, 0xc6, + 0xe1, 0x75, 0x63, 0xff, 0xe0, 0x0b, 0x66, 0x8b, 0x7b, 0x4c, 0xd0, 0x26, 0x56, 0x7e, 0x50, 0x4a, + 0x23, 0x89, 0x55, 0xbc, 0x87, 0x96, 0xc2, 0x80, 0xd9, 0x2a, 0x67, 0x57, 0x8e, 0xcb, 0x59, 0x1c, + 0x59, 0x3b, 0x60, 0x76, 0x5a, 0x3c, 0xf8, 0x22, 0xd2, 0x8e, 0xfe, 0xbb, 0x86, 0xce, 0x26, 0x52, + 0xbb, 0x4e, 0x28, 0xf0, 0x67, 0x53, 0x6f, 0x30, 0x8a, 0xbd, 0x01, 0xb4, 0xe5, 0x0b, 0xd6, 0x95, + 0x9f, 0x4a, 0x4c, 0xc9, 0xc4, 0x7f, 0x0f, 0x95, 0x1d, 0xc1, 0x86, 0x61, 0xad, 0x24, 0x8b, 0xb0, + 0x55, 0xf4, 0x01, 0x69, 0xfa, 0x5b, 0xa0, 0x4e, 0x22, 0x2b, 0xba, 0x9b, 0x89, 0x1e, 0x5e, 0x85, + 0x3f, 0x45, 0x2b, 0x01, 0xe5, 0xcc, 0x13, 0x84, 0x3d, 0x98, 0x11, 0xfe, 0x2c, 0x1f, 0x56, 0x2c, + 0xcf, 0x38, 0xf3, 0x6c, 0xd6, 0x3c, 0x3b, 0x3e, 0x6a, 0xac, 0x24, 0x44, 0x92, 0xda, 0xd3, 0xbf, + 0x2f, 0xa1, 0x65, 0xd5, 0x12, 0xa7, 0x50, 0xea, 0xdd, 0x5c, 0xa9, 0x2f, 0x15, 0x1b, 0x8f, 0x79, + 0x85, 0xc6, 0x1d, 0x74, 0x26, 0x14, 0x54, 0x8c, 0x42, 0x39, 0xa3, 0x05, 0x5a, 0x47, 0xd9, 0x93, + 0x3a, 0xcd, 0x73, 0xca, 0xe2, 0x99, 0xe8, 0x9b, 0x28, 0x5b, 0xfa, 0x77, 0x25, 0x74, 0x2e, 0x3f, + 0x98, 0xf8, 0x0d, 0x54, 0x0d, 0x19, 0x3f, 0x74, 0x6c, 0xb6, 0x47, 0x87, 0x4c, 0xed, 0x8d, 0xff, + 0x29, 0xfd, 0x6a, 0x3b, 0x65, 0x91, 0xac, 0x1c, 0xee, 0x25, 0x6a, 0x96, 0xcf, 0x85, 0x7a, 0xf4, + 0xfc, 0x94, 0xc2, 0x1a, 0x33, 0xa2, 0x35, 0x66, 0xb4, 0x3c, 0xb1, 0xcf, 0xdb, 0x82, 0x3b, 0x5e, + 0x6f, 0xca, 0x11, 0x18, 0x23, 0x59, 0xcb, 0xf8, 0x63, 0x54, 0xe1, 0x2c, 0xf4, 0x47, 0xdc, 0x66, + 0x2a, 0x15, 0xb9, 0xcd, 0x03, 0xfb, 0x1e, 0xca, 0x04, 0x4b, 0xaa, 0xbb, 0xeb, 0xdb, 0xd4, 0x8d, + 0x8a, 0x93, 0xf6, 0xc7, 0x2a, 0xb4, 0x36, 0x51, 0x26, 0x48, 0x62, 0x0c, 0xb6, 0xe7, 0xaa, 0xca, + 0xc5, 0x8e, 0x4b, 0x4f, 0xa5, 0x45, 0x3e, 0xc8, 0xb5, 0x88, 0x59, 0xac, 0xa4, 0x32, 0xb8, 0xb9, + 0x0b, 0xe1, 0x0f, 0x0d, 0xad, 0x67, 0x05, 0x4f, 0x61, 0x27, 0x58, 0xf9, 0x9d, 0x70, 0xf9, 0x04, + 0xcf, 0x98, 0xb3, 0x16, 0xfe, 0xd2, 0x50, 0x23, 0x2b, 0x66, 0x51, 0x4e, 0x87, 0x4c, 0x30, 0x1e, + 0x26, 0x65, 0xc4, 0x5b, 0xa8, 0x42, 0xad, 0xd6, 0xfb, 0xdc, 0x1f, 0x05, 0xf1, 0x71, 0x83, 0xf8, + 0x6e, 0x2b, 0x1a, 0x49, 0xb8, 0x70, 0x02, 0x07, 0x8e, 0xba, 0x53, 0x99, 0x13, 0x78, 0xd7, 0xf1, + 0xba, 0x44, 0x72, 0x40, 0xc2, 0x83, 0x66, 0x5f, 0xcc, 0x4b, 0xc8, 0x2e, 0x97, 0x1c, 0xdc, 0x40, + 0xe5, 0xd0, 0xf6, 0x03, 0x56, 0x5b, 0x92, 0x22, 0x2b, 0x10, 0x72, 0x1b, 0x08, 0x24, 0xa2, 0xe3, + 0xcb, 0x68, 0x05, 0x04, 0xc3, 0x80, 0xda, 0xac, 0x56, 0x96, 0x42, 0x72, 0x11, 0xed, 0xc5, 0x44, + 0x92, 0xf2, 0xf5, 0x5f, 0x26, 0x8a, 0x24, 0x57, 0xdf, 0x36, 0x42, 0xb6, 0xef, 0x09, 0xee, 0xbb, + 0x2e, 0xe3, 0xea, 0x49, 0x49, 0xfb, 0xec, 0x24, 0x1c, 0x92, 0x91, 0xc2, 0x1e, 0x42, 0x41, 0x92, + 0x1b, 0xd5, 0x46, 0x6f, 0x9f, 0x20, 0xff, 0x33, 0x12, 0xdb, 0x3c, 0x07, 0xfe, 0x32, 0x8c, 0x8c, + 0x07, 0xfd, 0x37, 0x0d, 0x55, 0x95, 0xfe, 0x29, 0x34, 0xd6, 0xdd, 0x7c, 0x63, 0xbd, 0x56, 0x10, + 0x61, 0xcc, 0xee, 0xa9, 0x47, 0x1a, 0xda, 0x88, 0x43, 0xf7, 0x69, 0xb7, 0x49, 0x5d, 0xea, 0xd9, + 0x8c, 0xc7, 0xf7, 0x60, 0x03, 0x95, 0x9c, 0xb8, 0x91, 0x90, 0x32, 0x50, 0x6a, 0x59, 0xa4, 0xe4, + 0x04, 0xf8, 0x0a, 0xaa, 0xf4, 0xfd, 0x50, 0xc8, 0x16, 0x89, 0x9a, 0x28, 0x89, 0xfa, 0x8e, 0xa2, + 0x93, 0x44, 0x02, 0x7f, 0x88, 0xca, 0x81, 0xcf, 0x45, 0x58, 0x5b, 0x92, 0x51, 0x5f, 0x2b, 0x16, + 0x35, 0xec, 0x36, 0xb5, 0xac, 0x53, 0xa4, 0x02, 0x66, 0x48, 0x64, 0x4d, 0xff, 0x46, 0x43, 0xff, + 0x9f, 0x11, 0x7f, 0xa4, 0x83, 0xbb, 0x68, 0xd9, 0x89, 0x98, 0x0a, 0x1e, 0xbd, 0x55, 0xcc, 0xed, + 0x8c, 0x54, 0xa4, 0xd0, 0x2c, 0x86, 0x60, 0xb1, 0x69, 0xfd, 0x27, 0x0d, 0x9d, 0x9f, 0x8a, 0x57, + 0x42, 0x4c, 0xd8, 0xf9, 0x90, 0xbc, 0x72, 0x06, 0x62, 0xc2, 0xea, 0x96, 0x1c, 0x7c, 0x17, 0x55, + 0x24, 0x42, 0xb5, 0x7d, 0x57, 0x25, 0xd0, 0x8c, 0x13, 0x68, 0x29, 0xfa, 0x8b, 0xa3, 0xc6, 0x2b, + 0xd3, 0xb0, 0xdd, 0x88, 0xd9, 0x24, 0x31, 0x00, 0xa3, 0xc8, 0x38, 0xf7, 0xb9, 0x9a, 0x56, 0x39, + 0x8a, 0xef, 0x01, 0x81, 0x44, 0x74, 0xfd, 0xe7, 0xb4, 0x49, 0x01, 0x3d, 0x42, 0x7c, 0x50, 0x9c, + 0x49, 0x08, 0x0c, 0xa5, 0x23, 0x92, 0x83, 0x47, 0x68, 0xdd, 0x99, 0x80, 0x9b, 0x27, 0xdb, 0xc9, + 0x89, 0x5a, 0xb3, 0xa6, 0xcc, 0xaf, 0x4f, 0x72, 0xc8, 0x94, 0x0b, 0x9d, 0xa1, 0x29, 0x29, 0x38, + 0x09, 0x7d, 0x21, 0x02, 0x35, 0x4d, 0x37, 0x8a, 0x83, 0xdc, 0x34, 0x84, 0x8a, 0x7c, 0x5d, 0xa7, + 0x63, 0x11, 0x69, 0x4a, 0x7f, 0x5c, 0x4a, 0xf2, 0x21, 0x17, 0xcd, 0x3b, 0xc9, 0x6b, 0xe5, 0x0e, + 0x90, 0x67, 0x3e, 0x5a, 0x6b, 0x17, 0x32, 0x81, 0x27, 0x3c, 0x32, 0x25, 0x8d, 0x3b, 0x29, 0xf8, + 0xd7, 0xfe, 0x0b, 0xf8, 0xaf, 0xce, 0x02, 0xfe, 0xf8, 0x0e, 0x5a, 0x14, 0x6e, 0x3c, 0xec, 0xaf, + 0x17, 0xb3, 0xd8, 0xd9, 0x6d, 0x37, 0xab, 0x2a, 0xe5, 0x8b, 0x9d, 0xdd, 0x36, 0x01, 0x13, 0x78, + 0x1f, 0x95, 0xf9, 0xc8, 0x65, 0x80, 0x95, 0x16, 0x8b, 0x63, 0x2f, 0xc8, 0x60, 0x3a, 0x7c, 0xf0, + 0x15, 0x92, 0xc8, 0x8e, 0xfe, 0x2d, 0xc0, 0xec, 0x2c, 0xa2, 0xc2, 0x1c, 0xad, 0xba, 0x99, 0xd9, + 0x51, 0x79, 0xb8, 0x75, 0xf2, 0xa9, 0x53, 0x43, 0x7f, 0x41, 0xf9, 0x5d, 0xcd, 0xf2, 0x48, 0xce, + 0x87, 0x4e, 0x11, 0x4a, 0x9f, 0x0d, 0x73, 0x00, 0xcd, 0x1b, 0x0d, 0xbc, 0x9a, 0x03, 0xe8, 0xe9, + 0x90, 0x44, 0x74, 0x38, 0x28, 0x21, 0xb3, 0x39, 0x13, 0x7b, 0xe9, 0xe2, 0x4a, 0x0e, 0x4a, 0x3b, + 0xe1, 0x90, 0x8c, 0x94, 0xfe, 0xab, 0x86, 0xd6, 0x26, 0x00, 0x35, 0x7e, 0x15, 0x95, 0x7b, 0x99, + 0x33, 0x9b, 0x64, 0x28, 0xba, 0xb3, 0x11, 0x0f, 0x76, 0x64, 0x02, 0xcb, 0x26, 0x76, 0xe4, 0x34, + 0xd6, 0xc2, 0x66, 0xf6, 0x5a, 0x46, 0x73, 0x7c, 0x5e, 0x89, 0xcf, 0xbc, 0x98, 0xc9, 0x85, 0x5e, + 0x9a, 0x77, 0xa1, 0xf5, 0x1f, 0x4b, 0x28, 0x06, 0x8d, 0x3b, 0xad, 0x77, 0xc9, 0x29, 0xa0, 0x37, + 0x2b, 0x87, 0xde, 0x8e, 0xfb, 0x6f, 0x4a, 0x26, 0xb6, 0xb9, 0x20, 0xff, 0xfe, 0x04, 0xc8, 0xbf, + 0x76, 0x02, 0x9b, 0x2f, 0x07, 0xfa, 0x8f, 0x35, 0xb4, 0x96, 0x91, 0x3e, 0x85, 0xe3, 0xbd, 0x9f, + 0x3f, 0xde, 0x97, 0x8a, 0x3f, 0x65, 0xce, 0x01, 0xdf, 0xce, 0xbd, 0x40, 0x6e, 0xb2, 0x06, 0x2a, + 0xdb, 0x4e, 0x97, 0xe7, 0x46, 0x00, 0x98, 0x21, 0x89, 0xe8, 0xfa, 0x57, 0xe8, 0xfc, 0x54, 0x8e, + 0xb0, 0x2d, 0x81, 0x56, 0xd7, 0x11, 0x8e, 0xef, 0xc5, 0xe7, 0xd2, 0x2c, 0xf6, 0xf2, 0x9d, 0x58, + 0x2f, 0x87, 0xcc, 0x94, 0x29, 0x92, 0x31, 0xdb, 0xdc, 0x79, 0xf2, 0xbc, 0xbe, 0xf0, 0xf4, 0x79, + 0x7d, 0xe1, 0xd9, 0xf3, 0xfa, 0xc2, 0xd7, 0xe3, 0xba, 0xf6, 0x64, 0x5c, 0xd7, 0x9e, 0x8e, 0xeb, + 0xda, 0xb3, 0x71, 0x5d, 0xfb, 0x7b, 0x5c, 0xd7, 0x7e, 0xf8, 0xa7, 0xbe, 0xf0, 0xc9, 0xc5, 0x97, + 0xfe, 0x99, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xc2, 0xa4, 0xff, 0x46, 0x13, 0x00, + 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { @@ -709,6 +956,131 @@ func (m *HTTPIngressRuleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *IPAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IPAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IPAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IPAddressList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IPAddressList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IPAddressList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IPAddressSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IPAddressSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IPAddressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ParentRef != nil { + { + size, err := m.ParentRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Ingress) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1378,6 +1750,218 @@ func (m *IngressTLS) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ParentReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParentReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParentReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x1a + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x12 + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ServiceCIDR) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCIDR) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceCIDR) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ServiceCIDRList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCIDRList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceCIDRList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ServiceCIDRSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCIDRSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceCIDRSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CIDRs) > 0 { + for iNdEx := len(m.CIDRs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CIDRs[iNdEx]) + copy(dAtA[i:], m.CIDRs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDRs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ServiceCIDRStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceCIDRStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceCIDRStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset @@ -1421,6 +2005,49 @@ func (m *HTTPIngressRuleValue) Size() (n int) { return n } +func (m *IPAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IPAddressList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *IPAddressSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ParentRef != nil { + l = m.ParentRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *Ingress) Size() (n int) { if m == nil { return 0 @@ -1673,6 +2300,85 @@ func (m *IngressTLS) Size() (n int) { return n } +func (m *ParentReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ServiceCIDR) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ServiceCIDRList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ServiceCIDRSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CIDRs) > 0 { + for _, s := range m.CIDRs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ServiceCIDRStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1706,6 +2412,43 @@ func (this *HTTPIngressRuleValue) String() string { }, "") return s } +func (this *IPAddress) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IPAddress{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IPAddressSpec", "IPAddressSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IPAddressList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]IPAddress{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "IPAddress", "IPAddress", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&IPAddressList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *IPAddressSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IPAddressSpec{`, + `ParentRef:` + strings.Replace(this.ParentRef.String(), "ParentReference", "ParentReference", 1) + `,`, + `}`, + }, "") + return s +} func (this *Ingress) String() string { if this == nil { return "nil" @@ -1907,6 +2650,72 @@ func (this *IngressTLS) String() string { }, "") return s } +func (this *ParentReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParentReference{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceCIDR) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceCIDR{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceCIDRSpec", "ServiceCIDRSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceCIDRStatus", "ServiceCIDRStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceCIDRList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ServiceCIDR{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ServiceCIDR", "ServiceCIDR", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ServiceCIDRList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ServiceCIDRSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceCIDRSpec{`, + `CIDRs:` + fmt.Sprintf("%v", this.CIDRs) + `,`, + `}`, + }, "") + return s +} +func (this *ServiceCIDRStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&ServiceCIDRStatus{`, + `Conditions:` + repeatedStringForConditions + `,`, + `}`, + }, "") + return s +} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -2147,6 +2956,325 @@ func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { } return nil } +func (m *IPAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IPAddressList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IPAddressList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddressList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, IPAddress{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IPAddressSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IPAddressSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddressSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParentRef == nil { + m.ParentRef = &ParentReference{} + } + if err := m.ParentRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Ingress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4079,6 +5207,616 @@ func (m *IngressTLS) Unmarshal(dAtA []byte) error { } return nil } +func (m *ParentReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParentReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParentReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCIDR: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCIDR: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCIDRList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCIDRList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ServiceCIDR{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceCIDRSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCIDRSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCIDRSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CIDRs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CIDRs = append(m.CIDRs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceCIDRStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceCIDRStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCIDRStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, v1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/staging/src/k8s.io/api/networking/v1beta1/generated.proto b/staging/src/k8s.io/api/networking/v1beta1/generated.proto index 303fbd32cdc..3368dcaec3f 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/networking/v1beta1/generated.proto @@ -73,6 +73,44 @@ message HTTPIngressRuleValue { repeated HTTPIngressPath paths = 1; } +// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs +// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. +// An IP address can be represented in different formats, to guarantee the uniqueness of the IP, +// the name of the object is the IP address in canonical format, four decimal digits separated +// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. +// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 +// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 +message IPAddress { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // spec is the desired state of the IPAddress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional IPAddressSpec spec = 2; +} + +// IPAddressList contains a list of IPAddress. +message IPAddressList { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of IPAddresses. + repeated IPAddress items = 2; +} + +// IPAddressSpec describe the attributes in an IP Address. +message IPAddressSpec { + // ParentRef references the resource that an IPAddress is attached to. + // An IPAddress must reference a parent object. + // +required + optional ParentReference parentRef = 1; +} + // Ingress is a collection of rules that allow inbound connections to reach the // endpoints defined by a backend. An Ingress can be configured to give services // externally-reachable urls, load balance traffic, terminate SSL, offer name @@ -351,3 +389,74 @@ message IngressTLS { optional string secretName = 2; } +// ParentReference describes a reference to a parent object. +message ParentReference { + // Group is the group of the object being referenced. + // +optional + optional string group = 1; + + // Resource is the resource of the object being referenced. + // +required + optional string resource = 2; + + // Namespace is the namespace of the object being referenced. + // +optional + optional string namespace = 3; + + // Name is the name of the object being referenced. + // +required + optional string name = 4; +} + +// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). +// This range is used to allocate ClusterIPs to Service objects. +message ServiceCIDR { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // spec is the desired state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional ServiceCIDRSpec spec = 2; + + // status represents the current state of the ServiceCIDR. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional ServiceCIDRStatus status = 3; +} + +// ServiceCIDRList contains a list of ServiceCIDR objects. +message ServiceCIDRList { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of ServiceCIDRs. + repeated ServiceCIDR items = 2; +} + +// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. +message ServiceCIDRSpec { + // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") + // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. + // This field is immutable. + // +optional + // +listType=atomic + repeated string cidrs = 1; +} + +// ServiceCIDRStatus describes the current state of the ServiceCIDR. +message ServiceCIDRStatus { + // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. + // Current service state + // +optional + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1; +} + diff --git a/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go index b2373669fec..9d27517f3b1 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go @@ -47,6 +47,35 @@ func (HTTPIngressRuleValue) SwaggerDoc() map[string]string { return map_HTTPIngressRuleValue } +var map_IPAddress = map[string]string{ + "": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", +} + +func (IPAddress) SwaggerDoc() map[string]string { + return map_IPAddress +} + +var map_IPAddressList = map[string]string{ + "": "IPAddressList contains a list of IPAddress.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is the list of IPAddresses.", +} + +func (IPAddressList) SwaggerDoc() map[string]string { + return map_IPAddressList +} + +var map_IPAddressSpec = map[string]string{ + "": "IPAddressSpec describe the attributes in an IP Address.", + "parentRef": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object.", +} + +func (IPAddressSpec) SwaggerDoc() map[string]string { + return map_IPAddressSpec +} + var map_Ingress = map[string]string{ "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", @@ -201,4 +230,55 @@ func (IngressTLS) SwaggerDoc() map[string]string { return map_IngressTLS } +var map_ParentReference = map[string]string{ + "": "ParentReference describes a reference to a parent object.", + "group": "Group is the group of the object being referenced.", + "resource": "Resource is the resource of the object being referenced.", + "namespace": "Namespace is the namespace of the object being referenced.", + "name": "Name is the name of the object being referenced.", +} + +func (ParentReference) SwaggerDoc() map[string]string { + return map_ParentReference +} + +var map_ServiceCIDR = map[string]string{ + "": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", +} + +func (ServiceCIDR) SwaggerDoc() map[string]string { + return map_ServiceCIDR +} + +var map_ServiceCIDRList = map[string]string{ + "": "ServiceCIDRList contains a list of ServiceCIDR objects.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is the list of ServiceCIDRs.", +} + +func (ServiceCIDRList) SwaggerDoc() map[string]string { + return map_ServiceCIDRList +} + +var map_ServiceCIDRSpec = map[string]string{ + "": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", + "cidrs": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", +} + +func (ServiceCIDRSpec) SwaggerDoc() map[string]string { + return map_ServiceCIDRSpec +} + +var map_ServiceCIDRStatus = map[string]string{ + "": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", + "conditions": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", +} + +func (ServiceCIDRStatus) SwaggerDoc() map[string]string { + return map_ServiceCIDRStatus +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go b/staging/src/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go index 005d64e7fd4..1a6869cd6db 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/api/networking/v1beta1/zz_generated.deepcopy.go @@ -23,6 +23,7 @@ package v1beta1 import ( v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -71,6 +72,87 @@ func (in *HTTPIngressRuleValue) DeepCopy() *HTTPIngressRuleValue { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPAddress) DeepCopyInto(out *IPAddress) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddress. +func (in *IPAddress) DeepCopy() *IPAddress { + if in == nil { + return nil + } + out := new(IPAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAddress) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPAddressList) DeepCopyInto(out *IPAddressList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IPAddress, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddressList. +func (in *IPAddressList) DeepCopy() *IPAddressList { + if in == nil { + return nil + } + out := new(IPAddressList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAddressList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPAddressSpec) DeepCopyInto(out *IPAddressSpec) { + *out = *in + if in.ParentRef != nil { + in, out := &in.ParentRef, &out.ParentRef + *out = new(ParentReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddressSpec. +func (in *IPAddressSpec) DeepCopy() *IPAddressSpec { + if in == nil { + return nil + } + out := new(IPAddressSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Ingress) DeepCopyInto(out *Ingress) { *out = *in @@ -448,3 +530,124 @@ func (in *IngressTLS) DeepCopy() *IngressTLS { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ParentReference) DeepCopyInto(out *ParentReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParentReference. +func (in *ParentReference) DeepCopy() *ParentReference { + if in == nil { + return nil + } + out := new(ParentReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceCIDR) DeepCopyInto(out *ServiceCIDR) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDR. +func (in *ServiceCIDR) DeepCopy() *ServiceCIDR { + if in == nil { + return nil + } + out := new(ServiceCIDR) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServiceCIDR) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceCIDRList) DeepCopyInto(out *ServiceCIDRList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ServiceCIDR, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRList. +func (in *ServiceCIDRList) DeepCopy() *ServiceCIDRList { + if in == nil { + return nil + } + out := new(ServiceCIDRList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServiceCIDRList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceCIDRSpec) DeepCopyInto(out *ServiceCIDRSpec) { + *out = *in + if in.CIDRs != nil { + in, out := &in.CIDRs, &out.CIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRSpec. +func (in *ServiceCIDRSpec) DeepCopy() *ServiceCIDRSpec { + if in == nil { + return nil + } + out := new(ServiceCIDRSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceCIDRStatus) DeepCopyInto(out *ServiceCIDRStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRStatus. +func (in *ServiceCIDRStatus) DeepCopy() *ServiceCIDRStatus { + if in == nil { + return nil + } + out := new(ServiceCIDRStatus) + in.DeepCopyInto(out) + return out +} diff --git a/staging/src/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go index e8b4c7ec7ff..a876fd5fe08 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go +++ b/staging/src/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go @@ -25,6 +25,42 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" ) +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *IPAddress) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *IPAddress) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *IPAddress) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *IPAddressList) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *IPAddressList) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *IPAddressList) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *Ingress) APILifecycleIntroduced() (major, minor int) { @@ -120,3 +156,39 @@ func (in *IngressList) APILifecycleReplacement() schema.GroupVersionKind { func (in *IngressList) APILifecycleRemoved() (major, minor int) { return 1, 22 } + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ServiceCIDR) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ServiceCIDR) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ServiceCIDR) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ServiceCIDRList) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ServiceCIDRList) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ServiceCIDRList) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} diff --git a/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.json b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.json new file mode 100644 index 00000000000..68b4d2e1bac --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.json @@ -0,0 +1,54 @@ +{ + "kind": "IPAddress", + "apiVersion": "networking.k8s.io/v1beta1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "parentRef": { + "group": "groupValue", + "resource": "resourceValue", + "namespace": "namespaceValue", + "name": "nameValue" + } + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.pb b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.pb new file mode 100644 index 0000000000000000000000000000000000000000..2f1f28ce8668a9307fa0ee7c118f7d2617faf5a9 GIT binary patch literal 464 zcmZWlJ5Iwu6tt5_*bm|uivnD_phyu&B#=c%IzB=v5Cz>DzgUZ%U2E3{1;hoo0|hll z;08#!1EQej2C!KxAE2A}n>RCQC=J+#Er!J{7b#^)CkaoAjAI#OXTO_B;LUzs26s;j;B%^mqpyqirBUl>|MiLad;W<2?`k%@7|I!4? z!^h;i?ixKshFL7n$9a{^K?7>{4}Djb(L4zqY6$xPiQr{k{b>Fg{|k6w$2S7w2OQ3z Ar~m)} literal 0 HcmV?d00001 diff --git a/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.yaml b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.yaml new file mode 100644 index 00000000000..b16eff5d7f9 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.IPAddress.yaml @@ -0,0 +1,40 @@ +apiVersion: networking.k8s.io/v1beta1 +kind: IPAddress +metadata: + annotations: + annotationsKey: annotationsValue + creationTimestamp: "2008-01-01T01:01:01Z" + deletionGracePeriodSeconds: 10 + deletionTimestamp: "2009-01-01T01:01:01Z" + finalizers: + - finalizersValue + generateName: generateNameValue + generation: 7 + labels: + labelsKey: labelsValue + managedFields: + - apiVersion: apiVersionValue + fieldsType: fieldsTypeValue + fieldsV1: {} + manager: managerValue + operation: operationValue + subresource: subresourceValue + time: "2004-01-01T01:01:01Z" + name: nameValue + namespace: namespaceValue + ownerReferences: + - apiVersion: apiVersionValue + blockOwnerDeletion: true + controller: true + kind: kindValue + name: nameValue + uid: uidValue + resourceVersion: resourceVersionValue + selfLink: selfLinkValue + uid: uidValue +spec: + parentRef: + group: groupValue + name: nameValue + namespace: namespaceValue + resource: resourceValue diff --git a/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.json b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.json new file mode 100644 index 00000000000..2fdd547009c --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.json @@ -0,0 +1,63 @@ +{ + "kind": "ServiceCIDR", + "apiVersion": "networking.k8s.io/v1beta1", + "metadata": { + "name": "nameValue", + "generateName": "generateNameValue", + "namespace": "namespaceValue", + "selfLink": "selfLinkValue", + "uid": "uidValue", + "resourceVersion": "resourceVersionValue", + "generation": 7, + "creationTimestamp": "2008-01-01T01:01:01Z", + "deletionTimestamp": "2009-01-01T01:01:01Z", + "deletionGracePeriodSeconds": 10, + "labels": { + "labelsKey": "labelsValue" + }, + "annotations": { + "annotationsKey": "annotationsValue" + }, + "ownerReferences": [ + { + "apiVersion": "apiVersionValue", + "kind": "kindValue", + "name": "nameValue", + "uid": "uidValue", + "controller": true, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "finalizersValue" + ], + "managedFields": [ + { + "manager": "managerValue", + "operation": "operationValue", + "apiVersion": "apiVersionValue", + "time": "2004-01-01T01:01:01Z", + "fieldsType": "fieldsTypeValue", + "fieldsV1": {}, + "subresource": "subresourceValue" + } + ] + }, + "spec": { + "cidrs": [ + "cidrsValue" + ] + }, + "status": { + "conditions": [ + { + "type": "typeValue", + "status": "statusValue", + "observedGeneration": 3, + "lastTransitionTime": "2004-01-01T01:01:01Z", + "reason": "reasonValue", + "message": "messageValue" + } + ] + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.pb b/staging/src/k8s.io/api/testdata/HEAD/networking.k8s.io.v1beta1.ServiceCIDR.pb new file mode 100644 index 0000000000000000000000000000000000000000..5b45721bd271377b90de0123b68f7f3e73430230 GIT binary patch literal 489 zcmZ8eJ5Iwu6m&ik@v}*cMG;)OLMZ}?gk+^b1R6d<2oMF`+IfibZUCEgexjRwpLsL0p(ixhhAoEaeau732F=hDO&afvT0W+vWgAz>M>N30 z0!x4T&Yq^-s*Oe^qdkS%n;b=) zaXE)v(3q*Jx7MvxCNJObWlKAe==JAAq6@gKgB}qdBXNpj+sL8X@Li}9#^RKul0>zw zmA9I?+XG#i%MUwC{q90dqec?CDrC3d6?m;r8HwnF6sUNf3qF`b!pH!*D%jOHnfjm0 zcmC73(! 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *IPAddressApplyConfiguration) WithAnnotations(entries map[string]string) *IPAddressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *IPAddressApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *IPAddressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *IPAddressApplyConfiguration) WithFinalizers(values ...string) *IPAddressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *IPAddressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *IPAddressApplyConfiguration) WithSpec(value *IPAddressSpecApplyConfiguration) *IPAddressApplyConfiguration { + b.Spec = value + return b +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *IPAddressApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.Name +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go new file mode 100644 index 00000000000..76b02137d23 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/ipaddressspec.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// IPAddressSpecApplyConfiguration represents a declarative configuration of the IPAddressSpec type for use +// with apply. +type IPAddressSpecApplyConfiguration struct { + ParentRef *ParentReferenceApplyConfiguration `json:"parentRef,omitempty"` +} + +// IPAddressSpecApplyConfiguration constructs a declarative configuration of the IPAddressSpec type for use with +// apply. +func IPAddressSpec() *IPAddressSpecApplyConfiguration { + return &IPAddressSpecApplyConfiguration{} +} + +// WithParentRef sets the ParentRef 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 ParentRef field is set to the value of the last call. +func (b *IPAddressSpecApplyConfiguration) WithParentRef(value *ParentReferenceApplyConfiguration) *IPAddressSpecApplyConfiguration { + b.ParentRef = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go new file mode 100644 index 00000000000..1863938f16c --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/parentreference.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// ParentReferenceApplyConfiguration represents a declarative configuration of the ParentReference type for use +// with apply. +type ParentReferenceApplyConfiguration struct { + Group *string `json:"group,omitempty"` + Resource *string `json:"resource,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Name *string `json:"name,omitempty"` +} + +// ParentReferenceApplyConfiguration constructs a declarative configuration of the ParentReference type for use with +// apply. +func ParentReference() *ParentReferenceApplyConfiguration { + return &ParentReferenceApplyConfiguration{} +} + +// WithGroup sets the Group 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 Group field is set to the value of the last call. +func (b *ParentReferenceApplyConfiguration) WithGroup(value string) *ParentReferenceApplyConfiguration { + b.Group = &value + return b +} + +// WithResource sets the Resource 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 Resource field is set to the value of the last call. +func (b *ParentReferenceApplyConfiguration) WithResource(value string) *ParentReferenceApplyConfiguration { + b.Resource = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ParentReferenceApplyConfiguration) WithNamespace(value string) *ParentReferenceApplyConfiguration { + b.Namespace = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ParentReferenceApplyConfiguration) WithName(value string) *ParentReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go new file mode 100644 index 00000000000..4ef8e9ecacc --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidr.go @@ -0,0 +1,262 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +import ( + networkingv1beta1 "k8s.io/api/networking/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ServiceCIDRApplyConfiguration represents a declarative configuration of the ServiceCIDR type for use +// with apply. +type ServiceCIDRApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ServiceCIDRSpecApplyConfiguration `json:"spec,omitempty"` + Status *ServiceCIDRStatusApplyConfiguration `json:"status,omitempty"` +} + +// ServiceCIDR constructs a declarative configuration of the ServiceCIDR type for use with +// apply. +func ServiceCIDR(name string) *ServiceCIDRApplyConfiguration { + b := &ServiceCIDRApplyConfiguration{} + b.WithName(name) + b.WithKind("ServiceCIDR") + b.WithAPIVersion("networking.k8s.io/v1beta1") + return b +} + +// ExtractServiceCIDR extracts the applied configuration owned by fieldManager from +// serviceCIDR. If no managedFields are found in serviceCIDR for fieldManager, a +// ServiceCIDRApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// serviceCIDR must be a unmodified ServiceCIDR API object that was retrieved from the Kubernetes API. +// ExtractServiceCIDR provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractServiceCIDR(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string) (*ServiceCIDRApplyConfiguration, error) { + return extractServiceCIDR(serviceCIDR, fieldManager, "") +} + +// ExtractServiceCIDRStatus is the same as ExtractServiceCIDR except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractServiceCIDRStatus(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string) (*ServiceCIDRApplyConfiguration, error) { + return extractServiceCIDR(serviceCIDR, fieldManager, "status") +} + +func extractServiceCIDR(serviceCIDR *networkingv1beta1.ServiceCIDR, fieldManager string, subresource string) (*ServiceCIDRApplyConfiguration, error) { + b := &ServiceCIDRApplyConfiguration{} + err := managedfields.ExtractInto(serviceCIDR, internal.Parser().Type("io.k8s.api.networking.v1beta1.ServiceCIDR"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(serviceCIDR.Name) + + b.WithKind("ServiceCIDR") + b.WithAPIVersion("networking.k8s.io/v1beta1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithKind(value string) *ServiceCIDRApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithAPIVersion(value string) *ServiceCIDRApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithName(value string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithGenerateName(value string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithNamespace(value string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithUID(value types.UID) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithResourceVersion(value string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithGeneration(value int64) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ServiceCIDRApplyConfiguration) WithLabels(entries map[string]string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ServiceCIDRApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ServiceCIDRApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ServiceCIDRApplyConfiguration) WithFinalizers(values ...string) *ServiceCIDRApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ServiceCIDRApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithSpec(value *ServiceCIDRSpecApplyConfiguration) *ServiceCIDRApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ServiceCIDRApplyConfiguration) WithStatus(value *ServiceCIDRStatusApplyConfiguration) *ServiceCIDRApplyConfiguration { + b.Status = value + return b +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ServiceCIDRApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.Name +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go new file mode 100644 index 00000000000..1f283532d31 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrspec.go @@ -0,0 +1,41 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +// ServiceCIDRSpecApplyConfiguration represents a declarative configuration of the ServiceCIDRSpec type for use +// with apply. +type ServiceCIDRSpecApplyConfiguration struct { + CIDRs []string `json:"cidrs,omitempty"` +} + +// ServiceCIDRSpecApplyConfiguration constructs a declarative configuration of the ServiceCIDRSpec type for use with +// apply. +func ServiceCIDRSpec() *ServiceCIDRSpecApplyConfiguration { + return &ServiceCIDRSpecApplyConfiguration{} +} + +// WithCIDRs adds the given value to the CIDRs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the CIDRs field. +func (b *ServiceCIDRSpecApplyConfiguration) WithCIDRs(values ...string) *ServiceCIDRSpecApplyConfiguration { + for i := range values { + b.CIDRs = append(b.CIDRs, values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go new file mode 100644 index 00000000000..f2dd92404dd --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/networking/v1beta1/servicecidrstatus.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ServiceCIDRStatusApplyConfiguration represents a declarative configuration of the ServiceCIDRStatus type for use +// with apply. +type ServiceCIDRStatusApplyConfiguration struct { + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ServiceCIDRStatusApplyConfiguration constructs a declarative configuration of the ServiceCIDRStatus type for use with +// apply. +func ServiceCIDRStatus() *ServiceCIDRStatusApplyConfiguration { + return &ServiceCIDRStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ServiceCIDRStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ServiceCIDRStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/utils.go b/staging/src/k8s.io/client-go/applyconfigurations/utils.go index a43705fed97..e3c623cdb4e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/utils.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/utils.go @@ -1438,6 +1438,18 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationsnetworkingv1beta1.IngressStatusApplyConfiguration{} case networkingv1beta1.SchemeGroupVersion.WithKind("IngressTLS"): return &applyconfigurationsnetworkingv1beta1.IngressTLSApplyConfiguration{} + case networkingv1beta1.SchemeGroupVersion.WithKind("IPAddress"): + return &applyconfigurationsnetworkingv1beta1.IPAddressApplyConfiguration{} + case networkingv1beta1.SchemeGroupVersion.WithKind("IPAddressSpec"): + return &applyconfigurationsnetworkingv1beta1.IPAddressSpecApplyConfiguration{} + case networkingv1beta1.SchemeGroupVersion.WithKind("ParentReference"): + return &applyconfigurationsnetworkingv1beta1.ParentReferenceApplyConfiguration{} + case networkingv1beta1.SchemeGroupVersion.WithKind("ServiceCIDR"): + return &applyconfigurationsnetworkingv1beta1.ServiceCIDRApplyConfiguration{} + case networkingv1beta1.SchemeGroupVersion.WithKind("ServiceCIDRSpec"): + return &applyconfigurationsnetworkingv1beta1.ServiceCIDRSpecApplyConfiguration{} + case networkingv1beta1.SchemeGroupVersion.WithKind("ServiceCIDRStatus"): + return &applyconfigurationsnetworkingv1beta1.ServiceCIDRStatusApplyConfiguration{} // Group=node.k8s.io, Version=v1 case nodev1.SchemeGroupVersion.WithKind("Overhead"): diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index d85117587c1..db1eb4a8331 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -307,10 +307,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ServiceCIDRs().Informer()}, nil // Group=networking.k8s.io, Version=v1beta1 + case networkingv1beta1.SchemeGroupVersion.WithResource("ipaddresses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IPAddresses().Informer()}, nil case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil case networkingv1beta1.SchemeGroupVersion.WithResource("ingressclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IngressClasses().Informer()}, nil + case networkingv1beta1.SchemeGroupVersion.WithResource("servicecidrs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().ServiceCIDRs().Informer()}, nil // Group=node.k8s.io, Version=v1 case nodev1.SchemeGroupVersion.WithResource("runtimeclasses"): diff --git a/staging/src/k8s.io/client-go/informers/networking/v1beta1/interface.go b/staging/src/k8s.io/client-go/informers/networking/v1beta1/interface.go index 2dcc3129a54..974a8fd5bff 100644 --- a/staging/src/k8s.io/client-go/informers/networking/v1beta1/interface.go +++ b/staging/src/k8s.io/client-go/informers/networking/v1beta1/interface.go @@ -24,10 +24,14 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // IPAddresses returns a IPAddressInformer. + IPAddresses() IPAddressInformer // Ingresses returns a IngressInformer. Ingresses() IngressInformer // IngressClasses returns a IngressClassInformer. IngressClasses() IngressClassInformer + // ServiceCIDRs returns a ServiceCIDRInformer. + ServiceCIDRs() ServiceCIDRInformer } type version struct { @@ -41,6 +45,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// IPAddresses returns a IPAddressInformer. +func (v *version) IPAddresses() IPAddressInformer { + return &iPAddressInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // Ingresses returns a IngressInformer. func (v *version) Ingresses() IngressInformer { return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -50,3 +59,8 @@ func (v *version) Ingresses() IngressInformer { func (v *version) IngressClasses() IngressClassInformer { return &ingressClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ServiceCIDRs returns a ServiceCIDRInformer. +func (v *version) ServiceCIDRs() ServiceCIDRInformer { + return &serviceCIDRInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/k8s.io/client-go/informers/networking/v1beta1/ipaddress.go b/staging/src/k8s.io/client-go/informers/networking/v1beta1/ipaddress.go new file mode 100644 index 00000000000..2a2dfa29079 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/networking/v1beta1/ipaddress.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + networkingv1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/networking/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// IPAddressInformer provides access to a shared informer and lister for +// IPAddresses. +type IPAddressInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.IPAddressLister +} + +type iPAddressInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewIPAddressInformer constructs a new informer for IPAddress type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewIPAddressInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredIPAddressInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredIPAddressInformer constructs a new informer for IPAddress type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredIPAddressInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1beta1().IPAddresses().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1beta1().IPAddresses().Watch(context.TODO(), options) + }, + }, + &networkingv1beta1.IPAddress{}, + resyncPeriod, + indexers, + ) +} + +func (f *iPAddressInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredIPAddressInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *iPAddressInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&networkingv1beta1.IPAddress{}, f.defaultInformer) +} + +func (f *iPAddressInformer) Lister() v1beta1.IPAddressLister { + return v1beta1.NewIPAddressLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/networking/v1beta1/servicecidr.go b/staging/src/k8s.io/client-go/informers/networking/v1beta1/servicecidr.go new file mode 100644 index 00000000000..d5a9ce0146c --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/networking/v1beta1/servicecidr.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + time "time" + + networkingv1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/networking/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// ServiceCIDRInformer provides access to a shared informer and lister for +// ServiceCIDRs. +type ServiceCIDRInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ServiceCIDRLister +} + +type serviceCIDRInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewServiceCIDRInformer constructs a new informer for ServiceCIDR type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewServiceCIDRInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredServiceCIDRInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredServiceCIDRInformer constructs a new informer for ServiceCIDR type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredServiceCIDRInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1beta1().ServiceCIDRs().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1beta1().ServiceCIDRs().Watch(context.TODO(), options) + }, + }, + &networkingv1beta1.ServiceCIDR{}, + resyncPeriod, + indexers, + ) +} + +func (f *serviceCIDRInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredServiceCIDRInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *serviceCIDRInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&networkingv1beta1.ServiceCIDR{}, f.defaultInformer) +} + +func (f *serviceCIDRInformer) Lister() v1beta1.ServiceCIDRLister { + return v1beta1.NewServiceCIDRLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ipaddress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ipaddress.go new file mode 100644 index 00000000000..d8352bb79fa --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ipaddress.go @@ -0,0 +1,151 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeIPAddresses implements IPAddressInterface +type FakeIPAddresses struct { + Fake *FakeNetworkingV1beta1 +} + +var ipaddressesResource = v1beta1.SchemeGroupVersion.WithResource("ipaddresses") + +var ipaddressesKind = v1beta1.SchemeGroupVersion.WithKind("IPAddress") + +// Get takes name of the iPAddress, and returns the corresponding iPAddress object, and an error if there is any. +func (c *FakeIPAddresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.IPAddress, err error) { + emptyResult := &v1beta1.IPAddress{} + obj, err := c.Fake. + Invokes(testing.NewRootGetActionWithOptions(ipaddressesResource, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.IPAddress), err +} + +// List takes label and field selectors, and returns the list of IPAddresses that match those selectors. +func (c *FakeIPAddresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IPAddressList, err error) { + emptyResult := &v1beta1.IPAddressList{} + obj, err := c.Fake. + Invokes(testing.NewRootListActionWithOptions(ipaddressesResource, ipaddressesKind, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.IPAddressList{ListMeta: obj.(*v1beta1.IPAddressList).ListMeta} + for _, item := range obj.(*v1beta1.IPAddressList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested iPAddresses. +func (c *FakeIPAddresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchActionWithOptions(ipaddressesResource, opts)) +} + +// Create takes the representation of a iPAddress and creates it. Returns the server's representation of the iPAddress, and an error, if there is any. +func (c *FakeIPAddresses) Create(ctx context.Context, iPAddress *v1beta1.IPAddress, opts v1.CreateOptions) (result *v1beta1.IPAddress, err error) { + emptyResult := &v1beta1.IPAddress{} + obj, err := c.Fake. + Invokes(testing.NewRootCreateActionWithOptions(ipaddressesResource, iPAddress, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.IPAddress), err +} + +// Update takes the representation of a iPAddress and updates it. Returns the server's representation of the iPAddress, and an error, if there is any. +func (c *FakeIPAddresses) Update(ctx context.Context, iPAddress *v1beta1.IPAddress, opts v1.UpdateOptions) (result *v1beta1.IPAddress, err error) { + emptyResult := &v1beta1.IPAddress{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateActionWithOptions(ipaddressesResource, iPAddress, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.IPAddress), err +} + +// Delete takes name of the iPAddress and deletes it. Returns an error if one occurs. +func (c *FakeIPAddresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(ipaddressesResource, name, opts), &v1beta1.IPAddress{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIPAddresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionActionWithOptions(ipaddressesResource, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.IPAddressList{}) + return err +} + +// Patch applies the patch and returns the patched iPAddress. +func (c *FakeIPAddresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.IPAddress, err error) { + emptyResult := &v1beta1.IPAddress{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(ipaddressesResource, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.IPAddress), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied iPAddress. +func (c *FakeIPAddresses) Apply(ctx context.Context, iPAddress *networkingv1beta1.IPAddressApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.IPAddress, err error) { + if iPAddress == nil { + return nil, fmt.Errorf("iPAddress provided to Apply must not be nil") + } + data, err := json.Marshal(iPAddress) + if err != nil { + return nil, err + } + name := iPAddress.Name + if name == nil { + return nil, fmt.Errorf("iPAddress.Name must be provided to Apply") + } + emptyResult := &v1beta1.IPAddress{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(ipaddressesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.IPAddress), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go index b8792a30646..bd72d59297c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_networking_client.go @@ -28,6 +28,10 @@ type FakeNetworkingV1beta1 struct { *testing.Fake } +func (c *FakeNetworkingV1beta1) IPAddresses() v1beta1.IPAddressInterface { + return &FakeIPAddresses{c} +} + func (c *FakeNetworkingV1beta1) Ingresses(namespace string) v1beta1.IngressInterface { return &FakeIngresses{c, namespace} } @@ -36,6 +40,10 @@ func (c *FakeNetworkingV1beta1) IngressClasses() v1beta1.IngressClassInterface { return &FakeIngressClasses{c} } +func (c *FakeNetworkingV1beta1) ServiceCIDRs() v1beta1.ServiceCIDRInterface { + return &FakeServiceCIDRs{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeNetworkingV1beta1) RESTClient() rest.Interface { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_servicecidr.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_servicecidr.go new file mode 100644 index 00000000000..0eb5b2f2bb6 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_servicecidr.go @@ -0,0 +1,186 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeServiceCIDRs implements ServiceCIDRInterface +type FakeServiceCIDRs struct { + Fake *FakeNetworkingV1beta1 +} + +var servicecidrsResource = v1beta1.SchemeGroupVersion.WithResource("servicecidrs") + +var servicecidrsKind = v1beta1.SchemeGroupVersion.WithKind("ServiceCIDR") + +// Get takes name of the serviceCIDR, and returns the corresponding serviceCIDR object, and an error if there is any. +func (c *FakeServiceCIDRs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ServiceCIDR, err error) { + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootGetActionWithOptions(servicecidrsResource, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} + +// List takes label and field selectors, and returns the list of ServiceCIDRs that match those selectors. +func (c *FakeServiceCIDRs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ServiceCIDRList, err error) { + emptyResult := &v1beta1.ServiceCIDRList{} + obj, err := c.Fake. + Invokes(testing.NewRootListActionWithOptions(servicecidrsResource, servicecidrsKind, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ServiceCIDRList{ListMeta: obj.(*v1beta1.ServiceCIDRList).ListMeta} + for _, item := range obj.(*v1beta1.ServiceCIDRList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested serviceCIDRs. +func (c *FakeServiceCIDRs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchActionWithOptions(servicecidrsResource, opts)) +} + +// Create takes the representation of a serviceCIDR and creates it. Returns the server's representation of the serviceCIDR, and an error, if there is any. +func (c *FakeServiceCIDRs) Create(ctx context.Context, serviceCIDR *v1beta1.ServiceCIDR, opts v1.CreateOptions) (result *v1beta1.ServiceCIDR, err error) { + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootCreateActionWithOptions(servicecidrsResource, serviceCIDR, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} + +// Update takes the representation of a serviceCIDR and updates it. Returns the server's representation of the serviceCIDR, and an error, if there is any. +func (c *FakeServiceCIDRs) Update(ctx context.Context, serviceCIDR *v1beta1.ServiceCIDR, opts v1.UpdateOptions) (result *v1beta1.ServiceCIDR, err error) { + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateActionWithOptions(servicecidrsResource, serviceCIDR, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeServiceCIDRs) UpdateStatus(ctx context.Context, serviceCIDR *v1beta1.ServiceCIDR, opts v1.UpdateOptions) (result *v1beta1.ServiceCIDR, err error) { + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceActionWithOptions(servicecidrsResource, "status", serviceCIDR, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} + +// Delete takes name of the serviceCIDR and deletes it. Returns an error if one occurs. +func (c *FakeServiceCIDRs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(servicecidrsResource, name, opts), &v1beta1.ServiceCIDR{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeServiceCIDRs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionActionWithOptions(servicecidrsResource, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1beta1.ServiceCIDRList{}) + return err +} + +// Patch applies the patch and returns the patched serviceCIDR. +func (c *FakeServiceCIDRs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ServiceCIDR, err error) { + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecidrsResource, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied serviceCIDR. +func (c *FakeServiceCIDRs) Apply(ctx context.Context, serviceCIDR *networkingv1beta1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ServiceCIDR, err error) { + if serviceCIDR == nil { + return nil, fmt.Errorf("serviceCIDR provided to Apply must not be nil") + } + data, err := json.Marshal(serviceCIDR) + if err != nil { + return nil, err + } + name := serviceCIDR.Name + if name == nil { + return nil, fmt.Errorf("serviceCIDR.Name must be provided to Apply") + } + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecidrsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeServiceCIDRs) ApplyStatus(ctx context.Context, serviceCIDR *networkingv1beta1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ServiceCIDR, err error) { + if serviceCIDR == nil { + return nil, fmt.Errorf("serviceCIDR provided to Apply must not be nil") + } + data, err := json.Marshal(serviceCIDR) + if err != nil { + return nil, err + } + name := serviceCIDR.Name + if name == nil { + return nil, fmt.Errorf("serviceCIDR.Name must be provided to Apply") + } + emptyResult := &v1beta1.ServiceCIDR{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecidrsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1beta1.ServiceCIDR), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go index f74c7257ad6..ac1ffbb9845 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/generated_expansion.go @@ -18,6 +18,10 @@ limitations under the License. package v1beta1 +type IPAddressExpansion interface{} + type IngressExpansion interface{} type IngressClassExpansion interface{} + +type ServiceCIDRExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ipaddress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ipaddress.go new file mode 100644 index 00000000000..09e4139e748 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ipaddress.go @@ -0,0 +1,69 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + gentype "k8s.io/client-go/gentype" + scheme "k8s.io/client-go/kubernetes/scheme" +) + +// IPAddressesGetter has a method to return a IPAddressInterface. +// A group's client should implement this interface. +type IPAddressesGetter interface { + IPAddresses() IPAddressInterface +} + +// IPAddressInterface has methods to work with IPAddress resources. +type IPAddressInterface interface { + Create(ctx context.Context, iPAddress *v1beta1.IPAddress, opts v1.CreateOptions) (*v1beta1.IPAddress, error) + Update(ctx context.Context, iPAddress *v1beta1.IPAddress, opts v1.UpdateOptions) (*v1beta1.IPAddress, 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) (*v1beta1.IPAddress, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IPAddressList, 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 *v1beta1.IPAddress, err error) + Apply(ctx context.Context, iPAddress *networkingv1beta1.IPAddressApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.IPAddress, err error) + IPAddressExpansion +} + +// iPAddresses implements IPAddressInterface +type iPAddresses struct { + *gentype.ClientWithListAndApply[*v1beta1.IPAddress, *v1beta1.IPAddressList, *networkingv1beta1.IPAddressApplyConfiguration] +} + +// newIPAddresses returns a IPAddresses +func newIPAddresses(c *NetworkingV1beta1Client) *iPAddresses { + return &iPAddresses{ + gentype.NewClientWithListAndApply[*v1beta1.IPAddress, *v1beta1.IPAddressList, *networkingv1beta1.IPAddressApplyConfiguration]( + "ipaddresses", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *v1beta1.IPAddress { return &v1beta1.IPAddress{} }, + func() *v1beta1.IPAddressList { return &v1beta1.IPAddressList{} }), + } +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go index 851634ed0f9..d35225abd84 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/networking_client.go @@ -28,8 +28,10 @@ import ( type NetworkingV1beta1Interface interface { RESTClient() rest.Interface + IPAddressesGetter IngressesGetter IngressClassesGetter + ServiceCIDRsGetter } // NetworkingV1beta1Client is used to interact with features provided by the networking.k8s.io group. @@ -37,6 +39,10 @@ type NetworkingV1beta1Client struct { restClient rest.Interface } +func (c *NetworkingV1beta1Client) IPAddresses() IPAddressInterface { + return newIPAddresses(c) +} + func (c *NetworkingV1beta1Client) Ingresses(namespace string) IngressInterface { return newIngresses(c, namespace) } @@ -45,6 +51,10 @@ func (c *NetworkingV1beta1Client) IngressClasses() IngressClassInterface { return newIngressClasses(c) } +func (c *NetworkingV1beta1Client) ServiceCIDRs() ServiceCIDRInterface { + return newServiceCIDRs(c) +} + // NewForConfig creates a new NetworkingV1beta1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/servicecidr.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/servicecidr.go new file mode 100644 index 00000000000..d3336f2ec08 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/servicecidr.go @@ -0,0 +1,73 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + + v1beta1 "k8s.io/api/networking/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" + gentype "k8s.io/client-go/gentype" + scheme "k8s.io/client-go/kubernetes/scheme" +) + +// ServiceCIDRsGetter has a method to return a ServiceCIDRInterface. +// A group's client should implement this interface. +type ServiceCIDRsGetter interface { + ServiceCIDRs() ServiceCIDRInterface +} + +// ServiceCIDRInterface has methods to work with ServiceCIDR resources. +type ServiceCIDRInterface interface { + Create(ctx context.Context, serviceCIDR *v1beta1.ServiceCIDR, opts v1.CreateOptions) (*v1beta1.ServiceCIDR, error) + Update(ctx context.Context, serviceCIDR *v1beta1.ServiceCIDR, opts v1.UpdateOptions) (*v1beta1.ServiceCIDR, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, serviceCIDR *v1beta1.ServiceCIDR, opts v1.UpdateOptions) (*v1beta1.ServiceCIDR, 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) (*v1beta1.ServiceCIDR, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ServiceCIDRList, 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 *v1beta1.ServiceCIDR, err error) + Apply(ctx context.Context, serviceCIDR *networkingv1beta1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ServiceCIDR, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, serviceCIDR *networkingv1beta1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ServiceCIDR, err error) + ServiceCIDRExpansion +} + +// serviceCIDRs implements ServiceCIDRInterface +type serviceCIDRs struct { + *gentype.ClientWithListAndApply[*v1beta1.ServiceCIDR, *v1beta1.ServiceCIDRList, *networkingv1beta1.ServiceCIDRApplyConfiguration] +} + +// newServiceCIDRs returns a ServiceCIDRs +func newServiceCIDRs(c *NetworkingV1beta1Client) *serviceCIDRs { + return &serviceCIDRs{ + gentype.NewClientWithListAndApply[*v1beta1.ServiceCIDR, *v1beta1.ServiceCIDRList, *networkingv1beta1.ServiceCIDRApplyConfiguration]( + "servicecidrs", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *v1beta1.ServiceCIDR { return &v1beta1.ServiceCIDR{} }, + func() *v1beta1.ServiceCIDRList { return &v1beta1.ServiceCIDRList{} }), + } +} diff --git a/staging/src/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go b/staging/src/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go index d8c99c186e5..320af736e69 100644 --- a/staging/src/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go +++ b/staging/src/k8s.io/client-go/listers/networking/v1beta1/expansion_generated.go @@ -18,6 +18,10 @@ limitations under the License. package v1beta1 +// IPAddressListerExpansion allows custom methods to be added to +// IPAddressLister. +type IPAddressListerExpansion interface{} + // IngressListerExpansion allows custom methods to be added to // IngressLister. type IngressListerExpansion interface{} @@ -29,3 +33,7 @@ type IngressNamespaceListerExpansion interface{} // IngressClassListerExpansion allows custom methods to be added to // IngressClassLister. type IngressClassListerExpansion interface{} + +// ServiceCIDRListerExpansion allows custom methods to be added to +// ServiceCIDRLister. +type ServiceCIDRListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/networking/v1beta1/ipaddress.go b/staging/src/k8s.io/client-go/listers/networking/v1beta1/ipaddress.go new file mode 100644 index 00000000000..36140667016 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/networking/v1beta1/ipaddress.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/networking/v1beta1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" + "k8s.io/client-go/tools/cache" +) + +// IPAddressLister helps list IPAddresses. +// All objects returned here must be treated as read-only. +type IPAddressLister interface { + // List lists all IPAddresses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.IPAddress, err error) + // Get retrieves the IPAddress from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.IPAddress, error) + IPAddressListerExpansion +} + +// iPAddressLister implements the IPAddressLister interface. +type iPAddressLister struct { + listers.ResourceIndexer[*v1beta1.IPAddress] +} + +// NewIPAddressLister returns a new IPAddressLister. +func NewIPAddressLister(indexer cache.Indexer) IPAddressLister { + return &iPAddressLister{listers.New[*v1beta1.IPAddress](indexer, v1beta1.Resource("ipaddress"))} +} diff --git a/staging/src/k8s.io/client-go/listers/networking/v1beta1/servicecidr.go b/staging/src/k8s.io/client-go/listers/networking/v1beta1/servicecidr.go new file mode 100644 index 00000000000..2902fa7f15b --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/networking/v1beta1/servicecidr.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/networking/v1beta1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" + "k8s.io/client-go/tools/cache" +) + +// ServiceCIDRLister helps list ServiceCIDRs. +// All objects returned here must be treated as read-only. +type ServiceCIDRLister interface { + // List lists all ServiceCIDRs in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1beta1.ServiceCIDR, err error) + // Get retrieves the ServiceCIDR from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1beta1.ServiceCIDR, error) + ServiceCIDRListerExpansion +} + +// serviceCIDRLister implements the ServiceCIDRLister interface. +type serviceCIDRLister struct { + listers.ResourceIndexer[*v1beta1.ServiceCIDR] +} + +// NewServiceCIDRLister returns a new ServiceCIDRLister. +func NewServiceCIDRLister(indexer cache.Indexer) ServiceCIDRLister { + return &serviceCIDRLister{listers.New[*v1beta1.ServiceCIDR](indexer, v1beta1.Resource("servicecidr"))} +}