K8SPXC-1789 Added log rotation documentation#305
Conversation
There was a problem hiding this comment.
Pull request overview
Adds end-user documentation for log rotation in the Percona Operator for MySQL docs, and wires it into the site navigation alongside the Custom Resource options reference.
Changes:
- Added a new
docs/log-rotation.mdpage describing how to configure logrotate (schedule, full override, and extra ConfigMap rules). - Updated
mkdocs-base.ymlnavigation to include the new “Log rotation” page under “Logging”. - Extended
docs/operator.mdCR options reference withlogcollector.logRotate.*fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| mkdocs-base.yml | Adds “Log rotation” to the MkDocs nav under Logging. |
| docs/operator.md | Documents new logcollector.logRotate.* CR keys. |
| docs/log-rotation.md | New how-to page for configuring log rotation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| For example, the following ConfigMap adds separate rotation rules for Galera-related logs (`GRA_*.log`) and for audit logs (`audit.log`) with different rotation and compression settings. | ||
|
|
||
| 1. Create a ConfigMap configuration file. For example, `custom-logrotate.yaml` . Specify additional rules: |
|
|
||
| ### `logcollector.logRotate.schedule` | ||
|
|
||
| Cron expression for the logrotate schedule (default: 0 0 0 ** *). |
|
|
||
| !!! important | ||
|
|
||
| You must provide the full `logrotate` configuration because the Operator replaces the default configuration with the one you provide. Refer to the [default configuration](https://github.com/percona/percona-xtradb-cluster-operator/v{{release}}/build/logcollector/logrotate/logrotate-mysql.conf) to see the built-in logrotate rules and use it as a guide for your custom settings. |
Updated navigation to include this topic Updated CR reference
b698af3 to
2c92dd5
Compare
There was a problem hiding this comment.
Pull request overview
Adds end-user documentation for configuring log rotation in the Percona Operator for MySQL docs, and wires the new page into the site navigation while updating the CR options reference.
Changes:
- Adds a new
Log rotationdocumentation page with configuration examples. - Updates the MkDocs navigation to include the new page under Configuration → Logging.
- Extends the CR reference (
docs/operator.md) withlogcollector.logRotate.*options.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
mkdocs-base.yml |
Adds Log rotation to the Logging nav section. |
docs/operator.md |
Documents new logcollector.logRotate.* CR fields. |
docs/log-rotation.md |
New guide explaining scheduling, overriding, and extending logrotate config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 1. Edit the `deploy/cr.yaml` Custom Resource manifest. Set the log rotation schedule in [cron format](https://en.wikipedia.org/wiki/Cron) using the `spec.logcollector.logRotate.schedule` option. | ||
|
|
||
| This example runs log rotation every 6 hours: | ||
|
|
||
| ```yaml | ||
| spec: | ||
| logcollector: | ||
| logRotate: | ||
| schedule: "0 */6 * * *" | ||
| ``` |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated navigation to include this topic
Updated CR reference