mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 14:41:53 +00:00
Autogenerated files
Kubernetes-commit: 12b6c2b8792f375460c94f59c9bffe39895df37f
This commit is contained in:
parent
3c049628f8
commit
f3b79c3323
@ -2453,6 +2453,16 @@ const (
|
||||
ServiceTypeExternalName ServiceType = "ExternalName"
|
||||
)
|
||||
|
||||
// Service External Traffic Policy Type string
|
||||
type ServiceExternalTrafficPolicyType string
|
||||
|
||||
const (
|
||||
// ServiceExternalTrafficPolicyTypeLocal specifies local endpoints behavior.
|
||||
ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local"
|
||||
// ServiceExternalTrafficPolicyTypeGlobal specifies global (legacy) behavior.
|
||||
ServiceExternalTrafficPolicyTypeGlobal ServiceExternalTrafficPolicyType = "Global"
|
||||
)
|
||||
|
||||
// ServiceStatus represents the current status of a service
|
||||
type ServiceStatus struct {
|
||||
// LoadBalancer contains the current status of the load-balancer,
|
||||
@ -2552,6 +2562,20 @@ type ServiceSpec struct {
|
||||
// cloud-provider does not support the feature."
|
||||
// +optional
|
||||
LoadBalancerSourceRanges []string
|
||||
|
||||
// externalTrafficPolicy denotes if this Service desires to route external traffic to
|
||||
// local endpoints only. This preserves Source IP and avoids a second hop for
|
||||
// LoadBalancer and Nodeport type services.
|
||||
// +optional
|
||||
ExternalTrafficPolicy ServiceExternalTrafficPolicyType
|
||||
|
||||
// healthCheckNodePort specifies the healthcheck nodePort for the service.
|
||||
// If not specified, HealthCheckNodePort is created by the service api
|
||||
// backend with the allocated nodePort. Will use user-specified nodePort value
|
||||
// if specified by the client. Only effects when Type is set to LoadBalancer
|
||||
// and ExternalTrafficPolicy is set to Local.
|
||||
// +optional
|
||||
HealthCheckNodePort int32
|
||||
}
|
||||
|
||||
type ServicePort struct {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3697,6 +3697,20 @@ message ServiceSpec {
|
||||
// Must be a valid DNS name and requires Type to be ExternalName.
|
||||
// +optional
|
||||
optional string externalName = 10;
|
||||
|
||||
// externalTrafficPolicy denotes if this Service desires to route external traffic to
|
||||
// local endpoints only. This preserves Source IP and avoids a second hop for
|
||||
// LoadBalancer and Nodeport type services.
|
||||
// +optional
|
||||
optional string externalTrafficPolicy = 11;
|
||||
|
||||
// healthCheckNodePort specifies the healthcheck nodePort for the service.
|
||||
// If not specified, HealthCheckNodePort is created by the service api
|
||||
// backend with the allocated nodePort. Will use user-specified nodePort value
|
||||
// if specified by the client. Only effects when Type is set to LoadBalancer
|
||||
// and ExternalTrafficPolicy is set to Local.
|
||||
// +optional
|
||||
optional int32 healthCheckNodePort = 12;
|
||||
}
|
||||
|
||||
// ServiceStatus represents the current status of a service.
|
||||
|
@ -41195,6 +41195,32 @@ func (x *ServiceType) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
}
|
||||
}
|
||||
|
||||
func (x ServiceExternalTrafficPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
_, _, _ = h, z, r
|
||||
yym1 := z.EncBinary()
|
||||
_ = yym1
|
||||
if false {
|
||||
} else if z.HasExtensions() && z.EncExt(x) {
|
||||
} else {
|
||||
r.EncodeString(codecSelferC_UTF81234, string(x))
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ServiceExternalTrafficPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
yym1 := z.DecBinary()
|
||||
_ = yym1
|
||||
if false {
|
||||
} else if z.HasExtensions() && z.DecExt(x) {
|
||||
} else {
|
||||
*((*string)(x)) = r.DecodeString()
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperEncoder(e)
|
||||
@ -41802,7 +41828,7 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
} else {
|
||||
yysep2 := !z.EncBinary()
|
||||
yy2arr2 := z.EncBasicHandle().StructToArray
|
||||
var yyq2 [9]bool
|
||||
var yyq2 [11]bool
|
||||
_, _, _ = yysep2, yyq2, yy2arr2
|
||||
const yyr2 bool = false
|
||||
yyq2[0] = len(x.Ports) != 0
|
||||
@ -41814,9 +41840,11 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
yyq2[6] = x.LoadBalancerIP != ""
|
||||
yyq2[7] = len(x.LoadBalancerSourceRanges) != 0
|
||||
yyq2[8] = x.ExternalName != ""
|
||||
yyq2[9] = x.ExternalTrafficPolicy != ""
|
||||
yyq2[10] = x.HealthCheckNodePort != 0
|
||||
var yynn2 int
|
||||
if yyr2 || yy2arr2 {
|
||||
r.EncodeArrayStart(9)
|
||||
r.EncodeArrayStart(11)
|
||||
} else {
|
||||
yynn2 = 0
|
||||
for _, b := range yyq2 {
|
||||
@ -42064,6 +42092,46 @@ func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if yyr2 || yy2arr2 {
|
||||
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if yyq2[9] {
|
||||
x.ExternalTrafficPolicy.CodecEncodeSelf(e)
|
||||
} else {
|
||||
r.EncodeString(codecSelferC_UTF81234, "")
|
||||
}
|
||||
} else {
|
||||
if yyq2[9] {
|
||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||
r.EncodeString(codecSelferC_UTF81234, string("externalTrafficPolicy"))
|
||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||
x.ExternalTrafficPolicy.CodecEncodeSelf(e)
|
||||
}
|
||||
}
|
||||
if yyr2 || yy2arr2 {
|
||||
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if yyq2[10] {
|
||||
yym34 := z.EncBinary()
|
||||
_ = yym34
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeInt(int64(x.HealthCheckNodePort))
|
||||
}
|
||||
} else {
|
||||
r.EncodeInt(0)
|
||||
}
|
||||
} else {
|
||||
if yyq2[10] {
|
||||
z.EncSendContainerState(codecSelfer_containerMapKey1234)
|
||||
r.EncodeString(codecSelferC_UTF81234, string("healthCheckNodePort"))
|
||||
z.EncSendContainerState(codecSelfer_containerMapValue1234)
|
||||
yym35 := z.EncBinary()
|
||||
_ = yym35
|
||||
if false {
|
||||
} else {
|
||||
r.EncodeInt(int64(x.HealthCheckNodePort))
|
||||
}
|
||||
}
|
||||
}
|
||||
if yyr2 || yy2arr2 {
|
||||
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
} else {
|
||||
@ -42223,6 +42291,25 @@ func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
||||
*((*string)(yyv18)) = r.DecodeString()
|
||||
}
|
||||
}
|
||||
case "externalTrafficPolicy":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.ExternalTrafficPolicy = ""
|
||||
} else {
|
||||
yyv20 := &x.ExternalTrafficPolicy
|
||||
yyv20.CodecDecodeSelf(d)
|
||||
}
|
||||
case "healthCheckNodePort":
|
||||
if r.TryDecodeAsNil() {
|
||||
x.HealthCheckNodePort = 0
|
||||
} else {
|
||||
yyv21 := &x.HealthCheckNodePort
|
||||
yym22 := z.DecBinary()
|
||||
_ = yym22
|
||||
if false {
|
||||
} else {
|
||||
*((*int32)(yyv21)) = int32(r.DecodeInt(32))
|
||||
}
|
||||
}
|
||||
default:
|
||||
z.DecStructFieldNotFound(-1, yys3)
|
||||
} // end switch yys3
|
||||
@ -42234,16 +42321,16 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
var h codecSelfer1234
|
||||
z, r := codec1978.GenHelperDecoder(d)
|
||||
_, _, _ = h, z, r
|
||||
var yyj20 int
|
||||
var yyb20 bool
|
||||
var yyhl20 bool = l >= 0
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
var yyj23 int
|
||||
var yyb23 bool
|
||||
var yyhl23 bool = l >= 0
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42251,21 +42338,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Ports = nil
|
||||
} else {
|
||||
yyv21 := &x.Ports
|
||||
yym22 := z.DecBinary()
|
||||
_ = yym22
|
||||
yyv24 := &x.Ports
|
||||
yym25 := z.DecBinary()
|
||||
_ = yym25
|
||||
if false {
|
||||
} else {
|
||||
h.decSliceServicePort((*[]ServicePort)(yyv21), d)
|
||||
h.decSliceServicePort((*[]ServicePort)(yyv24), d)
|
||||
}
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42273,21 +42360,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Selector = nil
|
||||
} else {
|
||||
yyv23 := &x.Selector
|
||||
yym24 := z.DecBinary()
|
||||
_ = yym24
|
||||
yyv26 := &x.Selector
|
||||
yym27 := z.DecBinary()
|
||||
_ = yym27
|
||||
if false {
|
||||
} else {
|
||||
z.F.DecMapStringStringX(yyv23, false, d)
|
||||
z.F.DecMapStringStringX(yyv26, false, d)
|
||||
}
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42295,21 +42382,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.ClusterIP = ""
|
||||
} else {
|
||||
yyv25 := &x.ClusterIP
|
||||
yym26 := z.DecBinary()
|
||||
_ = yym26
|
||||
yyv28 := &x.ClusterIP
|
||||
yym29 := z.DecBinary()
|
||||
_ = yym29
|
||||
if false {
|
||||
} else {
|
||||
*((*string)(yyv25)) = r.DecodeString()
|
||||
*((*string)(yyv28)) = r.DecodeString()
|
||||
}
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42317,16 +42404,16 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.Type = ""
|
||||
} else {
|
||||
yyv27 := &x.Type
|
||||
yyv27.CodecDecodeSelf(d)
|
||||
yyv30 := &x.Type
|
||||
yyv30.CodecDecodeSelf(d)
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42334,21 +42421,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.ExternalIPs = nil
|
||||
} else {
|
||||
yyv28 := &x.ExternalIPs
|
||||
yym29 := z.DecBinary()
|
||||
_ = yym29
|
||||
yyv31 := &x.ExternalIPs
|
||||
yym32 := z.DecBinary()
|
||||
_ = yym32
|
||||
if false {
|
||||
} else {
|
||||
z.F.DecSliceStringX(yyv28, false, d)
|
||||
z.F.DecSliceStringX(yyv31, false, d)
|
||||
}
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42356,16 +42443,16 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.SessionAffinity = ""
|
||||
} else {
|
||||
yyv30 := &x.SessionAffinity
|
||||
yyv30.CodecDecodeSelf(d)
|
||||
yyv33 := &x.SessionAffinity
|
||||
yyv33.CodecDecodeSelf(d)
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42373,21 +42460,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.LoadBalancerIP = ""
|
||||
} else {
|
||||
yyv31 := &x.LoadBalancerIP
|
||||
yym32 := z.DecBinary()
|
||||
_ = yym32
|
||||
yyv34 := &x.LoadBalancerIP
|
||||
yym35 := z.DecBinary()
|
||||
_ = yym35
|
||||
if false {
|
||||
} else {
|
||||
*((*string)(yyv31)) = r.DecodeString()
|
||||
*((*string)(yyv34)) = r.DecodeString()
|
||||
}
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42395,21 +42482,21 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.LoadBalancerSourceRanges = nil
|
||||
} else {
|
||||
yyv33 := &x.LoadBalancerSourceRanges
|
||||
yym34 := z.DecBinary()
|
||||
_ = yym34
|
||||
yyv36 := &x.LoadBalancerSourceRanges
|
||||
yym37 := z.DecBinary()
|
||||
_ = yym37
|
||||
if false {
|
||||
} else {
|
||||
z.F.DecSliceStringX(yyv33, false, d)
|
||||
z.F.DecSliceStringX(yyv36, false, d)
|
||||
}
|
||||
}
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
@ -42417,26 +42504,65 @@ func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
||||
if r.TryDecodeAsNil() {
|
||||
x.ExternalName = ""
|
||||
} else {
|
||||
yyv35 := &x.ExternalName
|
||||
yym36 := z.DecBinary()
|
||||
_ = yym36
|
||||
yyv38 := &x.ExternalName
|
||||
yym39 := z.DecBinary()
|
||||
_ = yym39
|
||||
if false {
|
||||
} else {
|
||||
*((*string)(yyv35)) = r.DecodeString()
|
||||
*((*string)(yyv38)) = r.DecodeString()
|
||||
}
|
||||
}
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.ExternalTrafficPolicy = ""
|
||||
} else {
|
||||
yyv40 := &x.ExternalTrafficPolicy
|
||||
yyv40.CodecDecodeSelf(d)
|
||||
}
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb23 {
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
return
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
if r.TryDecodeAsNil() {
|
||||
x.HealthCheckNodePort = 0
|
||||
} else {
|
||||
yyv41 := &x.HealthCheckNodePort
|
||||
yym42 := z.DecBinary()
|
||||
_ = yym42
|
||||
if false {
|
||||
} else {
|
||||
*((*int32)(yyv41)) = int32(r.DecodeInt(32))
|
||||
}
|
||||
}
|
||||
for {
|
||||
yyj20++
|
||||
if yyhl20 {
|
||||
yyb20 = yyj20 > l
|
||||
yyj23++
|
||||
if yyhl23 {
|
||||
yyb23 = yyj23 > l
|
||||
} else {
|
||||
yyb20 = r.CheckBreak()
|
||||
yyb23 = r.CheckBreak()
|
||||
}
|
||||
if yyb20 {
|
||||
if yyb23 {
|
||||
break
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
|
||||
z.DecStructFieldNotFound(yyj20-1, "")
|
||||
z.DecStructFieldNotFound(yyj23-1, "")
|
||||
}
|
||||
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
|
||||
}
|
||||
@ -71379,7 +71505,7 @@ func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) {
|
||||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 440)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 464)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -2792,6 +2792,16 @@ const (
|
||||
ServiceTypeExternalName ServiceType = "ExternalName"
|
||||
)
|
||||
|
||||
// Service External Traffic Policy Type string
|
||||
type ServiceExternalTrafficPolicyType string
|
||||
|
||||
const (
|
||||
// ServiceExternalTrafficPolicyTypeLocal specifies local endpoints behavior.
|
||||
ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local"
|
||||
// ServiceExternalTrafficPolicyTypeGlobal specifies global (legacy) behavior.
|
||||
ServiceExternalTrafficPolicyTypeGlobal ServiceExternalTrafficPolicyType = "Global"
|
||||
)
|
||||
|
||||
// ServiceStatus represents the current status of a service.
|
||||
type ServiceStatus struct {
|
||||
// LoadBalancer contains the current status of the load-balancer,
|
||||
@ -2904,6 +2914,20 @@ type ServiceSpec struct {
|
||||
// Must be a valid DNS name and requires Type to be ExternalName.
|
||||
// +optional
|
||||
ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"`
|
||||
|
||||
// externalTrafficPolicy denotes if this Service desires to route external traffic to
|
||||
// local endpoints only. This preserves Source IP and avoids a second hop for
|
||||
// LoadBalancer and Nodeport type services.
|
||||
// +optional
|
||||
ExternalTrafficPolicy ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty" protobuf:"bytes,11,opt,name=externalTrafficPolicy"`
|
||||
|
||||
// healthCheckNodePort specifies the healthcheck nodePort for the service.
|
||||
// If not specified, HealthCheckNodePort is created by the service api
|
||||
// backend with the allocated nodePort. Will use user-specified nodePort value
|
||||
// if specified by the client. Only effects when Type is set to LoadBalancer
|
||||
// and ExternalTrafficPolicy is set to Local.
|
||||
// +optional
|
||||
HealthCheckNodePort int32 `json:"healthCheckNodePort,omitempty" protobuf:"bytes,12,opt,name=healthCheckNodePort"`
|
||||
}
|
||||
|
||||
// ServicePort contains information on service's port.
|
||||
|
@ -1844,6 +1844,8 @@ var map_ServiceSpec = map[string]string{
|
||||
"loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.",
|
||||
"loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: http://kubernetes.io/docs/user-guide/services-firewalls",
|
||||
"externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.",
|
||||
"externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to local endpoints only. This preserves Source IP and avoids a second hop for LoadBalancer and Nodeport type services.",
|
||||
"healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.",
|
||||
}
|
||||
|
||||
func (ServiceSpec) SwaggerDoc() map[string]string {
|
||||
|
@ -4721,6 +4721,8 @@ func autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.Ser
|
||||
out.LoadBalancerIP = in.LoadBalancerIP
|
||||
out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
|
||||
out.ExternalName = in.ExternalName
|
||||
out.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
|
||||
out.HealthCheckNodePort = in.HealthCheckNodePort
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -4739,6 +4741,8 @@ func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *Ser
|
||||
out.LoadBalancerIP = in.LoadBalancerIP
|
||||
out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
|
||||
out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
|
||||
out.ExternalTrafficPolicy = ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
|
||||
out.HealthCheckNodePort = in.HealthCheckNodePort
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user