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

Add remaining docs for corrosion's config file #178

Merged
merged 2 commits into from Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/SUMMARY.md
Expand Up @@ -42,7 +42,7 @@
- [Configuration](config/README.md)
- [db](config/db.md)
- [gossip](config/gossip.md)
- [api]() (to come)
- [admin]() (to come)
- [telemetry]() (to come)
- [consul]() (to come)
- [api](config/api.md)
- [admin](config/admin.md)
- [telemetry](config/telemetry.md)
- [consul](config/consul.md)
8 changes: 4 additions & 4 deletions doc/config/README.md
Expand Up @@ -5,7 +5,7 @@ Corrosion configuration lives in a TOML file. The default location is `/etc/corr
Configuration sections:
- [db](db.md)
- [gossip](gossip.md)
- [api]() (to come)
- [admin]() (to come)
- [telemetry]() (to come)
- [consul]() (to come)
- [api](api.md)
- [admin](admin.md)
- [telemetry](telemetry.md)
- [consul](consul.md)
10 changes: 10 additions & 0 deletions doc/config/admin.md
@@ -0,0 +1,10 @@
# The [admin] block

## admin.path

Path for unix socket used to send commands for admin operations.

```toml
[admin]
path = "/admin.sock"
```
30 changes: 30 additions & 0 deletions doc/config/api.md
@@ -0,0 +1,30 @@
# The [api] block

## api.addr

Address for the Corrosion HTTP API to listen on.

```toml
[api]
addr = "0.0.0.0:9000"
```

## api.authz.bearer-token

Bearer token that will be used to authenticate HTTP requests.
The client should set this token in the `Authorization` header.

```toml
[api]
authz.bearer-token = "<token>"
```

## api.pg.addr

Address to listen on for PostgresQL connections.
This allows you to query the sqlite databases using SQL.

```toml
[api]
pg.addr = ""
```
16 changes: 16 additions & 0 deletions doc/config/consul.md
@@ -0,0 +1,16 @@
# The [consul] block

## consul.client.addr

Local address of consul server.

## consul.client.tls

TLS configuration to use when communicating with Consul.

```toml
[consul.client.tls]
ca_file = ""
cert_file = ""
key_file = ""
```
36 changes: 36 additions & 0 deletions doc/config/telemetry.md
@@ -0,0 +1,36 @@
# The [telemetry] configuration

The telemetry block is optional. This block configures open telemetry and prometheus.

## Optional Fields

### telemetry.prometheus.addr

Address for the prometheus exporter binds to. `GET` requests to this address will return prometheus metrics.

```toml
[telemetry]
prometheus.addr = "0.0.0.0:9090"
```

You can read more about the Prometheus metrics that corrosion exposes [here](../telemetry/prometheus.md).

### telemetry.open-telemetry

This block configures how the open telemetry exporter.

Configure open telemetry exporter using environment variables. The environment variables and their default are listed [here](https://opentelemetry.io/docs/specs/otel/protocol/exporter/).

```toml
[telemetry]
open-telemetry = "from_env"
```

### telemetry.open-telemetry.exporter

Address that open telemetry exporter should send traces to.

```toml
[telemetry]
open-telemetry.exporter = { endpoint = "10.0.0.0:9999"}
```