Skip to content

Commit

Permalink
(from getambassador.io) Merge pull request #642 from datawire/donnyyu…
Browse files Browse the repository at this point in the history
…ng/intercept-port-num

Updating docs for intercept-port-num work
  • Loading branch information
khussey authored Apr 11, 2021
2 parents b7934b8 + aae5673 commit 60b0ced
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions howtos/intercepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ be routed to your cluster as usual.

Using Deployment example-service
intercepted
Intercept name : example-service
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:8080
Service Port Name: http
Intercepting : HTTP requests that match all of:
Intercept name : example-service
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:8080
Service Port Identifier: http
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("<intercept id>:example-service")
Preview URL : https://<random domain name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me
Preview URL : https://<random domain name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me
```
4. Start your local service as <a href="#start-local-instance">in the previous step</a>.
Expand Down
16 changes: 8 additions & 8 deletions howtos/preview-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ If it isn't:
Using deployment example-service
intercepted
Intercept name : example-service
State : ACTIVE
Destination : 127.0.0.1:8080
Service Port Name: http
Intercepting : HTTP requests that match all of:
Intercept name : example-service
State : ACTIVE
Destination : 127.0.0.1:8080
Service Port Identifier: http
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("<intercept-id>:example-service")
Preview URL : https://<random-domain-name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me
Preview URL : https://<random-domain-name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me
```

4. Start your local environment using the environment variables retrieved in the previous step.
Expand Down Expand Up @@ -125,4 +125,4 @@ If it isn't:

To collaborate with someone outside of your identity provider's organization, you must go to [Ambassador Cloud](https://app.getambassador.io/cloud/preview/), select the preview URL, and click **Make Publicly Accessible**. Now anyone with the link will have access to the preview URL. When they visit the preview URL, they will see the intercepted service running on your laptop.

To disable sharing the preview URL publicly, click **Require Authentication** in the dashboard. Removing the intercept either from the dashboard or by running `telepresence leave <service-name>` also removes all access to the preview URL.
To disable sharing the preview URL publicly, click **Require Authentication** in the dashboard. Removing the intercept either from the dashboard or by running `telepresence leave <service-name>` also removes all access to the preview URL.
16 changes: 8 additions & 8 deletions reference/intercepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ Finally, run `telepresence leave <name of intercept>` to stop the intercept.

## Creating an Intercept When a Service has Multiple Ports

If you are trying to intercept a service that has multiple ports, you need to tell telepresence which service port you are trying to intercept. You can see the name of the service ports available to be intercepted by using kubectl to describe your service or look in the yaml for the service. For more information on multiple ports, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services).
If you are trying to intercept a service that has multiple ports, you need to tell telepresence which service port you are trying to intercept. To specify, you can either use the name of the service port or the port number itself. To see which options might be available to you and your service, use kubectl to describe your service or look in the object's yaml. For more information on multiple ports, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services).

```
$ telepresence intercept <base name of intercept> --port=<local TCP port>:<servicePortName>
$ telepresence intercept <base name of intercept> --port=<local TCP port>:<servicePortIdentifier>
Using Deployment <name of deployment>
intercepted
Intercept name : <full name of intercept>
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:<local TCP port>
Service Port Name: <servicePortName>
Intercepting : all TCP connections
Intercept name : <full name of intercept>
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:<local TCP port>
Service Port Identifier: <servicePortIdentifier>
Intercepting : all TCP connections
```

When intercepting a service that has multiple ports, the name of the service port that has been intercepted is also listed.
Expand Down

0 comments on commit 60b0ced

Please sign in to comment.