Skip to content

K8SPXC-1789 Added log rotation documentation#305

Open
nastena1606 wants to merge 3 commits into
mainfrom
K8SPXC-1789-Doc-logrotate-setup
Open

K8SPXC-1789 Added log rotation documentation#305
nastena1606 wants to merge 3 commits into
mainfrom
K8SPXC-1789-Doc-logrotate-setup

Conversation

@nastena1606
Copy link
Copy Markdown
Collaborator

Updated navigation to include this topic
Updated CR reference

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md page describing how to configure logrotate (schedule, full override, and extra ConfigMap rules).
  • Updated mkdocs-base.yml navigation to include the new “Log rotation” page under “Logging”.
  • Extended docs/operator.md CR options reference with logcollector.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.

Comment thread docs/log-rotation.md Outdated

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:
Comment thread docs/operator.md Outdated

### `logcollector.logRotate.schedule`

Cron expression for the logrotate schedule (default: 0 0 0 ** *).
Comment thread docs/log-rotation.md Outdated

!!! 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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rotation documentation page with configuration examples.
  • Updates the MkDocs navigation to include the new page under Configuration → Logging.
  • Extends the CR reference (docs/operator.md) with logcollector.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.

Comment thread docs/operator.md Outdated
Comment thread docs/log-rotation.md
Comment thread docs/log-rotation.md
Comment on lines +27 to +36
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 * * *"
```
Comment thread docs/log-rotation.md Outdated
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants