diff --git a/routing/v1alpha2/gateway.pb.go b/routing/v1alpha2/gateway.pb.go index 3c576807c5d..a52d22660ac 100644 --- a/routing/v1alpha2/gateway.pb.go +++ b/routing/v1alpha2/gateway.pb.go @@ -145,6 +145,7 @@ func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { // - eu.bookinfo.com // gateways: // - my-gateway +// - mesh # applies to all the sidecars in the mesh // http: // - match: // - headers: @@ -168,8 +169,10 @@ func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { // name: reviews.qa // weight: 20 // -// The following routing rule forwards traffic arriving at (external) -// port 2379 from 172.17.16.* subnet to internal Mongo server on port 5555. +// The following routing rule forwards traffic arriving at (external) port +// 2379 from 172.17.16.0/24 subnet to internal Mongo server on port 5555. This +// rule is not applicable internally in the mesh as the gateway list omits +// the reserved name "mesh". // // apiVersion: config.istio.io/v1alpha2 // kind: RouteRule @@ -189,26 +192,6 @@ func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { // - destination: // name: mongo.prod // -// By default, if there is no wildcard, HTTP requests for unknown domains -// or requests that have no matching route rule will respond with a 404. If -// a specific default behavior is desired at the ingress, add a route rule -// with a wildcard host and the desired backend. For example, the following -// wildcard routing rule routes all traffic to homepage.prod by default. -// -// apiVersion: config.istio.io/v1alpha2 -// kind: RouteRule -// metadata: -// name: default-ingress -// spec: -// hosts: -// - * -// gateways: -// - my-gateway -// http: -// - route: -// - destination: -// name: homepage.prod -// type Gateway struct { // REQUIRED: A list of server specifications. Servers []*Server `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"` diff --git a/routing/v1alpha2/gateway.proto b/routing/v1alpha2/gateway.proto index 74ccfc1ed51..130eb886972 100644 --- a/routing/v1alpha2/gateway.proto +++ b/routing/v1alpha2/gateway.proto @@ -86,6 +86,7 @@ package istio.routing.v1alpha2; // - eu.bookinfo.com // gateways: // - my-gateway +// - mesh # applies to all the sidecars in the mesh // http: // - match: // - headers: @@ -109,8 +110,10 @@ package istio.routing.v1alpha2; // name: reviews.qa // weight: 20 // -// The following routing rule forwards traffic arriving at (external) -// port 2379 from 172.17.16.* subnet to internal Mongo server on port 5555. +// The following routing rule forwards traffic arriving at (external) port +// 2379 from 172.17.16.0/24 subnet to internal Mongo server on port 5555. This +// rule is not applicable internally in the mesh as the gateway list omits +// the reserved name "mesh". // // apiVersion: config.istio.io/v1alpha2 // kind: RouteRule @@ -130,26 +133,6 @@ package istio.routing.v1alpha2; // - destination: // name: mongo.prod // -// By default, if there is no wildcard, HTTP requests for unknown domains -// or requests that have no matching route rule will respond with a 404. If -// a specific default behavior is desired at the ingress, add a route rule -// with a wildcard host and the desired backend. For example, the following -// wildcard routing rule routes all traffic to homepage.prod by default. -// -// apiVersion: config.istio.io/v1alpha2 -// kind: RouteRule -// metadata: -// name: default-ingress -// spec: -// hosts: -// - * -// gateways: -// - my-gateway -// http: -// - route: -// - destination: -// name: homepage.prod -// message Gateway { // REQUIRED: A list of server specifications. repeated Server servers = 1; diff --git a/routing/v1alpha2/route_rule.pb.go b/routing/v1alpha2/route_rule.pb.go index d0dea4f1abd..c98885f1e56 100644 --- a/routing/v1alpha2/route_rule.pb.go +++ b/routing/v1alpha2/route_rule.pb.go @@ -57,7 +57,9 @@ var _ = math.Inf // For example, the following rule routes all traffic by default to pods of // reviews service with label "version: v1". In addition, HTTP requests // containing for /wpcatalog/, /consumercatalog/ url prefixes will be -// rewritten to /api/v2 and send to pods with label version: v2. +// rewritten to /api/v2 and send to pods with label version: v2. The rule +// will be applied at the gateway named "bookinfo" as well as at all the +// sidecars in the mesh (indicated by the reserved gateway name "mesh"). // // apiVersion: config.istio.io/v1alpha2 // kind: RouteRule @@ -66,6 +68,9 @@ var _ = math.Inf // spec: // hosts: // - reviews +// gateways: #if omitted, defaults to "sidecars" +// - bookinfo +// - mesh // http: // - match: // - uri: @@ -111,13 +116,16 @@ type RouteRule struct { // case of TCP services, the plain service name or an IP address with // CIDR prefix can be used. Hosts []string `protobuf:"bytes,1,rep,name=hosts" json:"hosts,omitempty"` - // The names of gateways that should apply these routes. A single route - // rule could be used for sources inside the mesh as well as one or more - // gateways. The selection condition imposed by this field is - // independant of the sourceLabels match condition in HTTP/TCP routes. It - // is possible to define a route rule that applies to both the gateway - // and a specific internal workload by specifying gateways as well as the - // source match condition in HTTP/TCP routes. + // The names of gateways and sidecars that should apply these routes. A + // single route rule is used for sidecars inside the mesh as well + // as for one or more gateways. The selection condition imposed by this field + // can be overridden using the source field in the match conditions of HTTP/TCP + // routes. The reserved word "mesh" is used to imply all the sidecars in + // the mesh. When this field is omitted, the default gateway ("mesh") + // will be used, which would apply the rule to all sidecars in the + // mesh. If a list of gateway names is provided, the rule will apply + // only to the gateways. To apply a rule to both gateways and sidecars, + // specify "mesh" as one of the gateway names. Gateways []string `protobuf:"bytes,2,rep,name=gateways" json:"gateways,omitempty"` // A list of routes for HTTP traffic. Http []*HTTPRoute `protobuf:"bytes,3,rep,name=http" json:"http,omitempty"` @@ -367,7 +375,7 @@ func (m *HTTPRoute) GetAppendHeaders() map[string]string { // tcp: // - match: // - port: -// name: Mongo #only applies to ports named Mongo +// name: Mongo # only applies to ports named Mongo // sourceSubnet: "172.17.16.0/24" // route: // - destination: @@ -409,7 +417,7 @@ func (m *TCPRoute) GetRoute() []*DestinationWeight { // route rule to be applied to the HTTP request. For example, the following // route rule restricts the rule to match only requests where the URL path // starts with /ratings/v2/ and the request contains a "cookie" with value -// "user=jason", +// "user=jason". // // apiVersion: config.istio.io/v1alpha2 // kind: RouteRule @@ -494,8 +502,14 @@ type HTTPMatchRequest struct { // same protocol the names should be of the form -. Port *PortSelector `protobuf:"bytes,6,opt,name=port" json:"port,omitempty"` // One or more labels that constrain the applicability of a rule to - // sources with the given labels. + // workloads with the given labels. If the route rule has a list of + // gateways specified at the top, it should include the reserved gateway + // "mesh" in order for this field to be applicable. SourceLabels map[string]string `protobuf:"bytes,7,rep,name=source_labels,json=sourceLabels" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Names of gateways where the rule should be applied to. Gateway names + // at the top of the rule (if any) are overridden. The gateway match is + // independent of sourceLabels. + Gateways []string `protobuf:"bytes,8,rep,name=gateways" json:"gateways,omitempty"` } func (m *HTTPMatchRequest) Reset() { *m = HTTPMatchRequest{} } @@ -552,6 +566,13 @@ func (m *HTTPMatchRequest) GetSourceLabels() map[string]string { return nil } +func (m *HTTPMatchRequest) GetGateways() []string { + if m != nil { + return m.Gateways + } + return nil +} + // Each routing rule is associated with one or more service versions (see // glossary in beginning of document). Weights associated with the version // determine the proportion of traffic it receives. For example, the @@ -630,8 +651,14 @@ type L4MatchAttributes struct { // form or just a.b.c.d SourceSubnet string `protobuf:"bytes,3,opt,name=source_subnet,json=sourceSubnet" json:"source_subnet,omitempty"` // One or more labels that constrain the applicability of a rule to - // sources with the given labels. + // workloads with the given labels. If the route rule has a list of + // gateways specified at the top, it should include the reserved gateway + // "mesh" in order for this field to be applicable. SourceLabels map[string]string `protobuf:"bytes,4,rep,name=source_labels,json=sourceLabels" json:"source_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Names of gateways where the rule should be applied to. Gateway names + // at the top of the rule (if any) are overridden. The gateway match is + // independent of sourceLabels. + Gateways []string `protobuf:"bytes,5,rep,name=gateways" json:"gateways,omitempty"` } func (m *L4MatchAttributes) Reset() { *m = L4MatchAttributes{} } @@ -667,6 +694,13 @@ func (m *L4MatchAttributes) GetSourceLabels() map[string]string { return nil } +func (m *L4MatchAttributes) GetGateways() []string { + if m != nil { + return m.Gateways + } + return nil +} + // HTTPRedirect can be used to send a 302 redirect response to the caller, // where the Authority/Host and the URI in the response can be swapped with // the specified values. For example, the following route rule redirects @@ -1571,86 +1605,86 @@ func init() { func init() { proto.RegisterFile("routing/v1alpha2/route_rule.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 1281 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8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 0x5e, 0x7e, 0x57, 0x29, 0xbe, 0x0e, 0x00, - 0x00, + // 1288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0xae, 0x7f, 0xd6, 0x8e, 0xcf, 0x26, 0x6d, 0x3c, 0xaa, 0xaa, 0xc5, 0x42, 0x28, 0x71, 0x41, + 0x0a, 0x20, 0x1c, 0x70, 0x5b, 0xa9, 0x3f, 0xf4, 0x27, 0x49, 0x5b, 0x82, 0xd4, 0xaa, 0xd5, 0x26, + 0xc0, 0x05, 0x17, 0xcb, 0x7a, 0x7d, 0x62, 0x6f, 0xbb, 0xde, 0x59, 0x66, 0x67, 0x1b, 0xfb, 0x1d, + 0x90, 0xb8, 0xe5, 0x86, 0x7b, 0x2e, 0x79, 0x00, 0xde, 0x05, 0x9e, 0x04, 0xa1, 0x39, 0x33, 0x6b, + 0x6f, 0x6b, 0xe2, 0x1f, 0xc1, 0x9d, 0xe7, 0xcc, 0xf7, 0x9d, 0x39, 0x7b, 0xe6, 0x3b, 0x67, 0x8e, + 0x61, 0x57, 0xf0, 0x4c, 0x86, 0xf1, 0x60, 0xff, 0xcd, 0x17, 0x7e, 0x94, 0x0c, 0xfd, 0xee, 0xbe, + 0x32, 0xa0, 0x27, 0xb2, 0x08, 0x3b, 0x89, 0xe0, 0x92, 0xb3, 0x6b, 0x61, 0x2a, 0x43, 0xde, 0x31, + 0xc0, 0x4e, 0x0e, 0x6c, 0x7d, 0x30, 0xe0, 0x7c, 0x10, 0xe1, 0x3e, 0xa1, 0x7a, 0xd9, 0xd9, 0x7e, + 0x3f, 0x13, 0xbe, 0x0c, 0x79, 0xac, 0x79, 0xf3, 0xfb, 0xe7, 0xc2, 0x4f, 0x12, 0x14, 0xa9, 0xde, + 0x6f, 0xff, 0x56, 0x82, 0x86, 0xab, 0x0e, 0x73, 0xb3, 0x08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x14, 0x76, 0x04, 0x76, 0xc0, 0x45, 0xea, 0x25, 0x3c, 0x0a, + 0x83, 0x89, 0x03, 0xe4, 0xa1, 0x7d, 0x91, 0x87, 0x23, 0x2e, 0xd2, 0x97, 0x84, 0x74, 0x21, 0x98, + 0xfe, 0x66, 0xdf, 0xc3, 0x65, 0xd5, 0x0f, 0xe2, 0xbe, 0x37, 0x44, 0xbf, 0x8f, 0x22, 0x75, 0x6c, + 0x52, 0xcb, 0xcd, 0xa5, 0x95, 0xdc, 0x39, 0x20, 0xde, 0xb1, 0xa6, 0xe9, 0xea, 0xd9, 0xf2, 0x8b, + 0xb6, 0xd6, 0x23, 0x60, 0xf3, 0xa0, 0xb5, 0x2a, 0xe2, 0xa7, 0x12, 0x6c, 0xe4, 0x5d, 0x40, 0x09, + 0xba, 0x58, 0x10, 0x17, 0x0a, 0xfa, 0xd9, 0x4d, 0x2a, 0x87, 0x03, 0x29, 0x45, 0xd8, 0xcb, 0x24, + 0xa6, 0xff, 0x57, 0x45, 0xb4, 0x7f, 0xb7, 0x60, 0xfb, 0xdd, 0x72, 0x63, 0xb7, 0xa0, 0x92, 0x89, + 0x90, 0xbe, 0x67, 0xc1, 0x0d, 0x9e, 0x48, 0x11, 0xc6, 0x03, 0x4d, 0x54, 0x78, 0x75, 0xf7, 0x69, + 0x30, 0xc4, 0x91, 0xfe, 0xea, 0x15, 0x99, 0x86, 0x42, 0xc2, 0x41, 0x39, 0xe4, 0x7d, 0x53, 0x98, + 0xab, 0x91, 0x35, 0x85, 0x1d, 0x40, 0xc3, 0xcf, 0xe4, 0x90, 0x8b, 0x50, 0x4e, 0x96, 0xd5, 0x65, + 0x91, 0x3f, 0x63, 0xb1, 0x17, 0x50, 0xcf, 0xf5, 0x62, 0x51, 0x2e, 0x6f, 0xad, 0xda, 0x9d, 0x3a, + 0x6f, 0x09, 0x26, 0xf7, 0x32, 0xed, 0xb7, 0xb5, 0x75, 0xfb, 0x2d, 0xf3, 0x60, 0x2b, 0xe5,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0xcd, 0x38, 0xed, 0xbf, 0x2b, 0xc0, + 0xe6, 0x27, 0x19, 0xf6, 0x14, 0xac, 0x3e, 0x46, 0xfe, 0xc4, 0x34, 0x91, 0xcf, 0x57, 0x1f, 0x82, + 0x3a, 0x8f, 0x15, 0xcf, 0xd5, 0x74, 0xe5, 0xc7, 0xef, 0xcd, 0xea, 0x7d, 0x1d, 0x3f, 0x07, 0x8a, + 0xe7, 0x6a, 0x7a, 0xeb, 0x8f, 0x12, 0x58, 0xe4, 0x98, 0x39, 0x50, 0x4f, 0x50, 0x04, 0x18, 0x4b, + 0x23, 0x97, 0x7c, 0xc9, 0xbe, 0x04, 0xfb, 0x2c, 0x1c, 0x63, 0xdf, 0xd3, 0x91, 0x2f, 0x53, 0xca, + 0xf1, 0x25, 0x17, 0x08, 0xaf, 0xfd, 0x1e, 0x43, 0x53, 0x5d, 0x4b, 0xac, 0x13, 0x63, 0x7c, 0x54, + 0x96, 0xfb, 0xd8, 0x2e, 0xb0, 0xc8, 0xd3, 0x61, 0x13, 0xae, 0xa8, 0x7f, 0x43, 0xda, 0x05, 0x29, + 0xbe, 0xf5, 0x4b, 0x09, 0x2c, 0xfa, 0x9e, 0x05, 0xe1, 0xef, 0x82, 0x4d, 0xb4, 0x54, 0xfa, 0x32, + 0x4b, 0x75, 0xef, 0x55, 0x31, 0x2a, 0xe3, 0x09, 0xd9, 0x14, 0x64, 0x20, 0x92, 0x20, 0x87, 0xe4, + 0x45, 0x06, 0xca, 0x38, 0x83, 0x28, 0x42, 0xd7, 0x43, 0x1a, 0x40, 0xab, 0x39, 0x84, 0x8c, 0x4f, + 0x94, 0x4d, 0x15, 0x23, 0x6d, 0xea, 0x62, 0x7c, 0x0a, 0x9b, 0xc5, 0x66, 0xab, 0x8a, 0x3b, 0xce, + 0x46, 0x3d, 0x14, 0x14, 0xdf, 0x96, 0x2a, 0x6e, 0xbd, 0x66, 0x57, 0xcd, 0x3f, 0xb3, 0xbc, 0xe8, + 0x69, 0x75, 0x58, 0xd3, 0x0d, 0xbd, 0x57, 0xa3, 0xe4, 0xdc, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, + 0xaf, 0x79, 0x55, 0xb9, 0xf6, 0x0e, 0x00, 0x00, } diff --git a/routing/v1alpha2/route_rule.proto b/routing/v1alpha2/route_rule.proto index 9afb9485d8b..c8fb3fb7564 100644 --- a/routing/v1alpha2/route_rule.proto +++ b/routing/v1alpha2/route_rule.proto @@ -62,7 +62,9 @@ package istio.routing.v1alpha2; // For example, the following rule routes all traffic by default to pods of // reviews service with label "version: v1". In addition, HTTP requests // containing for /wpcatalog/, /consumercatalog/ url prefixes will be -// rewritten to /api/v2 and send to pods with label version: v2. +// rewritten to /api/v2 and send to pods with label version: v2. The rule +// will be applied at the gateway named "bookinfo" as well as at all the +// sidecars in the mesh (indicated by the reserved gateway name "mesh"). // // apiVersion: config.istio.io/v1alpha2 // kind: RouteRule @@ -71,6 +73,9 @@ package istio.routing.v1alpha2; // spec: // hosts: // - reviews +// gateways: #if omitted, defaults to "sidecars" +// - bookinfo +// - mesh // http: // - match: // - uri: @@ -117,13 +122,16 @@ message RouteRule { // CIDR prefix can be used. repeated string hosts = 1; - // The names of gateways that should apply these routes. A single route - // rule could be used for sources inside the mesh as well as one or more - // gateways. The selection condition imposed by this field is - // independant of the sourceLabels match condition in HTTP/TCP routes. It - // is possible to define a route rule that applies to both the gateway - // and a specific internal workload by specifying gateways as well as the - // source match condition in HTTP/TCP routes. + // The names of gateways and sidecars that should apply these routes. A + // single route rule is used for sidecars inside the mesh as well + // as for one or more gateways. The selection condition imposed by this field + // can be overridden using the source field in the match conditions of HTTP/TCP + // routes. The reserved word "mesh" is used to imply all the sidecars in + // the mesh. When this field is omitted, the default gateway ("mesh") + // will be used, which would apply the rule to all sidecars in the + // mesh. If a list of gateway names is provided, the rule will apply + // only to the gateways. To apply a rule to both gateways and sidecars, + // specify "mesh" as one of the gateway names. repeated string gateways = 2; // A list of routes for HTTP traffic. @@ -246,7 +254,7 @@ message HTTPRoute { // tcp: // - match: // - port: -// name: Mongo #only applies to ports named Mongo +// name: Mongo # only applies to ports named Mongo // sourceSubnet: "172.17.16.0/24" // route: // - destination: @@ -270,7 +278,7 @@ message TCPRoute { // route rule to be applied to the HTTP request. For example, the following // route rule restricts the rule to match only requests where the URL path // starts with /ratings/v2/ and the request contains a "cookie" with value -// "user=jason", +// "user=jason". // // apiVersion: config.istio.io/v1alpha2 // kind: RouteRule @@ -361,8 +369,15 @@ message HTTPMatchRequest { PortSelector port = 6; // One or more labels that constrain the applicability of a rule to - // sources with the given labels. + // workloads with the given labels. If the route rule has a list of + // gateways specified at the top, it should include the reserved gateway + // "mesh" in order for this field to be applicable. map source_labels = 7; + + // Names of gateways where the rule should be applied to. Gateway names + // at the top of the rule (if any) are overridden. The gateway match is + // independent of sourceLabels. + repeated string gateways = 8; } // Each routing rule is associated with one or more service versions (see @@ -428,8 +443,15 @@ message L4MatchAttributes { string source_subnet = 3; // One or more labels that constrain the applicability of a rule to - // sources with the given labels. + // workloads with the given labels. If the route rule has a list of + // gateways specified at the top, it should include the reserved gateway + // "mesh" in order for this field to be applicable. map source_labels = 4; + + // Names of gateways where the rule should be applied to. Gateway names + // at the top of the rule (if any) are overridden. The gateway match is + // independent of sourceLabels. + repeated string gateways = 5; } // HTTPRedirect can be used to send a 302 redirect response to the caller,