make update with the new API with arrays

Kubernetes-commit: fee07ad6080ccd6e0e8241e10b1b0330f57c64be
This commit is contained in:
Antonio Ojea 2023-10-29 19:01:10 +00:00 committed by Kubernetes Publisher
parent 824910b3a9
commit 60aa89a1ab
2 changed files with 13 additions and 20 deletions

View File

@ -10612,12 +10612,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.networking.v1alpha1.ServiceCIDRSpec - name: io.k8s.api.networking.v1alpha1.ServiceCIDRSpec
map: map:
fields: fields:
- name: ipv4 - name: cidrs
type: type:
scalar: string list:
- name: ipv6 elementType:
type: scalar: string
scalar: string elementRelationship: atomic
- name: io.k8s.api.networking.v1alpha1.ServiceCIDRStatus - name: io.k8s.api.networking.v1alpha1.ServiceCIDRStatus
map: map:
fields: fields:

View File

@ -21,8 +21,7 @@ package v1alpha1
// ServiceCIDRSpecApplyConfiguration represents an declarative configuration of the ServiceCIDRSpec type for use // ServiceCIDRSpecApplyConfiguration represents an declarative configuration of the ServiceCIDRSpec type for use
// with apply. // with apply.
type ServiceCIDRSpecApplyConfiguration struct { type ServiceCIDRSpecApplyConfiguration struct {
IPv4 *string `json:"ipv4,omitempty"` CIDRs []string `json:"cidrs,omitempty"`
IPv6 *string `json:"ipv6,omitempty"`
} }
// ServiceCIDRSpecApplyConfiguration constructs an declarative configuration of the ServiceCIDRSpec type for use with // ServiceCIDRSpecApplyConfiguration constructs an declarative configuration of the ServiceCIDRSpec type for use with
@ -31,18 +30,12 @@ func ServiceCIDRSpec() *ServiceCIDRSpecApplyConfiguration {
return &ServiceCIDRSpecApplyConfiguration{} return &ServiceCIDRSpecApplyConfiguration{}
} }
// WithIPv4 sets the IPv4 field in the declarative configuration to the given value // WithCIDRs adds the given value to the CIDRs field in the declarative configuration
// and returns the receiver, so that objects can be built by chaining "With" function invocations. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the IPv4 field is set to the value of the last call. // If called multiple times, values provided by each call will be appended to the CIDRs field.
func (b *ServiceCIDRSpecApplyConfiguration) WithIPv4(value string) *ServiceCIDRSpecApplyConfiguration { func (b *ServiceCIDRSpecApplyConfiguration) WithCIDRs(values ...string) *ServiceCIDRSpecApplyConfiguration {
b.IPv4 = &value for i := range values {
return b b.CIDRs = append(b.CIDRs, values[i])
} }
// WithIPv6 sets the IPv6 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 IPv6 field is set to the value of the last call.
func (b *ServiceCIDRSpecApplyConfiguration) WithIPv6(value string) *ServiceCIDRSpecApplyConfiguration {
b.IPv6 = &value
return b return b
} }