Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration: Update default web endpoints, and make them configurable #1718

Merged
merged 39 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cba8e79
wip
o0Ignition0o Sep 7, 2022
894e8ba
wip: move part of the server configuration to the graphql section
o0Ignition0o Sep 7, 2022
f95f70b
update snapshot
o0Ignition0o Sep 7, 2022
b2710d0
wip: make sure endpoints listening to the main listen address dont ca…
o0Ignition0o Sep 7, 2022
2033455
wip, i ll need to review snapshots carefully
o0Ignition0o Sep 7, 2022
d2ca946
halfway there
o0Ignition0o Sep 7, 2022
e58dc8d
getting closer, i need to figure out health check and i ll then be ab…
o0Ignition0o Sep 8, 2022
81726c8
wip: healthcheck
o0Ignition0o Sep 8, 2022
1fae6a0
hmm still need to have a couple of tests pass, but i m close
o0Ignition0o Sep 8, 2022
008133d
wip
o0Ignition0o Sep 11, 2022
c42f5d4
enable introspection and defer support by default
o0Ignition0o Sep 11, 2022
38dbfe9
use the content_type constant from http
o0Ignition0o Sep 11, 2022
b4f34c3
Update docs/source/configuration/health-checks.mdx
o0Ignition0o Sep 11, 2022
bb7b709
pin rhai here, until #1742 lands
o0Ignition0o Sep 11, 2022
b98851a
make tests pass
o0Ignition0o Sep 12, 2022
f9263d9
wip
o0Ignition0o Sep 12, 2022
235055c
put an actual listen address in the health checks docs
o0Ignition0o Sep 12, 2022
7486930
Add tests around listenaddrs consistency and path merging.
o0Ignition0o Sep 12, 2022
9b18fa3
clippy lint on windows
o0Ignition0o Sep 12, 2022
b4ffdda
bump chart and update configuration
o0Ignition0o Sep 12, 2022
4d1730a
Merge branch 'main' into igni/graphql_config
o0Ignition0o Sep 12, 2022
d4788fa
helm chart update
o0Ignition0o Sep 12, 2022
b50213a
add a comment about why encure listenaddrs consistency exists
o0Ignition0o Sep 12, 2022
aa214bb
drain extra listeners if we're reusing a listenaddr
o0Ignition0o Sep 12, 2022
3855004
add a non regression test to make sure we support server restart
o0Ignition0o Sep 12, 2022
863a65a
changelog + pass at the docs
o0Ignition0o Sep 12, 2022
5c1fdd5
Merge branch 'main' into igni/graphql_config
o0Ignition0o Sep 12, 2022
eb004d9
typo
o0Ignition0o Sep 12, 2022
59b6428
fix socket test + bump axum dependency to 0.5.16 since 0.15.15 has a CVE
o0Ignition0o Sep 13, 2022
8d9f60d
a couple of nits and typos
o0Ignition0o Sep 13, 2022
dbe73ed
use port 4010 for tests to avoid conflicts with an already running ro…
o0Ignition0o Sep 13, 2022
4a8779c
fix test
o0Ignition0o Sep 13, 2022
f40ef37
graphql -> supergraph + health check now listens to 9494
o0Ignition0o Sep 13, 2022
f13eee4
fix test
o0Ignition0o Sep 13, 2022
b6c67e3
add an enabled flag to health checks + disable sandbox by default
o0Ignition0o Sep 13, 2022
3f01d10
cfg test nit
o0Ignition0o Sep 13, 2022
854cc69
fix doc nit
o0Ignition0o Sep 13, 2022
3536169
gate fake_new behind cfg(test)
o0Ignition0o Sep 13, 2022
806c5aa
Merge branch 'main' into igni/graphql_config
o0Ignition0o Sep 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,66 @@ By [@USERNAME](https://github.com/USERNAME) in https://github.com/apollographql/

## ❗ BREAKING ❗

### Configuration: Update metrics and healthcheck web endpoints, and make them configurable ([#1500](https://github.com/apollographql/router/issues/1500))

The web endpoints exposed by the router listen to 127.0.0.1 by default, and the ports and paths for health check and prometheus have changed.

Here's the list of the endpoints exposed by the router:

- GraphQL: http://127.0.0.1:4000/ (unchanged)
- The GraphQL sandbox: http://127.0.0.1:4000/ (unchanged)
- Prometheus metrics: http://127.0.0.1:9090/metrics (used to be http://127.0.0.1:4000/plugins/apollo.telemetry/prometheus)
- Healthcheck: http://127.0.0.1:9494/health (used to be http://127.0.0.1:4000/.well-known/apollo/server-health)

While you could previously only customize the path for these endpoints, you can now customize the full IP address, PORT and PATH.

In order to enable this new feature, various `server` attributes such as `listen`, `graphql_path` and `landing_page` moved to more relevant sections.
Likewise, `introspection` and `preview_defer_support` have moved from the `server` section to the `supergraph` section:

This previous configuration:
```yaml
server:
listen: 127.0.0.1:4000
graphql_path: /graphql
health_check_path: /health
introspection: false
preview_defer_support: true
landing_page: true
telemetry:
metrics:
prometheus:
enabled: true
```

Now becomes:
```yaml
# landing_page configuration
sandbox:
listen: 127.0.0.1:4000
path: /
enabled: false # default
# graphql_path configuration
supergraph:
listen: 127.0.0.1:4000
path: /
introspection: false
preview_defer_support: true
# health_check_path configuration
health-check:
listen: 127.0.0.1:9494
path: /health
enabled: true # default
# prometheus scraper configuration
telemetry:
metrics:
prometheus:
listen: 127.0.0.1:9090
path: /metrics
enabled: true
```

By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/1718

### `apollo-spaceport` and `uplink` are now part of `apollo-router` ([Issue #491](https://github.com/apollographql/router/issues/491))

Instead of being dependencies, they are now part of the `apollo-router` crate.
Expand Down
3 changes: 1 addition & 2 deletions RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ in lieu of an official changelog.
5. Update the `PACKAGE_VERSION` value in `scripts/install.sh` (it should be prefixed with `v`!)
6. Update `docker.mdx` and `kubernetes.mdx` with the release version.
7. Update `helm/chart/router/Chart.yaml` as follows:
- increment the version. e.g. `version: 0.1.2` becomes `version: 0.1.3`
- update the appVersion to the release version. e.g.: `appVersion: "v0.9.0"`
- update the version and the appVersion to the release version. e.g.: `appVersion: "v0.9.0"`
8 Update `helm/chart/router/README.md` by running this from the repo root: `(cd helm/chart && helm-docs router)`.
(If not installed, you should [install `helm-docs`](https://github.com/norwoodj/helm-docs))
9. Update `federation-version-support.mdx` with the latest version info. Use https://github.com/apollographql/version_matrix to generate the version matrix.
Expand Down
Loading