- Notifications
You must be signed in to change notification settings - Fork1.1k
feat(coderd): add retention policy configuration#21021
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -696,6 +696,35 @@ 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 use the global | ||
| retention value, or to disable if global is also 0. 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 use the | ||
| global retention value, or to disable if global is also 0. | ||
| --global-retention duration, $CODER_GLOBAL_RETENTION (default: 0) | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I feel like this is overcomplicating matters. Why do we need this? As an operator, I'd want to either use the defaults or choose retention for each topic. Having this fallback adds complexity and might make it hard for folks to reason about. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It’s listed as a nice-to-have in the ticket:#20743 I do see your point as well, I could go either way here. Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. When it comes to irrevocably deleting data, clear and explicit > convenient every time IMO. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Makes sense to me. Are you OK with us removing this@bpmct? | ||
| Default retention policy for audit logs, connection logs, and API | ||
| keys. Individual retention settings override this value when set to a | ||
| non-zero duration. Does not affect AI Bridge retention. Set to 0 to | ||
| disable (data is kept indefinitely unless individual settings are | ||
| configured). | ||
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -755,3 +755,28 @@ aibridge: | ||
| # (token, prompt, tool use). | ||
| # (default: 60d, type: duration) | ||
| retention: 1440h0m0s | ||
| # 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. | ||
| retention: | ||
| # Default retention policy for audit logs, connection logs, and API keys. | ||
| # Individual retention settings override this value when set to a non-zero | ||
| # duration. Does not affect AI Bridge retention. Set to 0 to disable (data is kept | ||
| # indefinitely unless individual settings are configured). | ||
| # (default: 0, type: duration) | ||
| global: 0s | ||
| # How long audit log entries are retained. Set to 0 to use the global retention | ||
| # value, or to disable if global is also 0. We advise keeping audit logs for at | ||
| # least a year, and in accordance with your compliance requirements. | ||
| # (default: 0, type: duration) | ||
| audit_logs: 0s | ||
| # How long connection log entries are retained. Set to 0 to use the global | ||
mafredri marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| # retention value, or to disable if global is also 0. | ||
| # (default: 0, type: duration) | ||
| connection_logs: 0s | ||
| # 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. | ||
| # (default: 7d, type: duration) | ||
| api_keys: 168h0m0s | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.