Skip to content

Commit

Permalink
You can't use selective deployment with wildcard service chaining. He…
Browse files Browse the repository at this point in the history
…re's why

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
  • Loading branch information
itowlson committed Nov 10, 2024
1 parent 328ecae commit 5e113e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion content/spin/v3/http-outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,14 @@ You must still grant permission by including the relevant `spin.internal` hosts
allowed_outbound_hosts = ["http://authz.spin.internal", "https://reporting.spin.internal"]
```

To allow local chaining to _any_ component in your application, use a subdomain wildcard:
To allow local chaining to _any_ component in your application, you can use a subdomain wildcard:

```toml
allowed_outbound_hosts = ["http://*.spin.internal"]
```

However, the wildcard implies that the component requires _all other_ components to be local to it. You will therefore not be able to use [selective deployment](./running-apps#splitting-an-application-across-environments) for an application that uses wildcard service chaining.

> Local service chaining is not currently supported on Fermyon Cloud.
### Intra-Application HTTP Requests by Route
Expand Down
2 changes: 1 addition & 1 deletion content/spin/v3/running-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ $ spin up -f registry.example.com/app:1.1.0 -c chat-engine -c sentiment-analyzer

> In practice you'd set these commands up in a scheduler or orchestrator rather than typing them interactively - or, more likely, use a selection-aware scheduler such as [SpinKube](https://www.spinkube.dev/) rather than running `spin up` directly.
If you run a subset which includes a component that uses [local service chaining](./http-outbound#local-service-chaining), then you must also include all chaining targets in the subset - Spin checks this at load time. [Self-requests](./http-outbound#making-http-requests-within-an-application) will work only if the target route maps to a component in the subset, but this is not checked at load time - instead, self-requests to unselected components will fail at request time with 404 Not Found.
If you run a subset which includes a component that uses [local service chaining](./http-outbound#local-service-chaining), then you must also include all chaining targets in the subset - Spin checks this at load time. (Wildcard service chaining - the `*.spin.internal` host - means that _all_ components are potential chaining targets, so you will not be able to use selective deployment if any component uses wildcard service chaining.) [Self-requests](./http-outbound#making-http-requests-within-an-application) will work only if the target route maps to a component in the subset, but this is not checked at load time - instead, self-requests to unselected components will fail at request time with 404 Not Found.

## The Always Build Option

Expand Down

0 comments on commit 5e113e6

Please sign in to comment.