mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-23 21:57:30 +00:00
Merge pull request #125021 from aojea/servicecidrbeta
KEP-1880 Multiple Service CIDRs: Graduate to Beta (2/2) Kubernetes-commit: 93d56511e684369479f23aae15617e483cda5719
This commit is contained in:
commit
ab86e03da4
@ -11078,6 +11078,29 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
elementType:
|
elementType:
|
||||||
namedType: io.k8s.api.networking.v1beta1.HTTPIngressPath
|
namedType: io.k8s.api.networking.v1beta1.HTTPIngressPath
|
||||||
elementRelationship: atomic
|
elementRelationship: atomic
|
||||||
|
- name: io.k8s.api.networking.v1beta1.IPAddress
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: apiVersion
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: kind
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: metadata
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||||
|
default: {}
|
||||||
|
- name: spec
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.networking.v1beta1.IPAddressSpec
|
||||||
|
default: {}
|
||||||
|
- name: io.k8s.api.networking.v1beta1.IPAddressSpec
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: parentRef
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.networking.v1beta1.ParentReference
|
||||||
- name: io.k8s.api.networking.v1beta1.Ingress
|
- name: io.k8s.api.networking.v1beta1.Ingress
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -11244,6 +11267,62 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: secretName
|
- name: secretName
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
|
- name: io.k8s.api.networking.v1beta1.ParentReference
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: group
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: name
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: namespace
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: resource
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: io.k8s.api.networking.v1beta1.ServiceCIDR
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: apiVersion
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: kind
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
- name: metadata
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||||
|
default: {}
|
||||||
|
- name: spec
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.networking.v1beta1.ServiceCIDRSpec
|
||||||
|
default: {}
|
||||||
|
- name: status
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.networking.v1beta1.ServiceCIDRStatus
|
||||||
|
default: {}
|
||||||
|
- name: io.k8s.api.networking.v1beta1.ServiceCIDRSpec
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: cidrs
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
scalar: string
|
||||||
|
elementRelationship: atomic
|
||||||
|
- name: io.k8s.api.networking.v1beta1.ServiceCIDRStatus
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: conditions
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
||||||
|
elementRelationship: associative
|
||||||
|
keys:
|
||||||
|
- type
|
||||||
- name: io.k8s.api.node.v1.Overhead
|
- name: io.k8s.api.node.v1.Overhead
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
|
253
applyconfigurations/networking/v1beta1/ipaddress.go
Normal file
253
applyconfigurations/networking/v1beta1/ipaddress.go
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IPAddressApplyConfiguration represents a declarative configuration of the IPAddress type for use
|
||||||
|
// with apply.
|
||||||
|
type IPAddressApplyConfiguration struct {
|
||||||
|
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||||
|
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||||
|
Spec *IPAddressSpecApplyConfiguration `json:"spec,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// IPAddress constructs a declarative configuration of the IPAddress type for use with
|
||||||
|
// apply.
|
||||||
|
func IPAddress(name string) *IPAddressApplyConfiguration {
|
||||||
|
b := &IPAddressApplyConfiguration{}
|
||||||
|
b.WithName(name)
|
||||||
|
b.WithKind("IPAddress")
|
||||||
|
b.WithAPIVersion("networking.k8s.io/v1beta1")
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExtractIPAddress extracts the applied configuration owned by fieldManager from
|
||||||
|
// iPAddress. If no managedFields are found in iPAddress for fieldManager, a
|
||||||
|
// IPAddressApplyConfiguration 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.
|
||||||
|
// iPAddress must be a unmodified IPAddress API object that was retrieved from the Kubernetes API.
|
||||||
|
// ExtractIPAddress 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 ExtractIPAddress(iPAddress *networkingv1beta1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) {
|
||||||
|
return extractIPAddress(iPAddress, fieldManager, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExtractIPAddressStatus is the same as ExtractIPAddress except
|
||||||
|
// that it extracts the status subresource applied configuration.
|
||||||
|
// Experimental!
|
||||||
|
func ExtractIPAddressStatus(iPAddress *networkingv1beta1.IPAddress, fieldManager string) (*IPAddressApplyConfiguration, error) {
|
||||||
|
return extractIPAddress(iPAddress, fieldManager, "status")
|
||||||
|
}
|
||||||
|
|
||||||
|
func extractIPAddress(iPAddress *networkingv1beta1.IPAddress, fieldManager string, subresource string) (*IPAddressApplyConfiguration, error) {
|
||||||
|
b := &IPAddressApplyConfiguration{}
|
||||||
|
err := managedfields.ExtractInto(iPAddress, internal.Parser().Type("io.k8s.api.networking.v1beta1.IPAddress"), fieldManager, b, subresource)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
b.WithName(iPAddress.Name)
|
||||||
|
|
||||||
|
b.WithKind("IPAddress")
|
||||||
|
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 *IPAddressApplyConfiguration) WithKind(value string) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithAPIVersion(value string) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithName(value string) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithGenerateName(value string) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithNamespace(value string) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithUID(value types.UID) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithResourceVersion(value string) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithGeneration(value int64) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithCreationTimestamp(value metav1.Time) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IPAddressApplyConfiguration {
|
||||||
|
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 *IPAddressApplyConfiguration) WithLabels(entries map[string]string) *IPAddressApplyConfiguration {
|
||||||
|
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 *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
|
||||||
|
}
|
39
applyconfigurations/networking/v1beta1/ipaddressspec.go
Normal file
39
applyconfigurations/networking/v1beta1/ipaddressspec.go
Normal file
@ -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
|
||||||
|
}
|
66
applyconfigurations/networking/v1beta1/parentreference.go
Normal file
66
applyconfigurations/networking/v1beta1/parentreference.go
Normal file
@ -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
|
||||||
|
}
|
262
applyconfigurations/networking/v1beta1/servicecidr.go
Normal file
262
applyconfigurations/networking/v1beta1/servicecidr.go
Normal file
@ -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
|
||||||
|
}
|
41
applyconfigurations/networking/v1beta1/servicecidrspec.go
Normal file
41
applyconfigurations/networking/v1beta1/servicecidrspec.go
Normal file
@ -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
|
||||||
|
}
|
48
applyconfigurations/networking/v1beta1/servicecidrstatus.go
Normal file
48
applyconfigurations/networking/v1beta1/servicecidrstatus.go
Normal file
@ -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
|
||||||
|
}
|
@ -1436,6 +1436,18 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsnetworkingv1beta1.IngressStatusApplyConfiguration{}
|
return &applyconfigurationsnetworkingv1beta1.IngressStatusApplyConfiguration{}
|
||||||
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressTLS"):
|
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressTLS"):
|
||||||
return &applyconfigurationsnetworkingv1beta1.IngressTLSApplyConfiguration{}
|
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
|
// Group=node.k8s.io, Version=v1
|
||||||
case nodev1.SchemeGroupVersion.WithKind("Overhead"):
|
case nodev1.SchemeGroupVersion.WithKind("Overhead"):
|
||||||
|
2
go.mod
2
go.mod
@ -25,7 +25,7 @@ require (
|
|||||||
golang.org/x/time v0.3.0
|
golang.org/x/time v0.3.0
|
||||||
google.golang.org/protobuf v1.34.2
|
google.golang.org/protobuf v1.34.2
|
||||||
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
||||||
k8s.io/api v0.0.0-20240628222225-f41eb5f7ad05
|
k8s.io/api v0.0.0-20240630182222-e7b4471d3970
|
||||||
k8s.io/apimachinery v0.0.0-20240628175805-ef4453d2613f
|
k8s.io/apimachinery v0.0.0-20240628175805-ef4453d2613f
|
||||||
k8s.io/klog/v2 v2.130.1
|
k8s.io/klog/v2 v2.130.1
|
||||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
|
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
|
||||||
|
4
go.sum
4
go.sum
@ -156,8 +156,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/api v0.0.0-20240628222225-f41eb5f7ad05 h1:mcvOEQvPirRVZywSfyFReEnPiYOkuYwKIEoVojdrY0A=
|
k8s.io/api v0.0.0-20240630182222-e7b4471d3970 h1:rml67zMN0uvq6wSHy0DeI6jGjOm/saaA8kIKY1kIOmY=
|
||||||
k8s.io/api v0.0.0-20240628222225-f41eb5f7ad05/go.mod h1:4FMNrXJxgv377lr0HMOJOqwqiNREPvoveZYRveA//xU=
|
k8s.io/api v0.0.0-20240630182222-e7b4471d3970/go.mod h1:4FMNrXJxgv377lr0HMOJOqwqiNREPvoveZYRveA//xU=
|
||||||
k8s.io/apimachinery v0.0.0-20240628175805-ef4453d2613f h1:LFzF3OPvEFldgFy9gpdsniTeVpaOCkjl38RVt9o7YkY=
|
k8s.io/apimachinery v0.0.0-20240628175805-ef4453d2613f h1:LFzF3OPvEFldgFy9gpdsniTeVpaOCkjl38RVt9o7YkY=
|
||||||
k8s.io/apimachinery v0.0.0-20240628175805-ef4453d2613f/go.mod h1:HaB7jl7MnnH0C8g+t13Fw226p3U88ZDog/Dt8pQRZUI=
|
k8s.io/apimachinery v0.0.0-20240628175805-ef4453d2613f/go.mod h1:HaB7jl7MnnH0C8g+t13Fw226p3U88ZDog/Dt8pQRZUI=
|
||||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||||
|
@ -307,10 +307,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ServiceCIDRs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ServiceCIDRs().Informer()}, nil
|
||||||
|
|
||||||
// Group=networking.k8s.io, Version=v1beta1
|
// 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"):
|
case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil
|
||||||
case networkingv1beta1.SchemeGroupVersion.WithResource("ingressclasses"):
|
case networkingv1beta1.SchemeGroupVersion.WithResource("ingressclasses"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IngressClasses().Informer()}, nil
|
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
|
// Group=node.k8s.io, Version=v1
|
||||||
case nodev1.SchemeGroupVersion.WithResource("runtimeclasses"):
|
case nodev1.SchemeGroupVersion.WithResource("runtimeclasses"):
|
||||||
|
@ -24,10 +24,14 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
// Interface provides access to all the informers in this group version.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
|
// IPAddresses returns a IPAddressInformer.
|
||||||
|
IPAddresses() IPAddressInformer
|
||||||
// Ingresses returns a IngressInformer.
|
// Ingresses returns a IngressInformer.
|
||||||
Ingresses() IngressInformer
|
Ingresses() IngressInformer
|
||||||
// IngressClasses returns a IngressClassInformer.
|
// IngressClasses returns a IngressClassInformer.
|
||||||
IngressClasses() IngressClassInformer
|
IngressClasses() IngressClassInformer
|
||||||
|
// ServiceCIDRs returns a ServiceCIDRInformer.
|
||||||
|
ServiceCIDRs() ServiceCIDRInformer
|
||||||
}
|
}
|
||||||
|
|
||||||
type version struct {
|
type version struct {
|
||||||
@ -41,6 +45,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
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.
|
// Ingresses returns a IngressInformer.
|
||||||
func (v *version) Ingresses() IngressInformer {
|
func (v *version) Ingresses() IngressInformer {
|
||||||
return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
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 {
|
func (v *version) IngressClasses() IngressClassInformer {
|
||||||
return &ingressClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
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}
|
||||||
|
}
|
||||||
|
89
informers/networking/v1beta1/ipaddress.go
Normal file
89
informers/networking/v1beta1/ipaddress.go
Normal file
@ -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())
|
||||||
|
}
|
89
informers/networking/v1beta1/servicecidr.go
Normal file
89
informers/networking/v1beta1/servicecidr.go
Normal file
@ -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())
|
||||||
|
}
|
151
kubernetes/typed/networking/v1beta1/fake/fake_ipaddress.go
Normal file
151
kubernetes/typed/networking/v1beta1/fake/fake_ipaddress.go
Normal file
@ -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
|
||||||
|
}
|
@ -28,6 +28,10 @@ type FakeNetworkingV1beta1 struct {
|
|||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeNetworkingV1beta1) IPAddresses() v1beta1.IPAddressInterface {
|
||||||
|
return &FakeIPAddresses{c}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *FakeNetworkingV1beta1) Ingresses(namespace string) v1beta1.IngressInterface {
|
func (c *FakeNetworkingV1beta1) Ingresses(namespace string) v1beta1.IngressInterface {
|
||||||
return &FakeIngresses{c, namespace}
|
return &FakeIngresses{c, namespace}
|
||||||
}
|
}
|
||||||
@ -36,6 +40,10 @@ func (c *FakeNetworkingV1beta1) IngressClasses() v1beta1.IngressClassInterface {
|
|||||||
return &FakeIngressClasses{c}
|
return &FakeIngressClasses{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeNetworkingV1beta1) ServiceCIDRs() v1beta1.ServiceCIDRInterface {
|
||||||
|
return &FakeServiceCIDRs{c}
|
||||||
|
}
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeNetworkingV1beta1) RESTClient() rest.Interface {
|
func (c *FakeNetworkingV1beta1) RESTClient() rest.Interface {
|
||||||
|
186
kubernetes/typed/networking/v1beta1/fake/fake_servicecidr.go
Normal file
186
kubernetes/typed/networking/v1beta1/fake/fake_servicecidr.go
Normal file
@ -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
|
||||||
|
}
|
@ -18,6 +18,10 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
|
type IPAddressExpansion interface{}
|
||||||
|
|
||||||
type IngressExpansion interface{}
|
type IngressExpansion interface{}
|
||||||
|
|
||||||
type IngressClassExpansion interface{}
|
type IngressClassExpansion interface{}
|
||||||
|
|
||||||
|
type ServiceCIDRExpansion interface{}
|
||||||
|
69
kubernetes/typed/networking/v1beta1/ipaddress.go
Normal file
69
kubernetes/typed/networking/v1beta1/ipaddress.go
Normal file
@ -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{} }),
|
||||||
|
}
|
||||||
|
}
|
@ -28,8 +28,10 @@ import (
|
|||||||
|
|
||||||
type NetworkingV1beta1Interface interface {
|
type NetworkingV1beta1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
|
IPAddressesGetter
|
||||||
IngressesGetter
|
IngressesGetter
|
||||||
IngressClassesGetter
|
IngressClassesGetter
|
||||||
|
ServiceCIDRsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
// NetworkingV1beta1Client is used to interact with features provided by the networking.k8s.io group.
|
// NetworkingV1beta1Client is used to interact with features provided by the networking.k8s.io group.
|
||||||
@ -37,6 +39,10 @@ type NetworkingV1beta1Client struct {
|
|||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *NetworkingV1beta1Client) IPAddresses() IPAddressInterface {
|
||||||
|
return newIPAddresses(c)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *NetworkingV1beta1Client) Ingresses(namespace string) IngressInterface {
|
func (c *NetworkingV1beta1Client) Ingresses(namespace string) IngressInterface {
|
||||||
return newIngresses(c, namespace)
|
return newIngresses(c, namespace)
|
||||||
}
|
}
|
||||||
@ -45,6 +51,10 @@ func (c *NetworkingV1beta1Client) IngressClasses() IngressClassInterface {
|
|||||||
return newIngressClasses(c)
|
return newIngressClasses(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *NetworkingV1beta1Client) ServiceCIDRs() ServiceCIDRInterface {
|
||||||
|
return newServiceCIDRs(c)
|
||||||
|
}
|
||||||
|
|
||||||
// NewForConfig creates a new NetworkingV1beta1Client for the given config.
|
// NewForConfig creates a new NetworkingV1beta1Client for the given config.
|
||||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||||
|
73
kubernetes/typed/networking/v1beta1/servicecidr.go
Normal file
73
kubernetes/typed/networking/v1beta1/servicecidr.go
Normal file
@ -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{} }),
|
||||||
|
}
|
||||||
|
}
|
@ -18,6 +18,10 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
|
// IPAddressListerExpansion allows custom methods to be added to
|
||||||
|
// IPAddressLister.
|
||||||
|
type IPAddressListerExpansion interface{}
|
||||||
|
|
||||||
// IngressListerExpansion allows custom methods to be added to
|
// IngressListerExpansion allows custom methods to be added to
|
||||||
// IngressLister.
|
// IngressLister.
|
||||||
type IngressListerExpansion interface{}
|
type IngressListerExpansion interface{}
|
||||||
@ -29,3 +33,7 @@ type IngressNamespaceListerExpansion interface{}
|
|||||||
// IngressClassListerExpansion allows custom methods to be added to
|
// IngressClassListerExpansion allows custom methods to be added to
|
||||||
// IngressClassLister.
|
// IngressClassLister.
|
||||||
type IngressClassListerExpansion interface{}
|
type IngressClassListerExpansion interface{}
|
||||||
|
|
||||||
|
// ServiceCIDRListerExpansion allows custom methods to be added to
|
||||||
|
// ServiceCIDRLister.
|
||||||
|
type ServiceCIDRListerExpansion interface{}
|
||||||
|
48
listers/networking/v1beta1/ipaddress.go
Normal file
48
listers/networking/v1beta1/ipaddress.go
Normal file
@ -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"))}
|
||||||
|
}
|
48
listers/networking/v1beta1/servicecidr.go
Normal file
48
listers/networking/v1beta1/servicecidr.go
Normal file
@ -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"))}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user