diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index 2fa63ba2c0..5525eaff50 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -6454,12 +6454,16 @@ spec: - routeConfiguration - required: - cluster + - required: + - waypoint - required: - listener - required: - routeConfiguration - required: - cluster + - required: + - waypoint properties: cluster: description: Match on envoy cluster attributes. @@ -6485,12 +6489,13 @@ spec: description: |- The specific config generation context to match on. - Valid Options: ANY, SIDECAR_INBOUND, SIDECAR_OUTBOUND, GATEWAY + Valid Options: ANY, SIDECAR_INBOUND, SIDECAR_OUTBOUND, GATEWAY, WAYPOINT enum: - ANY - SIDECAR_INBOUND - SIDECAR_OUTBOUND - GATEWAY + - WAYPOINT type: string listener: description: Match on envoy listener attributes. @@ -6620,7 +6625,48 @@ spec: type: object type: object type: object + waypoint: + description: Match on waypoint attributes. + properties: + filter: + description: The name of a specific filter to apply + the patch to. + properties: + name: + description: The filter name to match on. + type: string + subFilter: + description: The next level filter within this filter + to match on. + properties: + name: + description: The filter name to match on. + type: string + type: object + type: object + portNumber: + description: The service port to match on. + maximum: 4294967295 + minimum: 0 + type: integer + x-kubernetes-validations: + - message: port must be between 1-65535 + rule: 0 < self && self <= 6553 + route: + description: Match a specific route. + properties: + name: + description: The Route objects generated by default + are named as default. + type: string + type: object + type: object type: object + x-kubernetes-validations: + - message: only support waypointMatch when context is WAYPOINT + rule: |- + self.context == "WAYPOINT" && has(self.waypoint) || self.context != "WAYPOINT" && + !has(self.waypoint) patch: description: The patch to apply along with the operation. properties: diff --git a/networking/v1alpha3/envoy_filter.pb.go b/networking/v1alpha3/envoy_filter.pb.go index 81abdc4faf..8df3e06db7 100644 --- a/networking/v1alpha3/envoy_filter.pb.go +++ b/networking/v1alpha3/envoy_filter.pb.go @@ -553,6 +553,8 @@ const ( EnvoyFilter_SIDECAR_OUTBOUND EnvoyFilter_PatchContext = 2 // Gateway listener/route/cluster. EnvoyFilter_GATEWAY EnvoyFilter_PatchContext = 3 + // Waypoint listener/route/cluster. + EnvoyFilter_WAYPOINT EnvoyFilter_PatchContext = 4 ) // Enum value maps for EnvoyFilter_PatchContext. @@ -562,12 +564,14 @@ var ( 1: "SIDECAR_INBOUND", 2: "SIDECAR_OUTBOUND", 3: "GATEWAY", + 4: "WAYPOINT", } EnvoyFilter_PatchContext_value = map[string]int32{ "ANY": 0, "SIDECAR_INBOUND": 1, "SIDECAR_OUTBOUND": 2, "GATEWAY": 3, + "WAYPOINT": 4, } ) @@ -761,7 +765,7 @@ func (x EnvoyFilter_Patch_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use EnvoyFilter_Patch_Operation.Descriptor instead. func (EnvoyFilter_Patch_Operation) EnumDescriptor() ([]byte, []int) { - return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4, 0} + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 5, 0} } // FilterClass determines the filter insertion point in the filter chain @@ -827,7 +831,7 @@ func (x EnvoyFilter_Patch_FilterClass) Number() protoreflect.EnumNumber { // Deprecated: Use EnvoyFilter_Patch_FilterClass.Descriptor instead. func (EnvoyFilter_Patch_FilterClass) EnumDescriptor() ([]byte, []int) { - return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4, 1} + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 5, 1} } // EnvoyFilter provides a mechanism to customize the Envoy configuration @@ -1306,6 +1310,74 @@ func (x *EnvoyFilter_ListenerMatch) GetName() string { return "" } +type EnvoyFilter_WaypointMatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The service port to match on. + // If not specified, matches all ports. + // + // +kubebuilder:validation:XValidation:message="port must be between 1-65535",rule="0 < self && self <= 65535 + PortNumber uint32 `protobuf:"varint,1,opt,name=port_number,json=portNumber,proto3" json:"port_number,omitempty"` + // Match a specific route. + Route *EnvoyFilter_WaypointMatch_RouteMatch `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + // The name of a specific filter to apply the patch to. + // Set this to `envoy.filters.network.http_connection_manager` + // to add a filter or apply a patch to the HTTP connection manager. + Filter *EnvoyFilter_WaypointMatch_FilterMatch `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvoyFilter_WaypointMatch) Reset() { + *x = EnvoyFilter_WaypointMatch{} + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvoyFilter_WaypointMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvoyFilter_WaypointMatch) ProtoMessage() {} + +func (x *EnvoyFilter_WaypointMatch) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[5] + 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 EnvoyFilter_WaypointMatch.ProtoReflect.Descriptor instead. +func (*EnvoyFilter_WaypointMatch) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *EnvoyFilter_WaypointMatch) GetPortNumber() uint32 { + if x != nil { + return x.PortNumber + } + return 0 +} + +func (x *EnvoyFilter_WaypointMatch) GetRoute() *EnvoyFilter_WaypointMatch_RouteMatch { + if x != nil { + return x.Route + } + return nil +} + +func (x *EnvoyFilter_WaypointMatch) GetFilter() *EnvoyFilter_WaypointMatch_FilterMatch { + if x != nil { + return x.Filter + } + return nil +} + // Patch specifies how the selected object should be modified. type EnvoyFilter_Patch struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1322,7 +1394,7 @@ type EnvoyFilter_Patch struct { func (x *EnvoyFilter_Patch) Reset() { *x = EnvoyFilter_Patch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[5] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1334,7 +1406,7 @@ func (x *EnvoyFilter_Patch) String() string { func (*EnvoyFilter_Patch) ProtoMessage() {} func (x *EnvoyFilter_Patch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[5] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1347,7 +1419,7 @@ func (x *EnvoyFilter_Patch) ProtoReflect() protoreflect.Message { // Deprecated: Use EnvoyFilter_Patch.ProtoReflect.Descriptor instead. func (*EnvoyFilter_Patch) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4} + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 5} } func (x *EnvoyFilter_Patch) GetOperation() EnvoyFilter_Patch_Operation { @@ -1373,6 +1445,7 @@ func (x *EnvoyFilter_Patch) GetFilterClass() EnvoyFilter_Patch_FilterClass { // One or more match conditions to be met before a patch is applied // to the generated configuration for a given proxy. +// +kubebuilder:validation:XValidation:message="only support waypointMatch when context is WAYPOINT",rule="(self.context == 'WAYPOINT' && has(self.waypoint)) || (self.context != 'WAYPOINT' && !has(self.waypoint))" type EnvoyFilter_EnvoyConfigObjectMatch struct { state protoimpl.MessageState `protogen:"open.v1"` // The specific config generation context to match on. istiod @@ -1386,6 +1459,7 @@ type EnvoyFilter_EnvoyConfigObjectMatch struct { // *EnvoyFilter_EnvoyConfigObjectMatch_Listener // *EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration // *EnvoyFilter_EnvoyConfigObjectMatch_Cluster + // *EnvoyFilter_EnvoyConfigObjectMatch_Waypoint ObjectTypes isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes `protobuf_oneof:"object_types"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1393,7 +1467,7 @@ type EnvoyFilter_EnvoyConfigObjectMatch struct { func (x *EnvoyFilter_EnvoyConfigObjectMatch) Reset() { *x = EnvoyFilter_EnvoyConfigObjectMatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[6] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1405,7 +1479,7 @@ func (x *EnvoyFilter_EnvoyConfigObjectMatch) String() string { func (*EnvoyFilter_EnvoyConfigObjectMatch) ProtoMessage() {} func (x *EnvoyFilter_EnvoyConfigObjectMatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[6] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1418,7 +1492,7 @@ func (x *EnvoyFilter_EnvoyConfigObjectMatch) ProtoReflect() protoreflect.Message // Deprecated: Use EnvoyFilter_EnvoyConfigObjectMatch.ProtoReflect.Descriptor instead. func (*EnvoyFilter_EnvoyConfigObjectMatch) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 5} + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 6} } func (x *EnvoyFilter_EnvoyConfigObjectMatch) GetContext() EnvoyFilter_PatchContext { @@ -1469,6 +1543,15 @@ func (x *EnvoyFilter_EnvoyConfigObjectMatch) GetCluster() *EnvoyFilter_ClusterMa return nil } +func (x *EnvoyFilter_EnvoyConfigObjectMatch) GetWaypoint() *EnvoyFilter_WaypointMatch { + if x != nil { + if x, ok := x.ObjectTypes.(*EnvoyFilter_EnvoyConfigObjectMatch_Waypoint); ok { + return x.Waypoint + } + } + return nil +} + type isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes interface { isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() } @@ -1488,6 +1571,12 @@ type EnvoyFilter_EnvoyConfigObjectMatch_Cluster struct { Cluster *EnvoyFilter_ClusterMatch `protobuf:"bytes,5,opt,name=cluster,proto3,oneof"` } +type EnvoyFilter_EnvoyConfigObjectMatch_Waypoint struct { + // Match on waypoint attributes. + // Only work when patch context is WAYPOINT. + Waypoint *EnvoyFilter_WaypointMatch `protobuf:"bytes,6,opt,name=waypoint,proto3,oneof"` +} + func (*EnvoyFilter_EnvoyConfigObjectMatch_Listener) isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() { } @@ -1497,6 +1586,9 @@ func (*EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration) isEnvoyFilter_Envo func (*EnvoyFilter_EnvoyConfigObjectMatch_Cluster) isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() { } +func (*EnvoyFilter_EnvoyConfigObjectMatch_Waypoint) isEnvoyFilter_EnvoyConfigObjectMatch_ObjectTypes() { +} + // Changes to be made to various envoy config objects. type EnvoyFilter_EnvoyConfigObjectPatch struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1520,7 +1612,7 @@ type EnvoyFilter_EnvoyConfigObjectPatch struct { func (x *EnvoyFilter_EnvoyConfigObjectPatch) Reset() { *x = EnvoyFilter_EnvoyConfigObjectPatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[7] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1532,7 +1624,7 @@ func (x *EnvoyFilter_EnvoyConfigObjectPatch) String() string { func (*EnvoyFilter_EnvoyConfigObjectPatch) ProtoMessage() {} func (x *EnvoyFilter_EnvoyConfigObjectPatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[7] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1545,7 +1637,7 @@ func (x *EnvoyFilter_EnvoyConfigObjectPatch) ProtoReflect() protoreflect.Message // Deprecated: Use EnvoyFilter_EnvoyConfigObjectPatch.ProtoReflect.Descriptor instead. func (*EnvoyFilter_EnvoyConfigObjectPatch) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 6} + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 7} } func (x *EnvoyFilter_EnvoyConfigObjectPatch) GetApplyTo() EnvoyFilter_ApplyTo { @@ -1585,7 +1677,7 @@ type EnvoyFilter_RouteConfigurationMatch_RouteMatch struct { func (x *EnvoyFilter_RouteConfigurationMatch_RouteMatch) Reset() { *x = EnvoyFilter_RouteConfigurationMatch_RouteMatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[9] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1597,7 +1689,7 @@ func (x *EnvoyFilter_RouteConfigurationMatch_RouteMatch) String() string { func (*EnvoyFilter_RouteConfigurationMatch_RouteMatch) ProtoMessage() {} func (x *EnvoyFilter_RouteConfigurationMatch_RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[9] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1647,7 +1739,7 @@ type EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch struct { func (x *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) Reset() { *x = EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[10] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1659,7 +1751,7 @@ func (x *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) String() string { func (*EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) ProtoMessage() {} func (x *EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[10] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1740,7 +1832,7 @@ type EnvoyFilter_ListenerMatch_FilterChainMatch struct { func (x *EnvoyFilter_ListenerMatch_FilterChainMatch) Reset() { *x = EnvoyFilter_ListenerMatch_FilterChainMatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[11] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1752,7 +1844,7 @@ func (x *EnvoyFilter_ListenerMatch_FilterChainMatch) String() string { func (*EnvoyFilter_ListenerMatch_FilterChainMatch) ProtoMessage() {} func (x *EnvoyFilter_ListenerMatch_FilterChainMatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[11] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1827,7 +1919,7 @@ type EnvoyFilter_ListenerMatch_FilterMatch struct { func (x *EnvoyFilter_ListenerMatch_FilterMatch) Reset() { *x = EnvoyFilter_ListenerMatch_FilterMatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[12] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1839,7 +1931,7 @@ func (x *EnvoyFilter_ListenerMatch_FilterMatch) String() string { func (*EnvoyFilter_ListenerMatch_FilterMatch) ProtoMessage() {} func (x *EnvoyFilter_ListenerMatch_FilterMatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[12] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1883,7 +1975,7 @@ type EnvoyFilter_ListenerMatch_SubFilterMatch struct { func (x *EnvoyFilter_ListenerMatch_SubFilterMatch) Reset() { *x = EnvoyFilter_ListenerMatch_SubFilterMatch{} - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[13] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1895,7 +1987,7 @@ func (x *EnvoyFilter_ListenerMatch_SubFilterMatch) String() string { func (*EnvoyFilter_ListenerMatch_SubFilterMatch) ProtoMessage() {} func (x *EnvoyFilter_ListenerMatch_SubFilterMatch) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[13] + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1918,11 +2010,167 @@ func (x *EnvoyFilter_ListenerMatch_SubFilterMatch) GetName() string { return "" } +// Conditions specified in `RouteMatch` must be met for the patch +// to be applied to a route. +type EnvoyFilter_WaypointMatch_RouteMatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The Route objects generated by default are named as + // default. Route objects generated using a virtual service + // will carry the name used in the virtual service's HTTP + // routes. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvoyFilter_WaypointMatch_RouteMatch) Reset() { + *x = EnvoyFilter_WaypointMatch_RouteMatch{} + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvoyFilter_WaypointMatch_RouteMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvoyFilter_WaypointMatch_RouteMatch) ProtoMessage() {} + +func (x *EnvoyFilter_WaypointMatch_RouteMatch) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[15] + 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 EnvoyFilter_WaypointMatch_RouteMatch.ProtoReflect.Descriptor instead. +func (*EnvoyFilter_WaypointMatch_RouteMatch) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4, 0} +} + +func (x *EnvoyFilter_WaypointMatch_RouteMatch) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Conditions to match a specific filter within a filter chain. +type EnvoyFilter_WaypointMatch_FilterMatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The filter name to match on. + // For standard Envoy filters, [canonical filter](https://www.envoyproxy.io/docs/envoy/latest/version_history/v1.14.0#deprecated) + // names should be used. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The next level filter within this filter to match on. + // Typically used for HTTP Connection Manager filters. + SubFilter *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch `protobuf:"bytes,2,opt,name=sub_filter,json=subFilter,proto3" json:"sub_filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch) Reset() { + *x = EnvoyFilter_WaypointMatch_FilterMatch{} + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvoyFilter_WaypointMatch_FilterMatch) ProtoMessage() {} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[16] + 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 EnvoyFilter_WaypointMatch_FilterMatch.ProtoReflect.Descriptor instead. +func (*EnvoyFilter_WaypointMatch_FilterMatch) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4, 1} +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch) GetSubFilter() *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch { + if x != nil { + return x.SubFilter + } + return nil +} + +// Conditions to match a specific filter within another +// filter. This field is typically useful to match a HTTP filter +// inside the `envoy.filters.network.http_connection_manager` network filter. +type EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The filter name to match on. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) Reset() { + *x = EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch{} + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) ProtoMessage() {} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_envoy_filter_proto_msgTypes[17] + 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 EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch.ProtoReflect.Descriptor instead. +func (*EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP(), []int{0, 4, 1, 0} +} + +func (x *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) GetName() string { + if x != nil { + return x.Name + } + return "" +} + var File_networking_v1alpha3_envoy_filter_proto protoreflect.FileDescriptor const file_networking_v1alpha3_envoy_filter_proto_rawDesc = "" + "\n" + - "&networking/v1alpha3/envoy_filter.proto\x12\x19istio.networking.v1alpha3\x1a\x1cgoogle/protobuf/struct.proto\x1a!networking/v1alpha3/sidecar.proto\x1a\x1btype/v1beta1/selector.proto\"\x86\x1b\n" + + "&networking/v1alpha3/envoy_filter.proto\x12\x19istio.networking.v1alpha3\x1a\x1cgoogle/protobuf/struct.proto\x1a!networking/v1alpha3/sidecar.proto\x1a\x1btype/v1beta1/selector.proto\"\xa8\x1f\n" + "\vEnvoyFilter\x12X\n" + "\x11workload_selector\x18\x03 \x01(\v2+.istio.networking.v1alpha3.WorkloadSelectorR\x10workloadSelector\x12I\n" + "\n" + @@ -1983,6 +2231,20 @@ const file_networking_v1alpha3_envoy_filter_proto_rawDesc = "" + "\n" + "sub_filter\x18\x02 \x01(\v2C.istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.SubFilterMatchR\tsubFilter\x1a$\n" + "\x0eSubFilterMatch\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x1a\xbd\x03\n" + + "\rWaypointMatch\x12\x1f\n" + + "\vport_number\x18\x01 \x01(\rR\n" + + "portNumber\x12U\n" + + "\x05route\x18\x02 \x01(\v2?.istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.RouteMatchR\x05route\x12X\n" + + "\x06filter\x18\x03 \x01(\v2@.istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatchR\x06filter\x1a \n" + + "\n" + + "RouteMatch\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x1a\xb7\x01\n" + + "\vFilterMatch\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12n\n" + + "\n" + + "sub_filter\x18\x02 \x01(\v2O.istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatch.SubFilterMatchR\tsubFilter\x1a$\n" + + "\x0eSubFilterMatch\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x1a\xa8\x03\n" + "\x05Patch\x12T\n" + "\toperation\x18\x01 \x01(\x0e26.istio.networking.v1alpha3.EnvoyFilter.Patch.OperationR\toperation\x12-\n" + @@ -2002,13 +2264,14 @@ const file_networking_v1alpha3_envoy_filter_proto_rawDesc = "" + "\vUNSPECIFIED\x10\x00\x12\t\n" + "\x05AUTHN\x10\x01\x12\t\n" + "\x05AUTHZ\x10\x02\x12\t\n" + - "\x05STATS\x10\x03\x1a\xd8\x03\n" + + "\x05STATS\x10\x03\x1a\xac\x04\n" + "\x16EnvoyConfigObjectMatch\x12M\n" + "\acontext\x18\x01 \x01(\x0e23.istio.networking.v1alpha3.EnvoyFilter.PatchContextR\acontext\x12G\n" + "\x05proxy\x18\x02 \x01(\v21.istio.networking.v1alpha3.EnvoyFilter.ProxyMatchR\x05proxy\x12R\n" + "\blistener\x18\x03 \x01(\v24.istio.networking.v1alpha3.EnvoyFilter.ListenerMatchH\x00R\blistener\x12q\n" + "\x13route_configuration\x18\x04 \x01(\v2>.istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatchH\x00R\x12routeConfiguration\x12O\n" + - "\acluster\x18\x05 \x01(\v23.istio.networking.v1alpha3.EnvoyFilter.ClusterMatchH\x00R\aclusterB\x0e\n" + + "\acluster\x18\x05 \x01(\v23.istio.networking.v1alpha3.EnvoyFilter.ClusterMatchH\x00R\acluster\x12R\n" + + "\bwaypoint\x18\x06 \x01(\v24.istio.networking.v1alpha3.EnvoyFilter.WaypointMatchH\x00R\bwaypointB\x0e\n" + "\fobject_types\x1a\xfc\x01\n" + "\x16EnvoyConfigObjectPatch\x12I\n" + "\bapply_to\x18\x01 \x01(\x0e2..istio.networking.v1alpha3.EnvoyFilter.ApplyToR\aapplyTo\x12S\n" + @@ -2028,12 +2291,13 @@ const file_networking_v1alpha3_envoy_filter_proto_rawDesc = "" + "\x10EXTENSION_CONFIG\x10\t\x12\r\n" + "\tBOOTSTRAP\x10\n" + "\x12\x13\n" + - "\x0fLISTENER_FILTER\x10\v\"O\n" + + "\x0fLISTENER_FILTER\x10\v\"]\n" + "\fPatchContext\x12\a\n" + "\x03ANY\x10\x00\x12\x13\n" + "\x0fSIDECAR_INBOUND\x10\x01\x12\x14\n" + "\x10SIDECAR_OUTBOUND\x10\x02\x12\v\n" + - "\aGATEWAY\x10\x03J\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\afiltersR\x0fworkload_labelsB\"Z istio.io/api/networking/v1alpha3b\x06proto3" + "\aGATEWAY\x10\x03\x12\f\n" + + "\bWAYPOINT\x10\x04J\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\afiltersR\x0fworkload_labelsB\"Z istio.io/api/networking/v1alpha3b\x06proto3" var ( file_networking_v1alpha3_envoy_filter_proto_rawDescOnce sync.Once @@ -2048,7 +2312,7 @@ func file_networking_v1alpha3_envoy_filter_proto_rawDescGZIP() []byte { } var file_networking_v1alpha3_envoy_filter_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_networking_v1alpha3_envoy_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_networking_v1alpha3_envoy_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_networking_v1alpha3_envoy_filter_proto_goTypes = []any{ (EnvoyFilter_ApplyTo)(0), // 0: istio.networking.v1alpha3.EnvoyFilter.ApplyTo (EnvoyFilter_PatchContext)(0), // 1: istio.networking.v1alpha3.EnvoyFilter.PatchContext @@ -2060,46 +2324,54 @@ var file_networking_v1alpha3_envoy_filter_proto_goTypes = []any{ (*EnvoyFilter_ClusterMatch)(nil), // 7: istio.networking.v1alpha3.EnvoyFilter.ClusterMatch (*EnvoyFilter_RouteConfigurationMatch)(nil), // 8: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch (*EnvoyFilter_ListenerMatch)(nil), // 9: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch - (*EnvoyFilter_Patch)(nil), // 10: istio.networking.v1alpha3.EnvoyFilter.Patch - (*EnvoyFilter_EnvoyConfigObjectMatch)(nil), // 11: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch - (*EnvoyFilter_EnvoyConfigObjectPatch)(nil), // 12: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch - nil, // 13: istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.MetadataEntry - (*EnvoyFilter_RouteConfigurationMatch_RouteMatch)(nil), // 14: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch - (*EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch)(nil), // 15: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch - (*EnvoyFilter_ListenerMatch_FilterChainMatch)(nil), // 16: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch - (*EnvoyFilter_ListenerMatch_FilterMatch)(nil), // 17: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch - (*EnvoyFilter_ListenerMatch_SubFilterMatch)(nil), // 18: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.SubFilterMatch - (*WorkloadSelector)(nil), // 19: istio.networking.v1alpha3.WorkloadSelector - (*v1beta1.PolicyTargetReference)(nil), // 20: istio.type.v1beta1.PolicyTargetReference - (*_struct.Struct)(nil), // 21: google.protobuf.Struct + (*EnvoyFilter_WaypointMatch)(nil), // 10: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch + (*EnvoyFilter_Patch)(nil), // 11: istio.networking.v1alpha3.EnvoyFilter.Patch + (*EnvoyFilter_EnvoyConfigObjectMatch)(nil), // 12: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch + (*EnvoyFilter_EnvoyConfigObjectPatch)(nil), // 13: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch + nil, // 14: istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.MetadataEntry + (*EnvoyFilter_RouteConfigurationMatch_RouteMatch)(nil), // 15: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch + (*EnvoyFilter_RouteConfigurationMatch_VirtualHostMatch)(nil), // 16: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch + (*EnvoyFilter_ListenerMatch_FilterChainMatch)(nil), // 17: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch + (*EnvoyFilter_ListenerMatch_FilterMatch)(nil), // 18: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch + (*EnvoyFilter_ListenerMatch_SubFilterMatch)(nil), // 19: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.SubFilterMatch + (*EnvoyFilter_WaypointMatch_RouteMatch)(nil), // 20: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.RouteMatch + (*EnvoyFilter_WaypointMatch_FilterMatch)(nil), // 21: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatch + (*EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch)(nil), // 22: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatch.SubFilterMatch + (*WorkloadSelector)(nil), // 23: istio.networking.v1alpha3.WorkloadSelector + (*v1beta1.PolicyTargetReference)(nil), // 24: istio.type.v1beta1.PolicyTargetReference + (*_struct.Struct)(nil), // 25: google.protobuf.Struct } var file_networking_v1alpha3_envoy_filter_proto_depIdxs = []int32{ - 19, // 0: istio.networking.v1alpha3.EnvoyFilter.workload_selector:type_name -> istio.networking.v1alpha3.WorkloadSelector - 20, // 1: istio.networking.v1alpha3.EnvoyFilter.targetRefs:type_name -> istio.type.v1beta1.PolicyTargetReference - 12, // 2: istio.networking.v1alpha3.EnvoyFilter.config_patches:type_name -> istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch - 13, // 3: istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.metadata:type_name -> istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.MetadataEntry - 15, // 4: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.vhost:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch - 16, // 5: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.filter_chain:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch - 3, // 6: istio.networking.v1alpha3.EnvoyFilter.Patch.operation:type_name -> istio.networking.v1alpha3.EnvoyFilter.Patch.Operation - 21, // 7: istio.networking.v1alpha3.EnvoyFilter.Patch.value:type_name -> google.protobuf.Struct - 4, // 8: istio.networking.v1alpha3.EnvoyFilter.Patch.filter_class:type_name -> istio.networking.v1alpha3.EnvoyFilter.Patch.FilterClass - 1, // 9: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.context:type_name -> istio.networking.v1alpha3.EnvoyFilter.PatchContext - 6, // 10: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.proxy:type_name -> istio.networking.v1alpha3.EnvoyFilter.ProxyMatch - 9, // 11: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.listener:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch - 8, // 12: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.route_configuration:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch - 7, // 13: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.cluster:type_name -> istio.networking.v1alpha3.EnvoyFilter.ClusterMatch - 0, // 14: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch.apply_to:type_name -> istio.networking.v1alpha3.EnvoyFilter.ApplyTo - 11, // 15: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch.match:type_name -> istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch - 10, // 16: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch.patch:type_name -> istio.networking.v1alpha3.EnvoyFilter.Patch - 2, // 17: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch.action:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch.Action - 14, // 18: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch.route:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch - 17, // 19: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch.filter:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch - 18, // 20: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch.sub_filter:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.SubFilterMatch - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 23, // 0: istio.networking.v1alpha3.EnvoyFilter.workload_selector:type_name -> istio.networking.v1alpha3.WorkloadSelector + 24, // 1: istio.networking.v1alpha3.EnvoyFilter.targetRefs:type_name -> istio.type.v1beta1.PolicyTargetReference + 13, // 2: istio.networking.v1alpha3.EnvoyFilter.config_patches:type_name -> istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch + 14, // 3: istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.metadata:type_name -> istio.networking.v1alpha3.EnvoyFilter.ProxyMatch.MetadataEntry + 16, // 4: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.vhost:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch + 17, // 5: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.filter_chain:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch + 20, // 6: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.route:type_name -> istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.RouteMatch + 21, // 7: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.filter:type_name -> istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatch + 3, // 8: istio.networking.v1alpha3.EnvoyFilter.Patch.operation:type_name -> istio.networking.v1alpha3.EnvoyFilter.Patch.Operation + 25, // 9: istio.networking.v1alpha3.EnvoyFilter.Patch.value:type_name -> google.protobuf.Struct + 4, // 10: istio.networking.v1alpha3.EnvoyFilter.Patch.filter_class:type_name -> istio.networking.v1alpha3.EnvoyFilter.Patch.FilterClass + 1, // 11: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.context:type_name -> istio.networking.v1alpha3.EnvoyFilter.PatchContext + 6, // 12: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.proxy:type_name -> istio.networking.v1alpha3.EnvoyFilter.ProxyMatch + 9, // 13: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.listener:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch + 8, // 14: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.route_configuration:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch + 7, // 15: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.cluster:type_name -> istio.networking.v1alpha3.EnvoyFilter.ClusterMatch + 10, // 16: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch.waypoint:type_name -> istio.networking.v1alpha3.EnvoyFilter.WaypointMatch + 0, // 17: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch.apply_to:type_name -> istio.networking.v1alpha3.EnvoyFilter.ApplyTo + 12, // 18: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch.match:type_name -> istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectMatch + 11, // 19: istio.networking.v1alpha3.EnvoyFilter.EnvoyConfigObjectPatch.patch:type_name -> istio.networking.v1alpha3.EnvoyFilter.Patch + 2, // 20: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch.action:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch.Action + 15, // 21: istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.VirtualHostMatch.route:type_name -> istio.networking.v1alpha3.EnvoyFilter.RouteConfigurationMatch.RouteMatch + 18, // 22: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterChainMatch.filter:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch + 19, // 23: istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.FilterMatch.sub_filter:type_name -> istio.networking.v1alpha3.EnvoyFilter.ListenerMatch.SubFilterMatch + 22, // 24: istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatch.sub_filter:type_name -> istio.networking.v1alpha3.EnvoyFilter.WaypointMatch.FilterMatch.SubFilterMatch + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_networking_v1alpha3_envoy_filter_proto_init() } @@ -2108,10 +2380,11 @@ func file_networking_v1alpha3_envoy_filter_proto_init() { return } file_networking_v1alpha3_sidecar_proto_init() - file_networking_v1alpha3_envoy_filter_proto_msgTypes[6].OneofWrappers = []any{ + file_networking_v1alpha3_envoy_filter_proto_msgTypes[7].OneofWrappers = []any{ (*EnvoyFilter_EnvoyConfigObjectMatch_Listener)(nil), (*EnvoyFilter_EnvoyConfigObjectMatch_RouteConfiguration)(nil), (*EnvoyFilter_EnvoyConfigObjectMatch_Cluster)(nil), + (*EnvoyFilter_EnvoyConfigObjectMatch_Waypoint)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2119,7 +2392,7 @@ func file_networking_v1alpha3_envoy_filter_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_networking_v1alpha3_envoy_filter_proto_rawDesc), len(file_networking_v1alpha3_envoy_filter_proto_rawDesc)), NumEnums: 5, - NumMessages: 14, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/networking/v1alpha3/envoy_filter.pb.html b/networking/v1alpha3/envoy_filter.pb.html index 01155c1048..e132997e1e 100644 --- a/networking/v1alpha3/envoy_filter.pb.html +++ b/networking/v1alpha3/envoy_filter.pb.html @@ -6,7 +6,7 @@ generator: protoc-gen-docs schema: istio.networking.v1alpha3.EnvoyFilter aliases: [/docs/reference/config/networking/v1alpha3/envoy-filter] -number_of_entries: 18 +number_of_entries: 22 ---

EnvoyFilter provides a mechanism to customize the Envoy configuration generated by istiod. Use EnvoyFilter to modify @@ -981,6 +981,139 @@

SubFilterMatch

The filter name to match on.

+ + + + + +

WaypointMatch

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+
uint32
+
+

The service port to match on. +If not specified, matches all ports.

+ +
+

Match a specific route.

+ +
+

The name of a specific filter to apply the patch to. +Set this to envoy.filters.network.http_connection_manager +to add a filter or apply a patch to the HTTP connection manager.

+ +
+
+

RouteMatch

+
+

Conditions specified in RouteMatch must be met for the patch +to be applied to a route.

+ + + + + + + + + + + + + + +
FieldDescription
+
string
+
+

The Route objects generated by default are named as +default. Route objects generated using a virtual service +will carry the name used in the virtual service’s HTTP +routes.

+ +
+
+

FilterMatch

+
+

Conditions to match a specific filter within a filter chain.

+ + + + + + + + + + + + + + + + + + +
FieldDescription
+
string
+
+

The filter name to match on. +For standard Envoy filters, canonical filter +names should be used.

+ +
+

The next level filter within this filter to match on. +Typically used for HTTP Connection Manager filters.

+ +
+
+
SubFilterMatch
+
+

Conditions to match a specific filter within another +filter. This field is typically useful to match a HTTP filter +inside the envoy.filters.network.http_connection_manager network filter.

+ + + + + + + + + + + + @@ -1245,6 +1378,16 @@

EnvoyConfigObjectMatch

+ + + + @@ -1444,6 +1587,13 @@

PatchContext

+ + + + diff --git a/networking/v1alpha3/envoy_filter.proto b/networking/v1alpha3/envoy_filter.proto index 3cfbf215a5..c8854eb682 100644 --- a/networking/v1alpha3/envoy_filter.proto +++ b/networking/v1alpha3/envoy_filter.proto @@ -512,6 +512,9 @@ message EnvoyFilter { // Gateway listener/route/cluster. GATEWAY = 3; + + // Waypoint listener/route/cluster. + WAYPOINT = 4; } // One or more properties of the proxy to match on. @@ -730,6 +733,51 @@ message EnvoyFilter { string name = 4; } + message WaypointMatch { + // The service port to match on. + // If not specified, matches all ports. + // + // +kubebuilder:validation:XValidation:message="port must be between 1-65535",rule="0 < self && self <= 65535 + uint32 port_number = 1; + + // Conditions specified in `RouteMatch` must be met for the patch + // to be applied to a route. + message RouteMatch { + // The Route objects generated by default are named as + // default. Route objects generated using a virtual service + // will carry the name used in the virtual service's HTTP + // routes. + string name = 1; + } + + // Match a specific route. + RouteMatch route = 2; + + // Conditions to match a specific filter within a filter chain. + message FilterMatch { + // The filter name to match on. + // For standard Envoy filters, [canonical filter](https://www.envoyproxy.io/docs/envoy/latest/version_history/v1.14.0#deprecated) + // names should be used. + string name = 1; + + // Conditions to match a specific filter within another + // filter. This field is typically useful to match a HTTP filter + // inside the `envoy.filters.network.http_connection_manager` network filter. + message SubFilterMatch { + // The filter name to match on. + string name = 1; + } + + // The next level filter within this filter to match on. + // Typically used for HTTP Connection Manager filters. + SubFilterMatch sub_filter = 2; + } + // The name of a specific filter to apply the patch to. + // Set this to `envoy.filters.network.http_connection_manager` + // to add a filter or apply a patch to the HTTP connection manager. + FilterMatch filter = 3; + } + // Patch specifies how the selected object should be modified. message Patch { // Operation denotes how the patch should be applied to the selected @@ -832,6 +880,7 @@ message EnvoyFilter { // One or more match conditions to be met before a patch is applied // to the generated configuration for a given proxy. + // +kubebuilder:validation:XValidation:message="only support waypointMatch when context is WAYPOINT",rule="(self.context == 'WAYPOINT' && has(self.waypoint)) || (self.context != 'WAYPOINT' && !has(self.waypoint))" message EnvoyConfigObjectMatch { // The specific config generation context to match on. istiod // generates envoy configuration in the context of a gateway, @@ -848,6 +897,9 @@ message EnvoyFilter { RouteConfigurationMatch route_configuration = 4; // Match on envoy cluster attributes. ClusterMatch cluster = 5; + // Match on waypoint attributes. + // Only work when patch context is WAYPOINT. + WaypointMatch waypoint = 6; } } diff --git a/networking/v1alpha3/envoy_filter_deepcopy.gen.go b/networking/v1alpha3/envoy_filter_deepcopy.gen.go index 1d402e3b86..efdaf895c1 100644 --- a/networking/v1alpha3/envoy_filter_deepcopy.gen.go +++ b/networking/v1alpha3/envoy_filter_deepcopy.gen.go @@ -215,6 +215,90 @@ func (in *EnvoyFilter_ListenerMatch_SubFilterMatch) DeepCopyInterface() interfac return in.DeepCopy() } +// DeepCopyInto supports using EnvoyFilter_WaypointMatch within kubernetes types, where deepcopy-gen is used. +func (in *EnvoyFilter_WaypointMatch) DeepCopyInto(out *EnvoyFilter_WaypointMatch) { + p := proto.Clone(in).(*EnvoyFilter_WaypointMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch) DeepCopy() *EnvoyFilter_WaypointMatch { + if in == nil { + return nil + } + out := new(EnvoyFilter_WaypointMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using EnvoyFilter_WaypointMatch_RouteMatch within kubernetes types, where deepcopy-gen is used. +func (in *EnvoyFilter_WaypointMatch_RouteMatch) DeepCopyInto(out *EnvoyFilter_WaypointMatch_RouteMatch) { + p := proto.Clone(in).(*EnvoyFilter_WaypointMatch_RouteMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch_RouteMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch_RouteMatch) DeepCopy() *EnvoyFilter_WaypointMatch_RouteMatch { + if in == nil { + return nil + } + out := new(EnvoyFilter_WaypointMatch_RouteMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch_RouteMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch_RouteMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using EnvoyFilter_WaypointMatch_FilterMatch within kubernetes types, where deepcopy-gen is used. +func (in *EnvoyFilter_WaypointMatch_FilterMatch) DeepCopyInto(out *EnvoyFilter_WaypointMatch_FilterMatch) { + p := proto.Clone(in).(*EnvoyFilter_WaypointMatch_FilterMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch_FilterMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch_FilterMatch) DeepCopy() *EnvoyFilter_WaypointMatch_FilterMatch { + if in == nil { + return nil + } + out := new(EnvoyFilter_WaypointMatch_FilterMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch_FilterMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch_FilterMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch within kubernetes types, where deepcopy-gen is used. +func (in *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) DeepCopyInto(out *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) { + p := proto.Clone(in).(*EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) DeepCopy() *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch { + if in == nil { + return nil + } + out := new(EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch. Required by controller-gen. +func (in *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + // DeepCopyInto supports using EnvoyFilter_Patch within kubernetes types, where deepcopy-gen is used. func (in *EnvoyFilter_Patch) DeepCopyInto(out *EnvoyFilter_Patch) { p := proto.Clone(in).(*EnvoyFilter_Patch) diff --git a/networking/v1alpha3/envoy_filter_json.gen.go b/networking/v1alpha3/envoy_filter_json.gen.go index 24c1268e55..85de2d0f0d 100644 --- a/networking/v1alpha3/envoy_filter_json.gen.go +++ b/networking/v1alpha3/envoy_filter_json.gen.go @@ -116,6 +116,50 @@ func (this *EnvoyFilter_ListenerMatch_SubFilterMatch) UnmarshalJSON(b []byte) er return EnvoyFilterUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for EnvoyFilter_WaypointMatch +func (this *EnvoyFilter_WaypointMatch) MarshalJSON() ([]byte, error) { + str, err := EnvoyFilterMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EnvoyFilter_WaypointMatch +func (this *EnvoyFilter_WaypointMatch) UnmarshalJSON(b []byte) error { + return EnvoyFilterUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for EnvoyFilter_WaypointMatch_RouteMatch +func (this *EnvoyFilter_WaypointMatch_RouteMatch) MarshalJSON() ([]byte, error) { + str, err := EnvoyFilterMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EnvoyFilter_WaypointMatch_RouteMatch +func (this *EnvoyFilter_WaypointMatch_RouteMatch) UnmarshalJSON(b []byte) error { + return EnvoyFilterUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for EnvoyFilter_WaypointMatch_FilterMatch +func (this *EnvoyFilter_WaypointMatch_FilterMatch) MarshalJSON() ([]byte, error) { + str, err := EnvoyFilterMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EnvoyFilter_WaypointMatch_FilterMatch +func (this *EnvoyFilter_WaypointMatch_FilterMatch) UnmarshalJSON(b []byte) error { + return EnvoyFilterUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch +func (this *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) MarshalJSON() ([]byte, error) { + str, err := EnvoyFilterMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch +func (this *EnvoyFilter_WaypointMatch_FilterMatch_SubFilterMatch) UnmarshalJSON(b []byte) error { + return EnvoyFilterUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + // MarshalJSON is a custom marshaler for EnvoyFilter_Patch func (this *EnvoyFilter_Patch) MarshalJSON() ([]byte, error) { str, err := EnvoyFilterMarshaler.MarshalToString(this) diff --git a/tests/testdata/envoyfilter-invalid.yaml b/tests/testdata/envoyfilter-invalid.yaml new file mode 100644 index 0000000000..df1d6681aa --- /dev/null +++ b/tests/testdata/envoyfilter-invalid.yaml @@ -0,0 +1,46 @@ +_err: 'spec.configPatches[0].match: Invalid value: "object": only support waypointMatch when context is WAYPOINT' +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: waypoint-wrong-context +spec: + configPatches: + - applyTo: HTTP_FILTER + match: + context: SIDECAR_INBOUND + waypoint: + filter: + name: "envoy.filters.network.http_connection_manager" + subFilter: + name: "envoy.filters.http.router" +--- +_err: 'spec.configPatches[0].match: Invalid value: "object": only support waypointMatch when context is WAYPOINT' +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: waypoint-wrong-match +spec: + configPatches: + - applyTo: HTTP_FILTER + match: + context: WAYPOINT + listener: + filterChain: + filter: + name: "envoy.filters.network.http_connection_manager" + subFilter: + name: "envoy.filters.http.router" +--- +_err: 'spec.configPatches[0].match.waypoint.portNumber: Invalid value: "integer": port must be between 1-65535' +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: waypoint-wrong-port +spec: + configPatches: + - applyTo: HTTP_FILTER + match: + context: WAYPOINT + waypoint: + portNumber: 65536 +--- \ No newline at end of file diff --git a/tests/testdata/envoyfilter-valid.yaml b/tests/testdata/envoyfilter-valid.yaml new file mode 100644 index 0000000000..359d39fa69 --- /dev/null +++ b/tests/testdata/envoyfilter-valid.yaml @@ -0,0 +1,38 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: waypoint-http-filter +spec: + configPatches: + - applyTo: HTTP_FILTER + match: + context: WAYPOINT + waypoint: + filter: + name: "envoy.filters.network.http_connection_manager" + subFilter: + name: "envoy.filters.http.router" +--- +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: waypoint-cluster +spec: + configPatches: + - applyTo: CLUSTER + match: + context: WAYPOINT + waypoint: {} +--- +apiVersion: networking.istio.io/v1alpha3 +kind: EnvoyFilter +metadata: + name: add-cluster +spec: + configPatches: + - applyTo: CLUSTER + patch: + operation: ADD + value: # cluster specification + name: "lua_cluster" +---
FieldDescription
+
string
+
+

The filter name to match on.

+

Match on envoy cluster attributes.

+
+

Match on waypoint attributes. +Only work when patch context is WAYPOINT.

+

Gateway listener/route/cluster.

+
WAYPOINT +

Waypoint listener/route/cluster.

+