Skip to content

feat: Allow empty host on WithRoute#67

Merged
jgkawell merged 2 commits intomainfrom
feat/allow-empty-host
Mar 3, 2025
Merged

feat: Allow empty host on WithRoute#67
jgkawell merged 2 commits intomainfrom
feat/allow-empty-host

Conversation

@jgkawell
Copy link
Member

@jgkawell jgkawell commented Mar 3, 2025

Envoy requires unique domains for all virtual hosts within the same route configuration. This was causing issues with multiple services registering under the same domain/host through fuse. This PR removes the requirement to specify a host when registering routes and #65 updates fuse to add routes with no defined host to a default virtual host.

Oh and I also added a Ping() call to the repositories/postgres/bun client's Open() so that the database connection is actually verified on boot.

@jgkawell jgkawell merged commit be4a8b3 into main Mar 3, 2025
3 checks passed
@jgkawell jgkawell deleted the feat/allow-empty-host branch March 3, 2025 15:33
@jgkawell jgkawell mentioned this pull request Mar 4, 2025
jgkawell added a commit that referenced this pull request Mar 4, 2025
This PR fixes an issue where registered routes with the same host would
be rejected by envoy. Hosts (called domains in the envoy config) must be
unique across all virtual hosts
([ref](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-virtualhost)).

In a previous chassis PR (#67), the requirement for a host to be set
when calling `WithRoute` was removed. This PR now will add routes
without a specified host to a default host (which is `*` for now but
should be configurable).

The other changes are just little cleanup items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant