Merge pull request #119937 from RyanAoh/kep-1860-dev

Make Kubernetes aware of the LoadBalancer behaviour

Kubernetes-commit: ee265c92fec40cd69d1de010b477717e4c142492
This commit is contained in:
Kubernetes Publisher 2023-08-17 14:00:28 -07:00
commit 9c6b659a97
4 changed files with 20 additions and 4 deletions

View File

@ -18,11 +18,16 @@ limitations under the License.
package v1
import (
v1 "k8s.io/api/core/v1"
)
// LoadBalancerIngressApplyConfiguration represents an declarative configuration of the LoadBalancerIngress type for use
// with apply.
type LoadBalancerIngressApplyConfiguration struct {
IP *string `json:"ip,omitempty"`
Hostname *string `json:"hostname,omitempty"`
IPMode *v1.LoadBalancerIPMode `json:"ipMode,omitempty"`
Ports []PortStatusApplyConfiguration `json:"ports,omitempty"`
}
@ -48,6 +53,14 @@ func (b *LoadBalancerIngressApplyConfiguration) WithHostname(value string) *Load
return b
}
// WithIPMode sets the IPMode 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 IPMode field is set to the value of the last call.
func (b *LoadBalancerIngressApplyConfiguration) WithIPMode(value v1.LoadBalancerIPMode) *LoadBalancerIngressApplyConfiguration {
b.IPMode = &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.

View File

@ -5567,6 +5567,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: ip
type:
scalar: string
- name: ipMode
type:
scalar: string
- name: ports
type:
list:

4
go.mod
View File

@ -23,7 +23,7 @@ require (
golang.org/x/term v0.10.0
golang.org/x/time v0.3.0
google.golang.org/protobuf v1.30.0
k8s.io/api v0.0.0-20230817195626-f130bde80d7f
k8s.io/api v0.0.0-20230817235229-faa8535f5abf
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
k8s.io/klog/v2 v2.100.1
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
@ -60,6 +60,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20230817195626-f130bde80d7f
k8s.io/api => k8s.io/api v0.0.0-20230817235229-faa8535f5abf
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
)

4
go.sum
View File

@ -146,8 +146,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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20230817195626-f130bde80d7f h1:RK3CMHCVGicJ+7BXl5XtfPXnO3S2OSWYoiHQUSivBOM=
k8s.io/api v0.0.0-20230817195626-f130bde80d7f/go.mod h1:GT9MF3sI/KGC+k3nmiQ+++vvUhyZtGX3GHeDSaF2kT0=
k8s.io/api v0.0.0-20230817235229-faa8535f5abf h1:hwokl+hRy/h2wCOeO0W4teqklM+RInZhE6fC3cfL8sQ=
k8s.io/api v0.0.0-20230817235229-faa8535f5abf/go.mod h1:GT9MF3sI/KGC+k3nmiQ+++vvUhyZtGX3GHeDSaF2kT0=
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe h1:UjWeb1lUhxUf0Ryph1r1hz+pENt060neKZ+P3gKWrDc=
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=