Copy LoadBalancerStatus from core to networking

This type should never have been shared between Service and Ingress.
The `ports` field is unfortunate, but it is needed to stay compatible.

Kubernetes-commit: 0153bfad16102e42d0b0dbb56742d0a6626e4180
This commit is contained in:
Tim Hockin 2021-11-08 17:06:59 -08:00 committed by Kubernetes Publisher
parent bc6266d159
commit 3f162fe9e9
14 changed files with 642 additions and 21 deletions

View File

@ -0,0 +1,62 @@
/*
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
// IngressLoadBalancerIngressApplyConfiguration represents an declarative configuration of the IngressLoadBalancerIngress type for use
// with apply.
type IngressLoadBalancerIngressApplyConfiguration struct {
IP *string `json:"ip,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"`
}
// IngressLoadBalancerIngressApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerIngress type for use with
// apply.
func IngressLoadBalancerIngress() *IngressLoadBalancerIngressApplyConfiguration {
return &IngressLoadBalancerIngressApplyConfiguration{}
}
// WithIP sets the IP 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 IP field is set to the value of the last call.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithIP(value string) *IngressLoadBalancerIngressApplyConfiguration {
b.IP = &value
return b
}
// WithHostname sets the Hostname 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 Hostname field is set to the value of the last call.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithHostname(value string) *IngressLoadBalancerIngressApplyConfiguration {
b.Hostname = &value
return b
}
// WithPorts adds the given value to the Ports 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 Ports field.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithPorts(values ...*IngressPortStatusApplyConfiguration) *IngressLoadBalancerIngressApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPorts")
}
b.Ports = append(b.Ports, *values[i])
}
return b
}

View File

@ -0,0 +1,44 @@
/*
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
// IngressLoadBalancerStatusApplyConfiguration represents an declarative configuration of the IngressLoadBalancerStatus type for use
// with apply.
type IngressLoadBalancerStatusApplyConfiguration struct {
Ingress []IngressLoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"`
}
// IngressLoadBalancerStatusApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerStatus type for use with
// apply.
func IngressLoadBalancerStatus() *IngressLoadBalancerStatusApplyConfiguration {
return &IngressLoadBalancerStatusApplyConfiguration{}
}
// WithIngress adds the given value to the Ingress 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 Ingress field.
func (b *IngressLoadBalancerStatusApplyConfiguration) WithIngress(values ...*IngressLoadBalancerIngressApplyConfiguration) *IngressLoadBalancerStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithIngress")
}
b.Ingress = append(b.Ingress, *values[i])
}
return b
}

View File

@ -0,0 +1,61 @@
/*
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/api/core/v1"
)
// IngressPortStatusApplyConfiguration represents an declarative configuration of the IngressPortStatus type for use
// with apply.
type IngressPortStatusApplyConfiguration struct {
Port *int32 `json:"port,omitempty"`
Protocol *v1.Protocol `json:"protocol,omitempty"`
Error *string `json:"error,omitempty"`
}
// IngressPortStatusApplyConfiguration constructs an declarative configuration of the IngressPortStatus type for use with
// apply.
func IngressPortStatus() *IngressPortStatusApplyConfiguration {
return &IngressPortStatusApplyConfiguration{}
}
// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithPort(value int32) *IngressPortStatusApplyConfiguration {
b.Port = &value
return b
}
// WithProtocol sets the Protocol 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 Protocol field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithProtocol(value v1.Protocol) *IngressPortStatusApplyConfiguration {
b.Protocol = &value
return b
}
// WithError sets the Error 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 Error field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithError(value string) *IngressPortStatusApplyConfiguration {
b.Error = &value
return b
}

View File

@ -18,14 +18,10 @@ limitations under the License.
package v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// IngressStatusApplyConfiguration represents an declarative configuration of the IngressStatus type for use
// with apply.
type IngressStatusApplyConfiguration struct {
LoadBalancer *v1.LoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"`
LoadBalancer *IngressLoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"`
}
// IngressStatusApplyConfiguration constructs an declarative configuration of the IngressStatus type for use with
@ -37,7 +33,7 @@ func IngressStatus() *IngressStatusApplyConfiguration {
// WithLoadBalancer sets the LoadBalancer 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 LoadBalancer field is set to the value of the last call.
func (b *IngressStatusApplyConfiguration) WithLoadBalancer(value *v1.LoadBalancerStatusApplyConfiguration) *IngressStatusApplyConfiguration {
func (b *IngressStatusApplyConfiguration) WithLoadBalancer(value *IngressLoadBalancerStatusApplyConfiguration) *IngressStatusApplyConfiguration {
b.LoadBalancer = value
return b
}

View File

@ -7861,6 +7861,44 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
default: {}
- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress
map:
fields:
- name: hostname
type:
scalar: string
- name: ip
type:
scalar: string
- name: ports
type:
list:
elementType:
namedType: io.k8s.api.extensions.v1beta1.IngressPortStatus
elementRelationship: atomic
- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus
map:
fields:
- name: ingress
type:
list:
elementType:
namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress
elementRelationship: atomic
- name: io.k8s.api.extensions.v1beta1.IngressPortStatus
map:
fields:
- name: error
type:
scalar: string
- name: port
type:
scalar: numeric
default: 0
- name: protocol
type:
scalar: string
default: ""
- name: io.k8s.api.extensions.v1beta1.IngressRule
map:
fields:
@ -7896,7 +7934,7 @@ var schemaYAML = typed.YAMLObject(`types:
fields:
- name: loadBalancer
type:
namedType: io.k8s.api.core.v1.LoadBalancerStatus
namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus
default: {}
- name: io.k8s.api.extensions.v1beta1.IngressTLS
map:
@ -9721,6 +9759,44 @@ var schemaYAML = typed.YAMLObject(`types:
- name: parameters
type:
namedType: io.k8s.api.networking.v1.IngressClassParametersReference
- name: io.k8s.api.networking.v1.IngressLoadBalancerIngress
map:
fields:
- name: hostname
type:
scalar: string
- name: ip
type:
scalar: string
- name: ports
type:
list:
elementType:
namedType: io.k8s.api.networking.v1.IngressPortStatus
elementRelationship: atomic
- name: io.k8s.api.networking.v1.IngressLoadBalancerStatus
map:
fields:
- name: ingress
type:
list:
elementType:
namedType: io.k8s.api.networking.v1.IngressLoadBalancerIngress
elementRelationship: atomic
- name: io.k8s.api.networking.v1.IngressPortStatus
map:
fields:
- name: error
type:
scalar: string
- name: port
type:
scalar: numeric
default: 0
- name: protocol
type:
scalar: string
default: ""
- name: io.k8s.api.networking.v1.IngressRule
map:
fields:
@ -9767,7 +9843,7 @@ var schemaYAML = typed.YAMLObject(`types:
fields:
- name: loadBalancer
type:
namedType: io.k8s.api.core.v1.LoadBalancerStatus
namedType: io.k8s.api.networking.v1.IngressLoadBalancerStatus
default: {}
- name: io.k8s.api.networking.v1.IngressTLS
map:
@ -10038,6 +10114,44 @@ var schemaYAML = typed.YAMLObject(`types:
- name: parameters
type:
namedType: io.k8s.api.networking.v1beta1.IngressClassParametersReference
- name: io.k8s.api.networking.v1beta1.IngressLoadBalancerIngress
map:
fields:
- name: hostname
type:
scalar: string
- name: ip
type:
scalar: string
- name: ports
type:
list:
elementType:
namedType: io.k8s.api.networking.v1beta1.IngressPortStatus
elementRelationship: atomic
- name: io.k8s.api.networking.v1beta1.IngressLoadBalancerStatus
map:
fields:
- name: ingress
type:
list:
elementType:
namedType: io.k8s.api.networking.v1beta1.IngressLoadBalancerIngress
elementRelationship: atomic
- name: io.k8s.api.networking.v1beta1.IngressPortStatus
map:
fields:
- name: error
type:
scalar: string
- name: port
type:
scalar: numeric
default: 0
- name: protocol
type:
scalar: string
default: ""
- name: io.k8s.api.networking.v1beta1.IngressRule
map:
fields:
@ -10073,7 +10187,7 @@ var schemaYAML = typed.YAMLObject(`types:
fields:
- name: loadBalancer
type:
namedType: io.k8s.api.core.v1.LoadBalancerStatus
namedType: io.k8s.api.networking.v1beta1.IngressLoadBalancerStatus
default: {}
- name: io.k8s.api.networking.v1beta1.IngressTLS
map:

View File

@ -0,0 +1,62 @@
/*
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 v1
// IngressLoadBalancerIngressApplyConfiguration represents an declarative configuration of the IngressLoadBalancerIngress type for use
// with apply.
type IngressLoadBalancerIngressApplyConfiguration struct {
IP *string `json:"ip,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"`
}
// IngressLoadBalancerIngressApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerIngress type for use with
// apply.
func IngressLoadBalancerIngress() *IngressLoadBalancerIngressApplyConfiguration {
return &IngressLoadBalancerIngressApplyConfiguration{}
}
// WithIP sets the IP 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 IP field is set to the value of the last call.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithIP(value string) *IngressLoadBalancerIngressApplyConfiguration {
b.IP = &value
return b
}
// WithHostname sets the Hostname 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 Hostname field is set to the value of the last call.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithHostname(value string) *IngressLoadBalancerIngressApplyConfiguration {
b.Hostname = &value
return b
}
// WithPorts adds the given value to the Ports 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 Ports field.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithPorts(values ...*IngressPortStatusApplyConfiguration) *IngressLoadBalancerIngressApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPorts")
}
b.Ports = append(b.Ports, *values[i])
}
return b
}

View File

@ -0,0 +1,44 @@
/*
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 v1
// IngressLoadBalancerStatusApplyConfiguration represents an declarative configuration of the IngressLoadBalancerStatus type for use
// with apply.
type IngressLoadBalancerStatusApplyConfiguration struct {
Ingress []IngressLoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"`
}
// IngressLoadBalancerStatusApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerStatus type for use with
// apply.
func IngressLoadBalancerStatus() *IngressLoadBalancerStatusApplyConfiguration {
return &IngressLoadBalancerStatusApplyConfiguration{}
}
// WithIngress adds the given value to the Ingress 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 Ingress field.
func (b *IngressLoadBalancerStatusApplyConfiguration) WithIngress(values ...*IngressLoadBalancerIngressApplyConfiguration) *IngressLoadBalancerStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithIngress")
}
b.Ingress = append(b.Ingress, *values[i])
}
return b
}

View File

@ -0,0 +1,61 @@
/*
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 v1
import (
v1 "k8s.io/api/core/v1"
)
// IngressPortStatusApplyConfiguration represents an declarative configuration of the IngressPortStatus type for use
// with apply.
type IngressPortStatusApplyConfiguration struct {
Port *int32 `json:"port,omitempty"`
Protocol *v1.Protocol `json:"protocol,omitempty"`
Error *string `json:"error,omitempty"`
}
// IngressPortStatusApplyConfiguration constructs an declarative configuration of the IngressPortStatus type for use with
// apply.
func IngressPortStatus() *IngressPortStatusApplyConfiguration {
return &IngressPortStatusApplyConfiguration{}
}
// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithPort(value int32) *IngressPortStatusApplyConfiguration {
b.Port = &value
return b
}
// WithProtocol sets the Protocol 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 Protocol field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithProtocol(value v1.Protocol) *IngressPortStatusApplyConfiguration {
b.Protocol = &value
return b
}
// WithError sets the Error 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 Error field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithError(value string) *IngressPortStatusApplyConfiguration {
b.Error = &value
return b
}

View File

@ -18,14 +18,10 @@ limitations under the License.
package v1
import (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// IngressStatusApplyConfiguration represents an declarative configuration of the IngressStatus type for use
// with apply.
type IngressStatusApplyConfiguration struct {
LoadBalancer *v1.LoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"`
LoadBalancer *IngressLoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"`
}
// IngressStatusApplyConfiguration constructs an declarative configuration of the IngressStatus type for use with
@ -37,7 +33,7 @@ func IngressStatus() *IngressStatusApplyConfiguration {
// WithLoadBalancer sets the LoadBalancer 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 LoadBalancer field is set to the value of the last call.
func (b *IngressStatusApplyConfiguration) WithLoadBalancer(value *v1.LoadBalancerStatusApplyConfiguration) *IngressStatusApplyConfiguration {
func (b *IngressStatusApplyConfiguration) WithLoadBalancer(value *IngressLoadBalancerStatusApplyConfiguration) *IngressStatusApplyConfiguration {
b.LoadBalancer = value
return b
}

View File

@ -0,0 +1,62 @@
/*
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
// IngressLoadBalancerIngressApplyConfiguration represents an declarative configuration of the IngressLoadBalancerIngress type for use
// with apply.
type IngressLoadBalancerIngressApplyConfiguration struct {
IP *string `json:"ip,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"`
}
// IngressLoadBalancerIngressApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerIngress type for use with
// apply.
func IngressLoadBalancerIngress() *IngressLoadBalancerIngressApplyConfiguration {
return &IngressLoadBalancerIngressApplyConfiguration{}
}
// WithIP sets the IP 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 IP field is set to the value of the last call.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithIP(value string) *IngressLoadBalancerIngressApplyConfiguration {
b.IP = &value
return b
}
// WithHostname sets the Hostname 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 Hostname field is set to the value of the last call.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithHostname(value string) *IngressLoadBalancerIngressApplyConfiguration {
b.Hostname = &value
return b
}
// WithPorts adds the given value to the Ports 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 Ports field.
func (b *IngressLoadBalancerIngressApplyConfiguration) WithPorts(values ...*IngressPortStatusApplyConfiguration) *IngressLoadBalancerIngressApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPorts")
}
b.Ports = append(b.Ports, *values[i])
}
return b
}

View File

@ -0,0 +1,44 @@
/*
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
// IngressLoadBalancerStatusApplyConfiguration represents an declarative configuration of the IngressLoadBalancerStatus type for use
// with apply.
type IngressLoadBalancerStatusApplyConfiguration struct {
Ingress []IngressLoadBalancerIngressApplyConfiguration `json:"ingress,omitempty"`
}
// IngressLoadBalancerStatusApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerStatus type for use with
// apply.
func IngressLoadBalancerStatus() *IngressLoadBalancerStatusApplyConfiguration {
return &IngressLoadBalancerStatusApplyConfiguration{}
}
// WithIngress adds the given value to the Ingress 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 Ingress field.
func (b *IngressLoadBalancerStatusApplyConfiguration) WithIngress(values ...*IngressLoadBalancerIngressApplyConfiguration) *IngressLoadBalancerStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithIngress")
}
b.Ingress = append(b.Ingress, *values[i])
}
return b
}

View File

@ -0,0 +1,61 @@
/*
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/api/core/v1"
)
// IngressPortStatusApplyConfiguration represents an declarative configuration of the IngressPortStatus type for use
// with apply.
type IngressPortStatusApplyConfiguration struct {
Port *int32 `json:"port,omitempty"`
Protocol *v1.Protocol `json:"protocol,omitempty"`
Error *string `json:"error,omitempty"`
}
// IngressPortStatusApplyConfiguration constructs an declarative configuration of the IngressPortStatus type for use with
// apply.
func IngressPortStatus() *IngressPortStatusApplyConfiguration {
return &IngressPortStatusApplyConfiguration{}
}
// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithPort(value int32) *IngressPortStatusApplyConfiguration {
b.Port = &value
return b
}
// WithProtocol sets the Protocol 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 Protocol field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithProtocol(value v1.Protocol) *IngressPortStatusApplyConfiguration {
b.Protocol = &value
return b
}
// WithError sets the Error 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 Error field is set to the value of the last call.
func (b *IngressPortStatusApplyConfiguration) WithError(value string) *IngressPortStatusApplyConfiguration {
b.Error = &value
return b
}

View File

@ -18,14 +18,10 @@ limitations under the License.
package v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// IngressStatusApplyConfiguration represents an declarative configuration of the IngressStatus type for use
// with apply.
type IngressStatusApplyConfiguration struct {
LoadBalancer *v1.LoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"`
LoadBalancer *IngressLoadBalancerStatusApplyConfiguration `json:"loadBalancer,omitempty"`
}
// IngressStatusApplyConfiguration constructs an declarative configuration of the IngressStatus type for use with
@ -37,7 +33,7 @@ func IngressStatus() *IngressStatusApplyConfiguration {
// WithLoadBalancer sets the LoadBalancer 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 LoadBalancer field is set to the value of the last call.
func (b *IngressStatusApplyConfiguration) WithLoadBalancer(value *v1.LoadBalancerStatusApplyConfiguration) *IngressStatusApplyConfiguration {
func (b *IngressStatusApplyConfiguration) WithLoadBalancer(value *IngressLoadBalancerStatusApplyConfiguration) *IngressStatusApplyConfiguration {
b.LoadBalancer = value
return b
}

View File

@ -941,6 +941,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsextensionsv1beta1.IngressApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressBackend"):
return &applyconfigurationsextensionsv1beta1.IngressBackendApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressLoadBalancerIngress"):
return &applyconfigurationsextensionsv1beta1.IngressLoadBalancerIngressApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressLoadBalancerStatus"):
return &applyconfigurationsextensionsv1beta1.IngressLoadBalancerStatusApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressPortStatus"):
return &applyconfigurationsextensionsv1beta1.IngressPortStatusApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressRule"):
return &applyconfigurationsextensionsv1beta1.IngressRuleApplyConfiguration{}
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressRuleValue"):
@ -1221,6 +1227,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsnetworkingv1.IngressClassParametersReferenceApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("IngressClassSpec"):
return &applyconfigurationsnetworkingv1.IngressClassSpecApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("IngressLoadBalancerIngress"):
return &applyconfigurationsnetworkingv1.IngressLoadBalancerIngressApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("IngressLoadBalancerStatus"):
return &applyconfigurationsnetworkingv1.IngressLoadBalancerStatusApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("IngressPortStatus"):
return &applyconfigurationsnetworkingv1.IngressPortStatusApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("IngressRule"):
return &applyconfigurationsnetworkingv1.IngressRuleApplyConfiguration{}
case networkingv1.SchemeGroupVersion.WithKind("IngressRuleValue"):
@ -1273,6 +1285,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsnetworkingv1beta1.IngressClassParametersReferenceApplyConfiguration{}
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressClassSpec"):
return &applyconfigurationsnetworkingv1beta1.IngressClassSpecApplyConfiguration{}
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressLoadBalancerIngress"):
return &applyconfigurationsnetworkingv1beta1.IngressLoadBalancerIngressApplyConfiguration{}
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressLoadBalancerStatus"):
return &applyconfigurationsnetworkingv1beta1.IngressLoadBalancerStatusApplyConfiguration{}
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressPortStatus"):
return &applyconfigurationsnetworkingv1beta1.IngressPortStatusApplyConfiguration{}
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressRule"):
return &applyconfigurationsnetworkingv1beta1.IngressRuleApplyConfiguration{}
case networkingv1beta1.SchemeGroupVersion.WithKind("IngressRuleValue"):