Merge pull request #98277 from XudongLiuHarold/add-loadbalancerclass-field

Add LoadBalancerClass field in service

Kubernetes-commit: 66cbf0196bd5ed0f06d7c40fccba887aae5405d8
This commit is contained in:
Kubernetes Publisher 2021-03-04 23:56:21 -08:00
commit fcacc4b270
4 changed files with 13 additions and 4 deletions

2
Godeps/Godeps.json generated
View File

@ -472,7 +472,7 @@
},
{
"ImportPath": "k8s.io/api",
"Rev": "85a11c396cac"
"Rev": "264a74a451ef"
},
{
"ImportPath": "k8s.io/apimachinery",

View File

@ -43,6 +43,7 @@ type ServiceSpecApplyConfiguration struct {
IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"`
IPFamilyPolicy *corev1.IPFamilyPolicyType `json:"ipFamilyPolicy,omitempty"`
AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty"`
LoadBalancerClass *string `json:"loadBalancerClass,omitempty"`
}
// ServiceSpecApplyConfiguration constructs an declarative configuration of the ServiceSpec type for use with
@ -215,3 +216,11 @@ func (b *ServiceSpecApplyConfiguration) WithAllocateLoadBalancerNodePorts(value
b.AllocateLoadBalancerNodePorts = &value
return b
}
// WithLoadBalancerClass sets the LoadBalancerClass 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 LoadBalancerClass field is set to the value of the last call.
func (b *ServiceSpecApplyConfiguration) WithLoadBalancerClass(value string) *ServiceSpecApplyConfiguration {
b.LoadBalancerClass = &value
return b
}

4
go.mod
View File

@ -27,7 +27,7 @@ require (
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
k8s.io/api v0.0.0-20210305063021-85a11c396cac
k8s.io/api v0.0.0-20210305132010-264a74a451ef
k8s.io/apimachinery v0.0.0-20210304154449-569bd20062c9
k8s.io/klog/v2 v2.5.0
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
@ -35,6 +35,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20210305063021-85a11c396cac
k8s.io/api => k8s.io/api v0.0.0-20210305132010-264a74a451ef
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210304154449-569bd20062c9
)

2
go.sum
View File

@ -427,7 +427,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20210305063021-85a11c396cac/go.mod h1:HGMdyFJB+72iMWQoS/EwpAtVFz79M8RyBuDE09jjiUM=
k8s.io/api v0.0.0-20210305132010-264a74a451ef/go.mod h1:HGMdyFJB+72iMWQoS/EwpAtVFz79M8RyBuDE09jjiUM=
k8s.io/apimachinery v0.0.0-20210304154449-569bd20062c9/go.mod h1:+s3G/nGQJY9oe1CFOXRrb9QkXTIEgTnFtF8GeKZIgOg=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=