Skip to content

Commit d9772cf

Browse files
committed
docs(zero): clarify databroker storage type auto-inference
Add Zero-specific documentation tabs to databroker reference Resolves ENG-3098 ## Changes Added "Zero" tabs to three sections in databroker.mdx: 1. **Databroker Storage Type section** - Explains that storage type is automatically inferred from connection string - Lists format patterns for all three backends (file, postgres, memory) - Links to connection string section for configuration details 2. **File Storage Configuration section** - Shows where to configure in Zero console (Settings → General) - Provides file:// URI example - Includes note about directory permissions and persistence 3. **Postgres Storage Configuration section** - Demonstrates both postgres:// and postgresql:// schemes - Clarifies both are auto-detected - Includes production tip about managed databases and replication ## Formatting - Follows Docusaurus admonition guidelines with empty lines around content - Prettier formatting validated - CSpell check passes ## Impact Eliminates documentation gap for Zero users who were confused about the absence of a separate storage type field. Clarifies that the inference is intentional and automatic. 🤖 AI assistance disclosure: Used Claude Code to generate the MDX tab content following existing documentation patterns. Manually verified MDX syntax, Docusaurus admonition formatting, and Prettier compliance.
1 parent 875fa06 commit d9772cf

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

content/docs/reference/databroker.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ DATABROKER_STORAGE_TYPE=postgres
5050

5151
`databroker_storage_type` is a bootstrap configuration setting and is not configurable in the Console.
5252

53+
</TabItem>
54+
<TabItem value="Zero" label="Zero">
55+
56+
In Pomerium Zero, the storage type is **automatically inferred** from the connection string format and does not need to be configured separately:
57+
58+
- `file:///path/to/directory` → file backend
59+
- `postgres://...` or `postgresql://...` → Postgres backend
60+
- Empty/unset → in-memory (default)
61+
62+
See [Databroker Storage Connection String](#databroker-storage-connection-string) below for configuration details.
63+
5364
</TabItem>
5465
<TabItem value="Kubernetes" label="Kubernetes">
5566

@@ -84,6 +95,21 @@ DATABROKER_STORAGE_CONNECTION_STRING=file:///var/pomerium/databroker
8495

8596
`databroker_storage_connection_string` is a bootstrap configuration setting and is not configurable in the Console.
8697

98+
</TabItem>
99+
<TabItem value="Zero" label="Zero">
100+
101+
In Pomerium Zero, configure the connection string in the **Settings → General** section of the Zero console. The storage type is automatically inferred from the connection string:
102+
103+
```
104+
file:///var/lib/pomerium
105+
```
106+
107+
:::note
108+
109+
When using the file backend, ensure the specified directory exists and has appropriate permissions. The in-memory backend (when the field is left empty) does not persist data across restarts.
110+
111+
:::
112+
87113
</TabItem>
88114
<TabItem value="Kubernetes" label="Kubernetes">
89115

@@ -132,6 +158,29 @@ DATABROKER_STORAGE_CONNECTION_STRING_FILE=/run/secrets/db_connection_string
132158

133159
`databroker_storage_connection_string` is a bootstrap configuration setting and is not configurable in the Console.
134160

161+
</TabItem>
162+
<TabItem value="Zero" label="Zero">
163+
164+
In Pomerium Zero, configure the connection string in the **Settings → General** section of the Zero console. The storage type is automatically inferred from the connection string format:
165+
166+
```
167+
postgres://user:password@host:5432/database?sslmode=require
168+
```
169+
170+
or
171+
172+
```
173+
postgresql://user:password@host:5432/database?sslmode=require
174+
```
175+
176+
Both `postgres://` and `postgresql://` schemes are supported and automatically detected as Postgres storage.
177+
178+
:::tip
179+
180+
For production deployments, use a managed Postgres service or ensure your database has proper backups configured. Unlike the in-memory backend, Postgres provides persistent, replicated storage suitable for multi-replica deployments.
181+
182+
:::
183+
135184
</TabItem>
136185
<TabItem value="Kubernetes" label="Kubernetes">
137186

content/docs/reference/reference.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
"type": "URL"
272272
},
273273
"data-broker-storage-connection-string": {
274-
"description": "Sets the connection string for the Databroker storage backend.",
274+
"description": "Sets the connection string for the Databroker storage backend. The storage type (memory, file, or Postgres) is automatically inferred from the connection string format: 'file:///' URIs use the file backend, 'postgres://' or 'postgresql://' URIs use the Postgres backend, and empty/unset defaults to in-memory storage (not persisted across restarts).",
275275
"id": "data-broker-storage-connection-string",
276276
"path": "/databroker#databroker-storage-connection-string",
277277
"services": [],

0 commit comments

Comments
 (0)