Skip to content

Commit

Permalink
[config] Updating using cel expressions and predicates
Browse files Browse the repository at this point in the history
Signed-off-by: dd di cesare <[email protected]>
  • Loading branch information
didierofrivia committed Oct 24, 2024
1 parent a79ae9d commit 5eb0b5a
Showing 1 changed file with 22 additions and 58 deletions.
80 changes: 22 additions & 58 deletions utils/deploy/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,8 @@ data:
"hostnames": [
"*.a.auth.com"
],
"matches": [
{
"selector": "request.path",
"operator": "eq",
"value": "/get"
}
"predicates": [
"request.path == '/get'"
]
},
"actions": [
Expand Down Expand Up @@ -198,12 +194,8 @@ data:
"hostnames": [
"*.b.rlp.com"
],
"matches": [
{
"selector": "request.url_path",
"operator": "startswith",
"value": "/unknown-path"
}
"predicates": [
"request.url_path.startsWith('/unknown-path')"
]
},
"actions": [
Expand All @@ -212,7 +204,7 @@ data:
"scope": "rlp-ns-B/rlp-name-B",
"data": [
{
"static": {
"expression": {
"key": "rlp-ns-B/rlp-name-B/limit-not-to-be-activated",
"value": "1"
}
Expand All @@ -227,22 +219,10 @@ data:
"hostnames": [
"*.c.rlp.com"
],
"matches": [
{
"selector": "request.url_path",
"operator": "startswith",
"value": "/get"
},
{
"selector": "request.host",
"operator": "eq",
"value": "test.c.rlp.com"
},
{
"selector": "request.method",
"operator": "eq",
"value": "GET"
}
"predicates": [
"request.url_path.startsWith('/get')",
"request.host == 'test.c.rlp.com'",
"request.method == 'GET'"
]
},
"actions": [
Expand All @@ -251,7 +231,7 @@ data:
"scope": "rlp-ns-C/rlp-name-C",
"data": [
{
"static": {
"expression": {
"key": "limit_to_be_activated",
"value": "1"
}
Expand Down Expand Up @@ -282,12 +262,8 @@ data:
"hostnames": [
"*.d.rlp.com"
],
"matches": [
{
"selector": "source.remote_address",
"operator": "neq",
"value": "50.0.0.1"
}
"predicates": [
"source.remote_address != '50.0.0.1'"
]
},
"actions": [
Expand Down Expand Up @@ -318,12 +294,8 @@ data:
"hostnames": [
"*.a.multi.com"
],
"matches": [
{
"selector": "request.path",
"operator": "eq",
"value": "/get"
}
"predicates": [
"request.path == '/get'"
]
},
"actions": [
Expand All @@ -336,9 +308,9 @@ data:
"scope": "multi-ns-A/multi-name-A",
"data": [
{
"selector": {
"selector": "auth.identity.userid",
"key": "user_id"
"expression": {
"key": "user_id",
"value": "auth.identity.userid"
}
}
]
Expand All @@ -351,12 +323,8 @@ data:
"hostnames": [
"*.b.multi.com"
],
"matches": [
{
"selector": "request.path",
"operator": "eq",
"value": "/get"
}
"predicates": [
"request.path == '/get'"
]
},
"actions": [
Expand All @@ -367,16 +335,12 @@ data:
{
"service": "limitador",
"scope": "multi-ns-B/multi-name-B",
"conditions": [
{
"selector": "filter_state.wasm\\.kuadrant\\.identity\\.userid",
"operator": "eq",
"value": "alice"
}
"predicates": [
"auth.identity.userid == 'alice'"
],
"data": [
{
"static": {
"expression": {
"key": "user_id",
"value": "alice"
}
Expand Down

0 comments on commit 5eb0b5a

Please sign in to comment.