Skip to content

Commit

Permalink
Add name field to a rule (#116)
Browse files Browse the repository at this point in the history
* Add name field to a rule

This is necessary to make a route rule a self-contained object.

* updated examples
  • Loading branch information
kyessenov authored Jun 7, 2017
1 parent 9c20ee7 commit 5c9f631
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions proxy/v1/config/route_rule.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ package istio.proxy.v1.config;
// "reviews" service to version "v1" can be specified as follows:
//
// destination: reviews.default.svc.cluster.local
// name: my-rule
// route:
// - tags:
// version: v1
// weight: 100
//
message RouteRule {
// REQUIRED: Route rules have unique names to allow multiple rules
// for the same destination, e.g. "my-rule".
string name = 11;

// REQUIRED: Destination uniquely identifies the destination associated
// with this routing rule. This field is applicable for hostname-based
// resolution for HTTP traffic as well as IP-based resolution for
Expand Down Expand Up @@ -130,6 +135,7 @@ message RouteRule {
// contains a "cookie" with value "user=jason",
//
// destination: ratings.default.svc.cluster.local
// name: my-rule
// match:
// source: reviews.default.svc.cluster.local
// sourceTags:
Expand Down Expand Up @@ -181,6 +187,7 @@ message MatchCondition {
// "v1".
//
// destination: reviews.default.svc.cluster.local
// name: my-rule
// route:
// - tags:
// version: v2
Expand Down Expand Up @@ -228,6 +235,7 @@ message L4MatchAttributes {
// /v1/bookRatings provided by the bookratings service.
//
// destination: ratings.default.svc.cluster.local
// name: my-rule
// match:
// httpHeaders:
// uri:
Expand All @@ -254,6 +262,7 @@ message HTTPRedirect {
// ratings service before making the actual API call.
//
// destination: ratings.default.svc.cluster.local
// name: my-rule
// match:
// httpHeaders:
// uri:
Expand Down Expand Up @@ -290,6 +299,7 @@ message StringMatch {
// 10 second timeout for calls to the ratings:v1 service
//
// destination: ratings.default.svc.cluster.local
// name: my-rule
// route:
// - tags:
// version: v1
Expand Down Expand Up @@ -320,6 +330,7 @@ message HTTPTimeout {
// calling ratings:v1 service, with a 2s timeout per retry attempt.
//
// destination: ratings.default.svc.cluster.local
// name: my-rule
// route:
// - tags:
// version: v1
Expand Down

0 comments on commit 5c9f631

Please sign in to comment.