Skip to content

Commit

Permalink
Merge pull request #6 from babysnakes/fix-matchers-docs
Browse files Browse the repository at this point in the history
Fixed an error in IstioMatches handling.
  • Loading branch information
babysnakes authored Jan 29, 2024
2 parents e4f4688 + f49688a commit e1f33c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions docs/advanced/technical-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ this section to prevent confusion:
### IstioMatches

IstioMatches corresponds to a subset of [Istio's HTTPMatchRequest][match] (specifically _headers_
and _source labels_). Currently, _DynamicEnvironment_ IstioMatches are translated to
HTTPMatchRequest as follows:

* All headers are grouped into a single HTTPMatchRequest.
* All source labels are grouped into a single HTTPMatchRequest.
and _source labels_). _DynamicEnvironment_'s IstioMatches are translated to HTTPMatchRequest as
follows, each item in the list of istio matches (regardless if it consists of headers, source
labels, or both) corresponds to a single HttpMatchRequest.

So, if you have the following IstioMatches object:

Expand All @@ -37,8 +35,10 @@ spec:
istioMatches:
- headers:
end-user:
- sourceLabels:
sourceLabels:
end-user: json
- sourceLabels:
end-user: joe
[ ... ]
```

Expand All @@ -52,12 +52,14 @@ spec:
- headers:
end-user:
prefix: jason
sourceLabels:
end-user: json
route:
- destination:
[ ... ]
- match:
- sourceLabels:
end-user: json
end-user: joe
route:
- destination:
[ ... ]
Expand Down
16 changes: 9 additions & 7 deletions versioned_docs/version-0.1.0/advanced/technical-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ this section to prevent confusion:
### IstioMatches

IstioMatches corresponds to a subset of [Istio's HTTPMatchRequest][match] (specifically _headers_
and _source labels_). Currently, _DynamicEnvironment_ IstioMatches are translated to
HTTPMatchRequest as follows:

* All headers are grouped into a single HTTPMatchRequest.
* All source labels are grouped into a single HTTPMatchRequest.
and _source labels_). _DynamicEnvironment_'s IstioMatches are translated to HTTPMatchRequest as
follows, each item in the list of istio matches (regardless if it consists of headers, source
labels, or both) corresponds to a single HttpMatchRequest.

So, if you have the following IstioMatches object:

Expand All @@ -37,8 +35,10 @@ spec:
istioMatches:
- headers:
end-user:
- sourceLabels:
sourceLabels:
end-user: json
- sourceLabels:
end-user: joe
[ ... ]
```

Expand All @@ -52,12 +52,14 @@ spec:
- headers:
end-user:
prefix: jason
sourceLabels:
end-user: json
route:
- destination:
[ ... ]
- match:
- sourceLabels:
end-user: json
end-user: joe
route:
- destination:
[ ... ]
Expand Down

0 comments on commit e1f33c7

Please sign in to comment.