Created
August 16, 2022 13:58
-
-
Save calam1/0da4dd31884730719d12bbaa4f6ff57e to your computer and use it in GitHub Desktop.
Envoyfilter defining the descriptors in the configmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: EnvoyFilter | |
metadata: | |
name: python-api-filter-ratelimit-svc | |
spec: | |
workloadSelector: | |
labels: | |
app: python-api | |
configPatches: | |
- applyTo: VIRTUAL_HOST | |
match: | |
context: SIDECAR_INBOUND | |
routeConfiguration: | |
vhost: | |
name: "" | |
route: | |
action: ANY | |
patch: | |
operation: MERGE | |
# Applies the rate limit rules. | |
value: | |
rate_limits: | |
- actions: | |
- header_value_match: | |
# Uses preset key of "header_match" | |
descriptor_value: "TEST_API_PATH_MATCH" | |
headers: | |
- name: ":path" | |
prefix_match: "/index" | |
- request_headers: | |
header_name: "X-TEST-API-HEADER-VALUE" | |
descriptor_key: "TEST-API-HEADER-VALUE" | |
limit: | |
dynamic_metadata: | |
metadata_key: | |
key: "envoy.filters.http.ratelimit.override" | |
path: | |
- key: "limit" | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment