Skip to content

Commit

Permalink
docs: fix inclusion example (projectcontour#2612)
Browse files Browse the repository at this point in the history
Uses the correct name to refer to the included HTTPProxy and removes an
incorrect prefix condition from the child proxy.

Signed-off-by: Steve Kriss <krisss@vmware.com>
  • Loading branch information
skriss authored Jun 19, 2020
1 parent c92aabd commit dd76482
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ metadata:
namespace: default
spec:
routes:
- conditions:
- prefix: / # matches /service2
services:
- services: # matches /service2
- name: s2
port: 80
- conditions:
Expand Down
8 changes: 3 additions & 5 deletions site/docs/master/httpproxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ It requires one field, `name`, and has two optional fields:
HTTPProxies can include other HTTPProxy objects in the namespace by specifying the name of the object and its namespace in the top-level `includes` block.
Note that `includes` is a list, and so it must use the YAML list construct.

In this example, the HTTPProxy `include-root` has included the configuration for paths matching `/service2` from the HTTPPRoxy named `service2` in the same namespace as `include-root` (the `default` namespace).
In this example, the HTTPProxy `include-root` has included the configuration for paths matching `/service2` from the HTTPProxy named `service2` in the same namespace as `include-root` (the `default` namespace).
It's important to note that `service2` HTTPProxy has not defined a `virtualhost` property as it is NOT a root HTTPProxy.

```yaml
Expand All @@ -1038,7 +1038,7 @@ spec:
fqdn: root.bar.com
includes:
# Includes the /service2 path from service2 in the same namespace
- name: www
- name: service2
namespace: default
conditions:
- prefix: /service2
Expand All @@ -1056,9 +1056,7 @@ metadata:
namespace: default
spec:
routes:
- conditions:
- prefix: / # matches /service2
services:
- services: # matches /service2
- name: s2
port: 80
- conditions:
Expand Down

0 comments on commit dd76482

Please sign in to comment.