Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode Node information in separate types in aggregation rules #137

Merged
merged 31 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
58e32b4
Add NodeStringMatch proto definitions
Aug 28, 2020
79b2904
Expose Locality in RequestV2
Aug 28, 2020
4292fc2
Replace uses of node field type in isNodeMatch
Aug 28, 2020
cd3e7f0
fix mapper_test tests cases related to node cluster and node id.
Aug 28, 2020
683e402
lint
Aug 28, 2020
6ac0898
Use the new protos in tests
Aug 28, 2020
ee07b37
Merge branch 'master' of github.com:envoyproxy/xds-relay into encode-…
Aug 28, 2020
1d1bd1e
bump dependencies.
Aug 28, 2020
3530926
more tests.
Aug 28, 2020
eb11170
Fix remaining unit tests.
Aug 29, 2020
f414e06
remove TODO from proto
Aug 29, 2020
911df69
Remove getResultRequestNodeFragment
Aug 31, 2020
dd313a2
Fix yaml_proto tests
Aug 31, 2020
d3b301f
Add NodeLocality to RequestNodeFragment
Aug 31, 2020
9610dc8
Edit getResultFromRequestNodePredicate
Aug 31, 2020
a7230f3
fix integration tests
Aug 31, 2020
92eacd9
delete unused getNodeValue function
Aug 31, 2020
a9e7629
Fix e2e test.
Aug 31, 2020
658409b
uncomment Locality tests
Sep 1, 2020
2d0416a
Define LocalityResultAction
Sep 1, 2020
805c0f4
fix example aggregation rules file.
Sep 1, 2020
509de35
s/NodeStringMatch/StringMatch/g
Sep 1, 2020
076a3f1
s/NodeLocalityMatch/LocalityMatch + use StringMatch
Sep 1, 2020
175d567
lint
Sep 1, 2020
d09afb7
remove NodeFieldType enum.
Sep 1, 2020
56a1b7c
more linting
Sep 1, 2020
12ef5ce
remove mentions to enum in test file.
Sep 1, 2020
1eda1a1
merge conflicts
Sep 11, 2020
9dead19
Remove mentions to corev2.Locality and use our own Locality object
Sep 11, 2020
85ba9aa
remove TODO in mapper.
Sep 11, 2020
3155439
remove individual Locality properties.
Sep 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 42 additions & 20 deletions api/protos/aggregation/v1/aggregation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,26 @@ message KeyerConfiguration {
repeated Fragment fragments = 1 [(validate.rules).repeated.min_items = 1];
}

enum NodeFieldType {
NODE_ID = 0;
NODE_CLUSTER = 1;
NODE_LOCALITY_REGION = 2;
NODE_LOCALITY_ZONE = 3;
NODE_LOCALITY_SUBZONE = 4;
message StringMatch {
oneof type {
option (validate.required) = true;

// Match on the extract string value.
string exact_match = 2;

// Match on a regex pattern.
// TODO potentially use "safe regex"
// https://github.com/envoyproxy/envoy/blob/10f756efa17e56c8d4d1033be7b4286410db4e01/api/envoy/type/matcher/v3/regex.proto
string regex_match = 3;
}
}

message LocalityMatch {
StringMatch region = 1;

StringMatch zone = 2;

StringMatch sub_zone = 3;
}

// This is a recursive structure which allows complex nested match
Expand All @@ -53,23 +67,17 @@ message MatchPredicate {
repeated string types = 1 [(validate.rules).repeated.min_items = 1];
}

// Match on a Field in Envoy's request node.
// Match on a field in Envoy's request node.
// [#next-free-field: 4]
message RequestNodeMatch {

// Specifies the Envoy Request field that should be matched on.
NodeFieldType field = 1 [(validate.rules).enum.defined_only = true];

oneof type {
option (validate.required) = true;

// Match on the extract string value.
string exact_match = 2;
StringMatch id_match = 1;

// Match on a regex pattern.
// TODO potentially use "safe regex"
// https://github.com/envoyproxy/envoy/blob/10f756efa17e56c8d4d1033be7b4286410db4e01/api/envoy/type/matcher/v3/regex.proto
string regex_match = 3;
StringMatch cluster_match = 2;

LocalityMatch locality_match = 3;
}
}

Expand Down Expand Up @@ -134,17 +142,31 @@ message ResultPredicate {
}
}

// Rule for how to generate a fragment from a Locality object
// [#next-free-field: 4]
message LocalityResultAction {
ResultAction region_action = 1;

ResultAction zone_action = 2;

ResultAction subzone_action = 3;
}

message AndResult {
repeated ResultPredicate result_predicates = 1 [(validate.rules).repeated.min_items = 2];
}

// Rules for generating the resulting fragment from a Envoy request node.
// [#next-free-field: 3]
// [#next-free-field: 4]
message RequestNodeFragment {

NodeFieldType field = 1 [(validate.rules).enum.defined_only = true];
oneof action {
option (validate.required) = true;

ResultAction action = 2 [(validate.rules).message.required = true];
ResultAction id_action = 1;
ResultAction cluster_action = 2;
LocalityResultAction locality_action = 3;
}
}

// Rules for generating the resulting fragment from Envoy request names.
Expand Down
3 changes: 1 addition & 2 deletions example/config-files/aggregation-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ fragments:
- "type.googleapis.com/envoy.api.v2.RouteConfiguration"
result:
request_node_fragment:
field: 1
action:
cluster_action:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like how its a named action, instead of field: 1

regex_action: { pattern: "^(.*)-.*$", replace: "$1" }
- rules:
- match:
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ require (
github.com/envoyproxy/protoc-gen-validate v0.3.0
github.com/ghodss/yaml v1.0.0
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
github.com/golang/protobuf v1.4.0-rc.4
github.com/golang/protobuf v1.4.2
github.com/iancoleman/strcase v0.1.1 // indirect
github.com/lyft/protoc-gen-star v0.5.1 // indirect
github.com/onsi/ginkgo v1.12.0
github.com/onsi/gomega v1.9.0
github.com/spf13/cobra v1.0.0
github.com/stretchr/testify v1.5.1
github.com/stretchr/testify v1.6.1
github.com/uber-go/tally v3.3.15+incompatible
go.uber.org/zap v1.14.0
golang.org/x/tools v0.0.0-20200527150044-688b3c5d9fa5 // indirect
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a
google.golang.org/grpc v1.27.1
google.golang.org/protobuf v1.20.1
google.golang.org/protobuf v1.23.0
)
20 changes: 20 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ github.com/golang/protobuf v1.4.0-rc.2 h1:rn85MJyaapkaJOXLeyGQhbUqS1RMbDp1nHMZqS
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4 h1:+EOh4OY6tjM6ZueeUKinl1f0U2820HzQOuf1iqMnsks=
github.com/golang/protobuf v1.4.0-rc.4/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
Expand Down Expand Up @@ -124,6 +128,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/iancoleman/strcase v0.1.1 h1:2I+LRClyCYB7JgZb9U0k75VHUiQe9RfknRqDyUfzp7k=
github.com/iancoleman/strcase v0.1.1/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
Expand All @@ -134,12 +140,15 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lyft/protoc-gen-star v0.5.1 h1:sImehRT+p7lW9n6R7MQc5hVgzWGEkDVZU4AsBQ4Isu8=
github.com/lyft/protoc-gen-star v0.5.1/go.mod h1:9toiA3cC7z5uVbODF7kEQ91Xn7XNFkVUl+SrEe+ZORU=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
Expand Down Expand Up @@ -170,6 +179,7 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
Expand All @@ -196,6 +206,8 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.3.3 h1:p5gZEKLYoL7wh8VrJesMaYeNxdEd1v3cb4irOk9zB54=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
Expand All @@ -213,6 +225,8 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
Expand All @@ -239,6 +253,7 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -371,6 +386,9 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.20.1 h1:ESRXHgpUBG5D2I5mmsQIyYxB/tQIZfSZ8wLyFDf/N/U=
google.golang.org/protobuf v1.20.1/go.mod h1:KqelGeouBkcbcuB3HCk4/YH2tmNLk6YSWA5LIWeI/lY=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
Expand All @@ -387,6 +405,8 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
13 changes: 5 additions & 8 deletions integration/testdata/keyer_configuration_complete_tech_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ fragments:
- "type.googleapis.com/envoy.api.v2.Endpoint"
result:
request_node_fragment:
field: 0
action:
id_action:
regex_action: { pattern: "^(.*)-*$", replace: "$1" }
- rules:
- match:
Expand All @@ -21,8 +20,8 @@ fragments:
- "type.googleapis.com/envoy.api.v2.Listener"
- "type.googleapis.com/envoy.api.v2.Cluster"
- request_node_match:
field: 0
exact_match: "canary"
id_match:
exact_match: "canary"
result:
string_fragment: "canary"
- match:
Expand All @@ -33,8 +32,7 @@ fragments:
- "type.googleapis.com/envoy.api.v2.Endpoint"
result:
request_node_fragment:
field: 1
action:
cluster_action:
regex_action: { pattern: "^*-(.*)-*$", replace: "$1" }
- match:
request_type_match:
Expand Down Expand Up @@ -63,8 +61,7 @@ fragments:
- "type.googleapis.com/envoy.api.v2.Route"
result:
request_node_fragment:
field: 1
action:
cluster_action:
regex_action: { pattern: "^*-(.*)-*$", replace: "$1" }
- rules:
- match:
Expand Down
6 changes: 2 additions & 4 deletions integration/testdata/keyer_configuration_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ fragments:
- "type.googleapis.com/envoy.api.v2.RouteConfiguration"
result:
request_node_fragment:
field: 0
action:
id_action:
regex_action: { pattern: "^(.*)-*$", replace: "$1" }
- rules:
- match:
Expand All @@ -22,8 +21,7 @@ fragments:
- "type.googleapis.com/envoy.api.v2.RouteConfiguration"
result:
request_node_fragment:
field: 1
action:
cluster_action:
regex_action: { pattern: "^*-(.*)-*$", replace: "$1" }
- rules:
- match:
Expand Down
Loading