diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index acb5bbdd14..d5aeb6b807 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -553,10 +553,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -688,6 +692,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to + use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -916,10 +943,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -1054,6 +1085,30 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session + persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie + to use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -1436,10 +1491,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -1569,6 +1628,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to use for + session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -1792,10 +1874,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -1927,6 +2013,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to + use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -2452,10 +2561,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -2587,6 +2700,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to + use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -2815,10 +2951,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -2953,6 +3093,30 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session + persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie + to use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -3335,10 +3499,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -3468,6 +3636,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to use for + session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -3691,10 +3882,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -3826,6 +4021,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to + use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -4351,10 +4569,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -4486,6 +4708,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to + use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -4714,10 +4959,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -4852,6 +5101,30 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session + persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie + to use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -5234,10 +5507,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -5367,6 +5644,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to use for + session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- @@ -5590,10 +5890,14 @@ spec: - simple - required: - consistentHash + - required: + - sessionPersistence - required: - simple - required: - consistentHash + - required: + - sessionPersistence properties: consistentHash: allOf: @@ -5725,6 +6029,29 @@ spec: type: string type: array type: object + sessionPersistence: + properties: + cookie: + description: The cookie settings for session persistence. + properties: + ttl: + description: Lifetime of the cookie. + type: string + type: object + name: + description: The name of the header or cookie to + use for session persistence. + type: string + type: + description: |- + The type of session persistence to use. + + Valid Options: COOKIE, HEADER + enum: + - COOKIE + - HEADER + type: string + type: object simple: description: |2- diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index db66de5835..f5265622ab 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -179,6 +179,20 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash_ = v1alpha3.LoadBalancerSett // The Maglev load balancer implements consistent hashing to backend hosts. type LoadBalancerSettings_ConsistentHashLB_Maglev = v1alpha3.LoadBalancerSettings_ConsistentHashLB_Maglev +// Session persistence settings for the destination. Use this for hard session affinity. +type LoadBalancerSettings_SessionPersistence = v1alpha3.LoadBalancerSettings_SessionPersistence +type LoadBalancerSettings_SessionPersistence_Cookie = v1alpha3.LoadBalancerSettings_SessionPersistence_Cookie + +// Type defines the type of session persistence such as through +// the use of a header or cookie. Default is COOKIE. +type LoadBalancerSettings_SessionPersistence_Type = v1alpha3.LoadBalancerSettings_SessionPersistence_Type + +// Use a cookie to store the session affinity information. +const LoadBalancerSettings_SessionPersistence_COOKIE LoadBalancerSettings_SessionPersistence_Type = v1alpha3.LoadBalancerSettings_SessionPersistence_COOKIE + +// Use a header to store the session affinity information. +const LoadBalancerSettings_SessionPersistence_HEADER LoadBalancerSettings_SessionPersistence_Type = v1alpha3.LoadBalancerSettings_SessionPersistence_HEADER + // +kubebuilder:validation:XValidation:message="only one of warmupDurationSecs or warmup can be set",rule="oneof(self.warmupDurationSecs, self.warmup)" // Standard load balancing algorithms that require no tuning. type LoadBalancerSettings_SimpleLB = v1alpha3.LoadBalancerSettings_SimpleLB @@ -216,6 +230,7 @@ const LoadBalancerSettings_LEAST_REQUEST LoadBalancerSettings_SimpleLB = v1alpha type LoadBalancerSettings_Simple = v1alpha3.LoadBalancerSettings_Simple type LoadBalancerSettings_ConsistentHash = v1alpha3.LoadBalancerSettings_ConsistentHash +type LoadBalancerSettings_SessionPersistence_ = v1alpha3.LoadBalancerSettings_SessionPersistence_ type WarmupConfiguration = v1alpha3.WarmupConfiguration // Connection pool settings for an upstream host. The settings apply to diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 883a94eae3..101e07a903 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -270,6 +270,56 @@ func (LoadBalancerSettings_SimpleLB) EnumDescriptor() ([]byte, []int) { return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{3, 0} } +// Type defines the type of session persistence such as through +// the use of a header or cookie. Default is COOKIE. +type LoadBalancerSettings_SessionPersistence_Type int32 + +const ( + // Use a cookie to store the session affinity information. + LoadBalancerSettings_SessionPersistence_COOKIE LoadBalancerSettings_SessionPersistence_Type = 0 + // Use a header to store the session affinity information. + LoadBalancerSettings_SessionPersistence_HEADER LoadBalancerSettings_SessionPersistence_Type = 1 +) + +// Enum value maps for LoadBalancerSettings_SessionPersistence_Type. +var ( + LoadBalancerSettings_SessionPersistence_Type_name = map[int32]string{ + 0: "COOKIE", + 1: "HEADER", + } + LoadBalancerSettings_SessionPersistence_Type_value = map[string]int32{ + "COOKIE": 0, + "HEADER": 1, + } +) + +func (x LoadBalancerSettings_SessionPersistence_Type) Enum() *LoadBalancerSettings_SessionPersistence_Type { + p := new(LoadBalancerSettings_SessionPersistence_Type) + *p = x + return p +} + +func (x LoadBalancerSettings_SessionPersistence_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LoadBalancerSettings_SessionPersistence_Type) Descriptor() protoreflect.EnumDescriptor { + return file_networking_v1alpha3_destination_rule_proto_enumTypes[2].Descriptor() +} + +func (LoadBalancerSettings_SessionPersistence_Type) Type() protoreflect.EnumType { + return &file_networking_v1alpha3_destination_rule_proto_enumTypes[2] +} + +func (x LoadBalancerSettings_SessionPersistence_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LoadBalancerSettings_SessionPersistence_Type.Descriptor instead. +func (LoadBalancerSettings_SessionPersistence_Type) EnumDescriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{3, 1, 0} +} + // Policy for upgrading http1.1 connections to http2. type ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy int32 @@ -309,11 +359,11 @@ func (x ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy) String() string { } func (ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy) Descriptor() protoreflect.EnumDescriptor { - return file_networking_v1alpha3_destination_rule_proto_enumTypes[2].Descriptor() + return file_networking_v1alpha3_destination_rule_proto_enumTypes[3].Descriptor() } func (ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy) Type() protoreflect.EnumType { - return &file_networking_v1alpha3_destination_rule_proto_enumTypes[2] + return &file_networking_v1alpha3_destination_rule_proto_enumTypes[3] } func (x ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy) Number() protoreflect.EnumNumber { @@ -371,11 +421,11 @@ func (x ClientTLSSettings_TLSmode) String() string { } func (ClientTLSSettings_TLSmode) Descriptor() protoreflect.EnumDescriptor { - return file_networking_v1alpha3_destination_rule_proto_enumTypes[3].Descriptor() + return file_networking_v1alpha3_destination_rule_proto_enumTypes[4].Descriptor() } func (ClientTLSSettings_TLSmode) Type() protoreflect.EnumType { - return &file_networking_v1alpha3_destination_rule_proto_enumTypes[3] + return &file_networking_v1alpha3_destination_rule_proto_enumTypes[4] } func (x ClientTLSSettings_TLSmode) Number() protoreflect.EnumNumber { @@ -800,6 +850,7 @@ type LoadBalancerSettings struct { // // *LoadBalancerSettings_Simple // *LoadBalancerSettings_ConsistentHash + // *LoadBalancerSettings_SessionPersistence_ LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"` // Locality load balancer settings, this will override mesh-wide settings in entirety, meaning no merging would be performed // between this object and the object one in MeshConfig @@ -874,6 +925,15 @@ func (x *LoadBalancerSettings) GetConsistentHash() *LoadBalancerSettings_Consist return nil } +func (x *LoadBalancerSettings) GetSessionPersistence() *LoadBalancerSettings_SessionPersistence { + if x != nil { + if x, ok := x.LbPolicy.(*LoadBalancerSettings_SessionPersistence_); ok { + return x.SessionPersistence + } + } + return nil +} + func (x *LoadBalancerSettings) GetLocalityLbSetting() *LocalityLoadBalancerSetting { if x != nil { return x.LocalityLbSetting @@ -907,10 +967,16 @@ type LoadBalancerSettings_ConsistentHash struct { ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,json=consistentHash,proto3,oneof"` } +type LoadBalancerSettings_SessionPersistence_ struct { + SessionPersistence *LoadBalancerSettings_SessionPersistence `protobuf:"bytes,6,opt,name=session_persistence,json=sessionPersistence,proto3,oneof"` +} + func (*LoadBalancerSettings_Simple) isLoadBalancerSettings_LbPolicy() {} func (*LoadBalancerSettings_ConsistentHash) isLoadBalancerSettings_LbPolicy() {} +func (*LoadBalancerSettings_SessionPersistence_) isLoadBalancerSettings_LbPolicy() {} + type WarmupConfiguration struct { state protoimpl.MessageState `protogen:"open.v1"` // Duration of warmup mode @@ -2091,6 +2157,70 @@ func (*LoadBalancerSettings_ConsistentHashLB_RingHash_) isLoadBalancerSettings_C func (*LoadBalancerSettings_ConsistentHashLB_Maglev) isLoadBalancerSettings_ConsistentHashLB_HashAlgorithm() { } +// Session persistence settings for the destination. Use this for hard session affinity. +type LoadBalancerSettings_SessionPersistence struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The type of session persistence to use. + Type LoadBalancerSettings_SessionPersistence_Type `protobuf:"varint,1,opt,name=type,proto3,enum=istio.networking.v1alpha3.LoadBalancerSettings_SessionPersistence_Type" json:"type,omitempty"` + // The name of the header or cookie to use for session persistence. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The cookie settings for session persistence. + Cookie *LoadBalancerSettings_SessionPersistence_Cookie `protobuf:"bytes,3,opt,name=cookie,proto3" json:"cookie,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadBalancerSettings_SessionPersistence) Reset() { + *x = LoadBalancerSettings_SessionPersistence{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadBalancerSettings_SessionPersistence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadBalancerSettings_SessionPersistence) ProtoMessage() {} + +func (x *LoadBalancerSettings_SessionPersistence) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadBalancerSettings_SessionPersistence.ProtoReflect.Descriptor instead. +func (*LoadBalancerSettings_SessionPersistence) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *LoadBalancerSettings_SessionPersistence) GetType() LoadBalancerSettings_SessionPersistence_Type { + if x != nil { + return x.Type + } + return LoadBalancerSettings_SessionPersistence_COOKIE +} + +func (x *LoadBalancerSettings_SessionPersistence) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LoadBalancerSettings_SessionPersistence) GetCookie() *LoadBalancerSettings_SessionPersistence_Cookie { + if x != nil { + return x.Cookie + } + return nil +} + type LoadBalancerSettings_ConsistentHashLB_RingHash struct { state protoimpl.MessageState `protogen:"open.v1"` // The minimum number of virtual nodes to use for the hash @@ -2105,7 +2235,7 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash struct { func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_RingHash{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[14] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2117,7 +2247,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) String() string { func (*LoadBalancerSettings_ConsistentHashLB_RingHash) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[14] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2154,7 +2284,7 @@ type LoadBalancerSettings_ConsistentHashLB_MagLev struct { func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_MagLev{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2166,7 +2296,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) String() string { func (*LoadBalancerSettings_ConsistentHashLB_MagLev) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2208,7 +2338,7 @@ type LoadBalancerSettings_ConsistentHashLB_HTTPCookie struct { func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_HTTPCookie{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2220,7 +2350,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) String() string { func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2257,6 +2387,54 @@ func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) GetTtl() *duration.Du return nil } +type LoadBalancerSettings_SessionPersistence_Cookie struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Lifetime of the cookie. If specified, a cookie with the TTL will be + // generated if the cookie is not present. If the TTL is present and zero, + // the generated cookie will be a session cookie. + // +protoc-gen-crd:duration-validation:none + Ttl *duration.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadBalancerSettings_SessionPersistence_Cookie) Reset() { + *x = LoadBalancerSettings_SessionPersistence_Cookie{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadBalancerSettings_SessionPersistence_Cookie) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadBalancerSettings_SessionPersistence_Cookie) ProtoMessage() {} + +func (x *LoadBalancerSettings_SessionPersistence_Cookie) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadBalancerSettings_SessionPersistence_Cookie.ProtoReflect.Descriptor instead. +func (*LoadBalancerSettings_SessionPersistence_Cookie) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{3, 1, 0} +} + +func (x *LoadBalancerSettings_SessionPersistence_Cookie) GetTtl() *duration.Duration { + if x != nil { + return x.Ttl + } + return nil +} + // Settings common to both HTTP and TCP upstream connections. type ConnectionPoolSettings_TCPSettings struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2287,7 +2465,7 @@ type ConnectionPoolSettings_TCPSettings struct { func (x *ConnectionPoolSettings_TCPSettings) Reset() { *x = ConnectionPoolSettings_TCPSettings{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2299,7 +2477,7 @@ func (x *ConnectionPoolSettings_TCPSettings) String() string { func (*ConnectionPoolSettings_TCPSettings) ProtoMessage() {} func (x *ConnectionPoolSettings_TCPSettings) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2392,7 +2570,7 @@ type ConnectionPoolSettings_HTTPSettings struct { func (x *ConnectionPoolSettings_HTTPSettings) Reset() { *x = ConnectionPoolSettings_HTTPSettings{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2404,7 +2582,7 @@ func (x *ConnectionPoolSettings_HTTPSettings) String() string { func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage() {} func (x *ConnectionPoolSettings_HTTPSettings) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2497,7 +2675,7 @@ type ConnectionPoolSettings_TCPSettings_TcpKeepalive struct { func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Reset() { *x = ConnectionPoolSettings_TCPSettings_TcpKeepalive{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2509,7 +2687,7 @@ func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) String() string { func (*ConnectionPoolSettings_TCPSettings_TcpKeepalive) ProtoMessage() {} func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2570,7 +2748,7 @@ type LocalityLoadBalancerSetting_Distribute struct { func (x *LocalityLoadBalancerSetting_Distribute) Reset() { *x = LocalityLoadBalancerSetting_Distribute{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2582,7 +2760,7 @@ func (x *LocalityLoadBalancerSetting_Distribute) String() string { func (*LocalityLoadBalancerSetting_Distribute) ProtoMessage() {} func (x *LocalityLoadBalancerSetting_Distribute) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2632,7 +2810,7 @@ type LocalityLoadBalancerSetting_Failover struct { func (x *LocalityLoadBalancerSetting_Failover) Reset() { *x = LocalityLoadBalancerSetting_Failover{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2644,7 +2822,7 @@ func (x *LocalityLoadBalancerSetting_Failover) String() string { func (*LocalityLoadBalancerSetting_Failover) ProtoMessage() {} func (x *LocalityLoadBalancerSetting_Failover) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2717,11 +2895,11 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x0etraffic_policy\x18\x03 \x01(\v2(.istio.networking.v1alpha3.TrafficPolicyR\rtrafficPolicy\x1a9\n" + "\vLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xcc\n" + - "\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x85\x0e\n" + "\x14LoadBalancerSettings\x12R\n" + "\x06simple\x18\x01 \x01(\x0e28.istio.networking.v1alpha3.LoadBalancerSettings.SimpleLBH\x00R\x06simple\x12k\n" + - "\x0fconsistent_hash\x18\x02 \x01(\v2@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00R\x0econsistentHash\x12f\n" + + "\x0fconsistent_hash\x18\x02 \x01(\v2@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00R\x0econsistentHash\x12u\n" + + "\x13session_persistence\x18\x06 \x01(\v2B.istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistenceH\x00R\x12sessionPersistence\x12f\n" + "\x13locality_lb_setting\x18\x03 \x01(\v26.istio.networking.v1alpha3.LocalityLoadBalancerSettingR\x11localityLbSetting\x12K\n" + "\x14warmup_duration_secs\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x12warmupDurationSecs\x12F\n" + "\x06warmup\x18\x05 \x01(\v2..istio.networking.v1alpha3.WarmupConfigurationR\x06warmup\x1a\xf6\x05\n" + @@ -2746,7 +2924,18 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x03ttl\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x03ttlB\n" + "\n" + "\bhash_keyB\x10\n" + - "\x0ehash_algorithm\"p\n" + + "\x0ehash_algorithm\x1a\xbf\x02\n" + + "\x12SessionPersistence\x12[\n" + + "\x04type\x18\x01 \x01(\x0e2G.istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.TypeR\x04type\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12a\n" + + "\x06cookie\x18\x03 \x01(\v2I.istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.CookieR\x06cookie\x1a5\n" + + "\x06Cookie\x12+\n" + + "\x03ttl\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x03ttl\"\x1e\n" + + "\x04Type\x12\n" + + "\n" + + "\x06COOKIE\x10\x00\x12\n" + + "\n" + + "\x06HEADER\x10\x01\"p\n" + "\bSimpleLB\x12\x0f\n" + "\vUNSPECIFIED\x10\x00\x12\x12\n" + "\n" + @@ -2849,100 +3038,107 @@ func file_networking_v1alpha3_destination_rule_proto_rawDescGZIP() []byte { return file_networking_v1alpha3_destination_rule_proto_rawDescData } -var file_networking_v1alpha3_destination_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_networking_v1alpha3_destination_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_networking_v1alpha3_destination_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_networking_v1alpha3_destination_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{ (TrafficPolicy_ProxyProtocol_VERSION)(0), // 0: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION (LoadBalancerSettings_SimpleLB)(0), // 1: istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB - (ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy)(0), // 2: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy - (ClientTLSSettings_TLSmode)(0), // 3: istio.networking.v1alpha3.ClientTLSSettings.TLSmode - (*DestinationRule)(nil), // 4: istio.networking.v1alpha3.DestinationRule - (*TrafficPolicy)(nil), // 5: istio.networking.v1alpha3.TrafficPolicy - (*Subset)(nil), // 6: istio.networking.v1alpha3.Subset - (*LoadBalancerSettings)(nil), // 7: istio.networking.v1alpha3.LoadBalancerSettings - (*WarmupConfiguration)(nil), // 8: istio.networking.v1alpha3.WarmupConfiguration - (*ConnectionPoolSettings)(nil), // 9: istio.networking.v1alpha3.ConnectionPoolSettings - (*OutlierDetection)(nil), // 10: istio.networking.v1alpha3.OutlierDetection - (*ClientTLSSettings)(nil), // 11: istio.networking.v1alpha3.ClientTLSSettings - (*LocalityLoadBalancerSetting)(nil), // 12: istio.networking.v1alpha3.LocalityLoadBalancerSetting - (*TrafficPolicy_PortTrafficPolicy)(nil), // 13: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy - (*TrafficPolicy_TunnelSettings)(nil), // 14: istio.networking.v1alpha3.TrafficPolicy.TunnelSettings - (*TrafficPolicy_ProxyProtocol)(nil), // 15: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol - nil, // 16: istio.networking.v1alpha3.Subset.LabelsEntry - (*LoadBalancerSettings_ConsistentHashLB)(nil), // 17: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB - (*LoadBalancerSettings_ConsistentHashLB_RingHash)(nil), // 18: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash - (*LoadBalancerSettings_ConsistentHashLB_MagLev)(nil), // 19: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), // 20: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie - (*ConnectionPoolSettings_TCPSettings)(nil), // 21: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings - (*ConnectionPoolSettings_HTTPSettings)(nil), // 22: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings - (*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), // 23: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive - (*LocalityLoadBalancerSetting_Distribute)(nil), // 24: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - (*LocalityLoadBalancerSetting_Failover)(nil), // 25: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - nil, // 26: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - (*v1beta1.WorkloadSelector)(nil), // 27: istio.type.v1beta1.WorkloadSelector - (*duration.Duration)(nil), // 28: google.protobuf.Duration - (*wrappers.DoubleValue)(nil), // 29: google.protobuf.DoubleValue - (*wrappers.UInt32Value)(nil), // 30: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 31: google.protobuf.BoolValue - (*PortSelector)(nil), // 32: istio.networking.v1alpha3.PortSelector + (LoadBalancerSettings_SessionPersistence_Type)(0), // 2: istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.Type + (ConnectionPoolSettings_HTTPSettings_H2UpgradePolicy)(0), // 3: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy + (ClientTLSSettings_TLSmode)(0), // 4: istio.networking.v1alpha3.ClientTLSSettings.TLSmode + (*DestinationRule)(nil), // 5: istio.networking.v1alpha3.DestinationRule + (*TrafficPolicy)(nil), // 6: istio.networking.v1alpha3.TrafficPolicy + (*Subset)(nil), // 7: istio.networking.v1alpha3.Subset + (*LoadBalancerSettings)(nil), // 8: istio.networking.v1alpha3.LoadBalancerSettings + (*WarmupConfiguration)(nil), // 9: istio.networking.v1alpha3.WarmupConfiguration + (*ConnectionPoolSettings)(nil), // 10: istio.networking.v1alpha3.ConnectionPoolSettings + (*OutlierDetection)(nil), // 11: istio.networking.v1alpha3.OutlierDetection + (*ClientTLSSettings)(nil), // 12: istio.networking.v1alpha3.ClientTLSSettings + (*LocalityLoadBalancerSetting)(nil), // 13: istio.networking.v1alpha3.LocalityLoadBalancerSetting + (*TrafficPolicy_PortTrafficPolicy)(nil), // 14: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy + (*TrafficPolicy_TunnelSettings)(nil), // 15: istio.networking.v1alpha3.TrafficPolicy.TunnelSettings + (*TrafficPolicy_ProxyProtocol)(nil), // 16: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol + nil, // 17: istio.networking.v1alpha3.Subset.LabelsEntry + (*LoadBalancerSettings_ConsistentHashLB)(nil), // 18: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB + (*LoadBalancerSettings_SessionPersistence)(nil), // 19: istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence + (*LoadBalancerSettings_ConsistentHashLB_RingHash)(nil), // 20: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash + (*LoadBalancerSettings_ConsistentHashLB_MagLev)(nil), // 21: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev + (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), // 22: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie + (*LoadBalancerSettings_SessionPersistence_Cookie)(nil), // 23: istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.Cookie + (*ConnectionPoolSettings_TCPSettings)(nil), // 24: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings + (*ConnectionPoolSettings_HTTPSettings)(nil), // 25: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings + (*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), // 26: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive + (*LocalityLoadBalancerSetting_Distribute)(nil), // 27: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + (*LocalityLoadBalancerSetting_Failover)(nil), // 28: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + nil, // 29: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + (*v1beta1.WorkloadSelector)(nil), // 30: istio.type.v1beta1.WorkloadSelector + (*duration.Duration)(nil), // 31: google.protobuf.Duration + (*wrappers.DoubleValue)(nil), // 32: google.protobuf.DoubleValue + (*wrappers.UInt32Value)(nil), // 33: google.protobuf.UInt32Value + (*wrappers.BoolValue)(nil), // 34: google.protobuf.BoolValue + (*PortSelector)(nil), // 35: istio.networking.v1alpha3.PortSelector } var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ - 5, // 0: istio.networking.v1alpha3.DestinationRule.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy - 6, // 1: istio.networking.v1alpha3.DestinationRule.subsets:type_name -> istio.networking.v1alpha3.Subset - 27, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector - 7, // 3: istio.networking.v1alpha3.TrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings - 9, // 4: istio.networking.v1alpha3.TrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings - 10, // 5: istio.networking.v1alpha3.TrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection - 11, // 6: istio.networking.v1alpha3.TrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings - 13, // 7: istio.networking.v1alpha3.TrafficPolicy.port_level_settings:type_name -> istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy - 14, // 8: istio.networking.v1alpha3.TrafficPolicy.tunnel:type_name -> istio.networking.v1alpha3.TrafficPolicy.TunnelSettings - 15, // 9: istio.networking.v1alpha3.TrafficPolicy.proxy_protocol:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol - 16, // 10: istio.networking.v1alpha3.Subset.labels:type_name -> istio.networking.v1alpha3.Subset.LabelsEntry - 5, // 11: istio.networking.v1alpha3.Subset.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy + 6, // 0: istio.networking.v1alpha3.DestinationRule.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy + 7, // 1: istio.networking.v1alpha3.DestinationRule.subsets:type_name -> istio.networking.v1alpha3.Subset + 30, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector + 8, // 3: istio.networking.v1alpha3.TrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings + 10, // 4: istio.networking.v1alpha3.TrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings + 11, // 5: istio.networking.v1alpha3.TrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection + 12, // 6: istio.networking.v1alpha3.TrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings + 14, // 7: istio.networking.v1alpha3.TrafficPolicy.port_level_settings:type_name -> istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy + 15, // 8: istio.networking.v1alpha3.TrafficPolicy.tunnel:type_name -> istio.networking.v1alpha3.TrafficPolicy.TunnelSettings + 16, // 9: istio.networking.v1alpha3.TrafficPolicy.proxy_protocol:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol + 17, // 10: istio.networking.v1alpha3.Subset.labels:type_name -> istio.networking.v1alpha3.Subset.LabelsEntry + 6, // 11: istio.networking.v1alpha3.Subset.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy 1, // 12: istio.networking.v1alpha3.LoadBalancerSettings.simple:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB - 17, // 13: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB - 12, // 14: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting - 28, // 15: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration - 8, // 16: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration - 28, // 17: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration - 29, // 18: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue - 29, // 19: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue - 21, // 20: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings - 22, // 21: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings - 30, // 22: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value - 30, // 23: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value - 30, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value - 28, // 25: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration - 28, // 26: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration - 3, // 27: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode - 31, // 28: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue - 24, // 29: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - 25, // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - 31, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue - 32, // 32: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector - 7, // 33: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings - 9, // 34: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings - 10, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection - 11, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings - 0, // 37: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION - 20, // 38: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie - 18, // 39: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash - 19, // 40: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - 28, // 41: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration - 28, // 42: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration - 23, // 43: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive - 28, // 44: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration - 28, // 45: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration - 28, // 46: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration - 2, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy - 28, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration - 28, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration - 26, // 50: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - 51, // [51:51] is the sub-list for method output_type - 51, // [51:51] is the sub-list for method input_type - 51, // [51:51] is the sub-list for extension type_name - 51, // [51:51] is the sub-list for extension extendee - 0, // [0:51] is the sub-list for field type_name + 18, // 13: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB + 19, // 14: istio.networking.v1alpha3.LoadBalancerSettings.session_persistence:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence + 13, // 15: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting + 31, // 16: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration + 9, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration + 31, // 18: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration + 32, // 19: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue + 32, // 20: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue + 24, // 21: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings + 25, // 22: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings + 33, // 23: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value + 33, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value + 33, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value + 31, // 26: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration + 31, // 27: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration + 4, // 28: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode + 34, // 29: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue + 27, // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + 28, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + 34, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue + 35, // 33: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector + 8, // 34: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings + 10, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings + 11, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection + 12, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings + 0, // 38: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION + 22, // 39: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie + 20, // 40: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash + 21, // 41: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev + 2, // 42: istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.type:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.Type + 23, // 43: istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.Cookie + 31, // 44: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration + 31, // 45: istio.networking.v1alpha3.LoadBalancerSettings.SessionPersistence.Cookie.ttl:type_name -> google.protobuf.Duration + 31, // 46: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration + 26, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive + 31, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration + 31, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration + 31, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration + 3, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy + 31, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration + 31, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration + 29, // 54: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + 55, // [55:55] is the sub-list for method output_type + 55, // [55:55] is the sub-list for method input_type + 55, // [55:55] is the sub-list for extension type_name + 55, // [55:55] is the sub-list for extension extendee + 0, // [0:55] is the sub-list for field type_name } func init() { file_networking_v1alpha3_destination_rule_proto_init() } @@ -2954,6 +3150,7 @@ func file_networking_v1alpha3_destination_rule_proto_init() { file_networking_v1alpha3_destination_rule_proto_msgTypes[3].OneofWrappers = []any{ (*LoadBalancerSettings_Simple)(nil), (*LoadBalancerSettings_ConsistentHash)(nil), + (*LoadBalancerSettings_SessionPersistence_)(nil), } file_networking_v1alpha3_destination_rule_proto_msgTypes[13].OneofWrappers = []any{ (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName)(nil), @@ -2968,8 +3165,8 @@ func file_networking_v1alpha3_destination_rule_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_networking_v1alpha3_destination_rule_proto_rawDesc), len(file_networking_v1alpha3_destination_rule_proto_rawDesc)), - NumEnums: 4, - NumMessages: 23, + NumEnums: 5, + NumMessages: 25, NumExtensions: 0, NumServices: 0, }, diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index a5b21c4664..55858fbe36 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -6,7 +6,7 @@ generator: protoc-gen-docs schema: istio.networking.v1alpha3.DestinationRule aliases: [/docs/reference/config/networking/v1alpha3/destination-rule] -number_of_entries: 26 +number_of_entries: 29 ---

DestinationRule defines policies that apply to traffic intended for a service after routing has occurred. These rules specify configuration @@ -569,6 +569,13 @@

LoadBalancerSettings

+ +
sessionPersistence
+
SessionPersistence (oneof)
+
+ + +
localityLbSetting
LocalityLoadBalancerSetting
@@ -792,6 +799,102 @@

HTTPCookie

generated if the cookie is not present. If the TTL is present and zero, the generated cookie will be a session cookie.

+ + + + + +

SessionPersistence

+
+

Session persistence settings for the destination. Use this for hard session affinity.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+

The type of session persistence to use.

+ +
+
string
+
+

The name of the header or cookie to use for session persistence.

+ +
+
+ +
+ + + + + + + + + + + + + +
FieldDescription
+
+

Type

+
+

Type defines the type of session persistence such as through +the use of a header or cookie. Default is COOKIE.

+ + + + + + + + + + + + + + + + diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index 2a9e26bd64..2f3a5321c3 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -495,6 +495,35 @@ message LoadBalancerSettings { uint64 minimum_ring_size = 4 [deprecated=true]; }; + // Session persistence settings for the destination. Use this for hard session affinity. + message SessionPersistence { + // Type defines the type of session persistence such as through + // the use of a header or cookie. Default is COOKIE. + enum Type { + // Use a cookie to store the session affinity information. + COOKIE = 0; + // Use a header to store the session affinity information. + HEADER = 1; + } + + // The type of session persistence to use. + Type type = 1; + + // The name of the header or cookie to use for session persistence. + string name = 2; + + // The cookie settings for session persistence. + Cookie cookie = 3; + + message Cookie { + // Lifetime of the cookie. If specified, a cookie with the TTL will be + // generated if the cookie is not present. If the TTL is present and zero, + // the generated cookie will be a session cookie. + // +protoc-gen-crd:duration-validation:none + google.protobuf.Duration ttl = 3; + } + } + // (-- TODO: Enable Subset load balancing after moving to v2 API Also // look into enabling Priotity based load balancing for spilling over // from one priority pool to another. --) @@ -503,6 +532,7 @@ message LoadBalancerSettings { oneof lb_policy { SimpleLB simple = 1; ConsistentHashLB consistent_hash = 2; + SessionPersistence session_persistence = 6; } // Locality load balancer settings, this will override mesh-wide settings in entirety, meaning no merging would be performed diff --git a/networking/v1alpha3/destination_rule_deepcopy.gen.go b/networking/v1alpha3/destination_rule_deepcopy.gen.go index 0f61ea8d3a..536905cd03 100644 --- a/networking/v1alpha3/destination_rule_deepcopy.gen.go +++ b/networking/v1alpha3/destination_rule_deepcopy.gen.go @@ -236,6 +236,48 @@ func (in *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) DeepCopyInterface() return in.DeepCopy() } +// DeepCopyInto supports using LoadBalancerSettings_SessionPersistence within kubernetes types, where deepcopy-gen is used. +func (in *LoadBalancerSettings_SessionPersistence) DeepCopyInto(out *LoadBalancerSettings_SessionPersistence) { + p := proto.Clone(in).(*LoadBalancerSettings_SessionPersistence) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings_SessionPersistence. Required by controller-gen. +func (in *LoadBalancerSettings_SessionPersistence) DeepCopy() *LoadBalancerSettings_SessionPersistence { + if in == nil { + return nil + } + out := new(LoadBalancerSettings_SessionPersistence) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings_SessionPersistence. Required by controller-gen. +func (in *LoadBalancerSettings_SessionPersistence) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using LoadBalancerSettings_SessionPersistence_Cookie within kubernetes types, where deepcopy-gen is used. +func (in *LoadBalancerSettings_SessionPersistence_Cookie) DeepCopyInto(out *LoadBalancerSettings_SessionPersistence_Cookie) { + p := proto.Clone(in).(*LoadBalancerSettings_SessionPersistence_Cookie) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings_SessionPersistence_Cookie. Required by controller-gen. +func (in *LoadBalancerSettings_SessionPersistence_Cookie) DeepCopy() *LoadBalancerSettings_SessionPersistence_Cookie { + if in == nil { + return nil + } + out := new(LoadBalancerSettings_SessionPersistence_Cookie) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings_SessionPersistence_Cookie. Required by controller-gen. +func (in *LoadBalancerSettings_SessionPersistence_Cookie) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + // DeepCopyInto supports using WarmupConfiguration within kubernetes types, where deepcopy-gen is used. func (in *WarmupConfiguration) DeepCopyInto(out *WarmupConfiguration) { p := proto.Clone(in).(*WarmupConfiguration) diff --git a/networking/v1alpha3/destination_rule_json.gen.go b/networking/v1alpha3/destination_rule_json.gen.go index 4e65aa9c89..503477aca5 100644 --- a/networking/v1alpha3/destination_rule_json.gen.go +++ b/networking/v1alpha3/destination_rule_json.gen.go @@ -127,6 +127,28 @@ func (this *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) UnmarshalJSON(b [] return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for LoadBalancerSettings_SessionPersistence +func (this *LoadBalancerSettings_SessionPersistence) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_SessionPersistence +func (this *LoadBalancerSettings_SessionPersistence) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for LoadBalancerSettings_SessionPersistence_Cookie +func (this *LoadBalancerSettings_SessionPersistence_Cookie) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_SessionPersistence_Cookie +func (this *LoadBalancerSettings_SessionPersistence_Cookie) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + // MarshalJSON is a custom marshaler for WarmupConfiguration func (this *WarmupConfiguration) MarshalJSON() ([]byte, error) { str, err := DestinationRuleMarshaler.MarshalToString(this) diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index 834941f88b..bb966cced4 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -179,6 +179,20 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash_ = v1alpha3.LoadBalancerSett // The Maglev load balancer implements consistent hashing to backend hosts. type LoadBalancerSettings_ConsistentHashLB_Maglev = v1alpha3.LoadBalancerSettings_ConsistentHashLB_Maglev +// Session persistence settings for the destination. Use this for hard session affinity. +type LoadBalancerSettings_SessionPersistence = v1alpha3.LoadBalancerSettings_SessionPersistence +type LoadBalancerSettings_SessionPersistence_Cookie = v1alpha3.LoadBalancerSettings_SessionPersistence_Cookie + +// Type defines the type of session persistence such as through +// the use of a header or cookie. Default is COOKIE. +type LoadBalancerSettings_SessionPersistence_Type = v1alpha3.LoadBalancerSettings_SessionPersistence_Type + +// Use a cookie to store the session affinity information. +const LoadBalancerSettings_SessionPersistence_COOKIE LoadBalancerSettings_SessionPersistence_Type = v1alpha3.LoadBalancerSettings_SessionPersistence_COOKIE + +// Use a header to store the session affinity information. +const LoadBalancerSettings_SessionPersistence_HEADER LoadBalancerSettings_SessionPersistence_Type = v1alpha3.LoadBalancerSettings_SessionPersistence_HEADER + // +kubebuilder:validation:XValidation:message="only one of warmupDurationSecs or warmup can be set",rule="oneof(self.warmupDurationSecs, self.warmup)" // Standard load balancing algorithms that require no tuning. type LoadBalancerSettings_SimpleLB = v1alpha3.LoadBalancerSettings_SimpleLB @@ -216,6 +230,7 @@ const LoadBalancerSettings_LEAST_REQUEST LoadBalancerSettings_SimpleLB = v1alpha type LoadBalancerSettings_Simple = v1alpha3.LoadBalancerSettings_Simple type LoadBalancerSettings_ConsistentHash = v1alpha3.LoadBalancerSettings_ConsistentHash +type LoadBalancerSettings_SessionPersistence_ = v1alpha3.LoadBalancerSettings_SessionPersistence_ type WarmupConfiguration = v1alpha3.WarmupConfiguration // Connection pool settings for an upstream host. The settings apply to
NameDescription
HEADER +

Use a header to store the session affinity information.

+