mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd): add retention policy configuration (#21021)
Add `RetentionConfig` with server flags for configuring data retention: - `--audit-logs-retention`: retention for audit log entries - `--connection-logs-retention`: retention for connection logs - `--api-keys-retention`: retention for expired API keys (default 7d) Updates #20743
This commit is contained in:
@@ -697,6 +697,27 @@ updating, and deleting workspace resources.
|
||||
Number of provisioner daemons to create on start. If builds are stuck
|
||||
in queued state for a long time, consider increasing this.
|
||||
|
||||
RETENTION OPTIONS:
|
||||
Configure data retention policies for various database tables. Retention
|
||||
policies automatically purge old data to reduce database size and improve
|
||||
performance. Setting a retention duration to 0 disables automatic purging for
|
||||
that data type.
|
||||
|
||||
--api-keys-retention duration, $CODER_API_KEYS_RETENTION (default: 7d)
|
||||
How long expired API keys are retained before being deleted. Keeping
|
||||
expired keys allows the backend to return a more helpful error when a
|
||||
user tries to use an expired key. Set to 0 to disable automatic
|
||||
deletion of expired keys.
|
||||
|
||||
--audit-logs-retention duration, $CODER_AUDIT_LOGS_RETENTION (default: 0)
|
||||
How long audit log entries are retained. Set to 0 to disable (keep
|
||||
indefinitely). We advise keeping audit logs for at least a year, and
|
||||
in accordance with your compliance requirements.
|
||||
|
||||
--connection-logs-retention duration, $CODER_CONNECTION_LOGS_RETENTION (default: 0)
|
||||
How long connection log entries are retained. Set to 0 to disable
|
||||
(keep indefinitely).
|
||||
|
||||
TELEMETRY OPTIONS:
|
||||
Telemetry is critical to our ability to improve Coder. We strip all personal
|
||||
information before sending data to our servers. Please only disable telemetry
|
||||
|
||||
Reference in New Issue
Block a user