Skip to content

Commit

Permalink
Add original limitador examples to plugin config
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Cattermole <[email protected]>
  • Loading branch information
adam-cattermole committed Sep 16, 2024
1 parent 84632ca commit 614213d
Show file tree
Hide file tree
Showing 2 changed files with 432 additions and 8 deletions.
220 changes: 216 additions & 4 deletions utils/deploy/envoy-notls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ data:
},
"policies": [
{
"name": "rlp-ns-A/rlp-name-A",
"domain": "rlp-ns-A/rlp-name-A",
"name": "auth-ns-A/auth-name-A",
"domain": "auth-ns-A/auth-name-A",
"hostnames": [
"talker-api.127.0.0.1.nip.io"
"*.a.auth.com"
],
"rules": [
{
Expand All @@ -162,7 +162,7 @@ data:
{
"selector": "request.path",
"operator": "eq",
"value": "/hello"
"value": "/get"
}
]
}
Expand All @@ -188,6 +188,218 @@ data:
}
}
]
},
{
"name": "rlp-ns-A/rlp-name-A",
"domain": "rlp-ns-A/rlp-name-A",
"hostnames": [
"*.a.rlp.com"
],
"rules": [
{
"data": [
{
"selector": {
"selector": "unknown.path"
}
}
]
}
],
"actions": [
{
"extension": "limitador",
"data": {
"static": {
"key": "rlp-ns-A/rlp-name-A",
"value": "1"
}
}
}
]
},
{
"name": "rlp-ns-B/rlp-name-B",
"domain": "rlp-ns-B/rlp-name-B",
"hostnames": [
"*.b.rlp.com"
],
"rules": [
{
"conditions": [
{
"allOf": [
{
"selector": "request.url_path",
"operator": "startswith",
"value": "/unknown-path"
}
]
}
],
"data": [
{
"static": {
"key": "rlp-ns-B/rlp-name-B/limit-not-to-be-activated",
"value": "1"
}
}
]
}
],
"actions": [
{
"extension": "limitador",
"data": {
"static": {
"key": "rlp-ns-B/rlp-name-B",
"value": "1"
}
}
}
]
},
{
"name": "rlp-ns-C/rlp-name-C",
"domain": "rlp-ns-C/rlp-name-C",
"hostnames": [
"*.c.rlp.com"
],
"rules": [
{
"conditions": [
{
"allOf": [
{
"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"
}
]
}
],
"data": [
{
"static": {
"key": "limit_to_be_activated",
"value": "1"
}
}
]
},
{
"conditions": [
{
"allOf": [
{
"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"
}
]
}
],
"data": [
{
"selector": {
"selector": "source.address"
}
}
]
},
{
"conditions": [
{
"allOf": [
{
"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"
}
]
}
],
"data": [
{
"selector": {
"selector": "request.headers.My-Custom-Header-01"
}
}
]
},
{
"conditions": [
{
"allOf": [
{
"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"
}
]
}
],
"data": [
{
"selector": {
"selector": "metadata.filter_metadata.envoy\\.filters\\.http\\.header_to_metadata.user_id",
"key": "user_id"
}
}
]
}
],
"actions": [
{
"extension": "limitador",
"data": {
"static": {
"key": "rlp-ns-C/rlp-name-C",
"value": "1"
}
}
}
]
}
]
}
Expand Down
Loading

0 comments on commit 614213d

Please sign in to comment.