From 4d722b75ece57199acee72624b276db7cc63b59b Mon Sep 17 00:00:00 2001 From: Brie Carranza Date: Wed, 14 Feb 2024 12:56:22 -0500 Subject: [PATCH 1/2] Add notes on log rotation environment variables --- doc/charts/globals.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index e0e5326e6a..a555594c86 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -2512,8 +2512,15 @@ global: By default, the GitLab Helm chart does not rotate logs. This can cause ephemeral storage issues for containers that run for a long time. -To enable log rotation, set the `GITLAB_LOGGER_TRUNCATE_LOGS` environment variable to `true`. For more information, see -[GitLab Logger's documentation](https://gitlab.com/gitlab-org/cloud-native/gitlab-logger#configuration). In particular, +To enable log rotation, set the `GITLAB_LOGGER_TRUNCATE_LOGS` environment variable to `true`. When log rotation is enabled, additional environment variables like `GITLAB_LOGGER_TRUNCATE_INTERVAL` and `GITLAB_LOGGER_MAX_FILESIZE` can be configured to control the log rotation behavior. + +| Name | Type | Default | Description | +| :---------- | :------ | :------ | :---------- | +| `GITLAB_LOGGER_TRUNCATE_LOGS` | Boolean | `false` | When enabled, log files that exceed the size configured in `GITLAB_LOGGER_MAX_FILESIZE` will be truncated at the interval specified in `GITLAB_LOGGER_TRUNCATE_INTERVAL` | +| `GITLAB_LOGGER_TRUNCATE_INTERVAL` | Integer | `300` | This is the interval at which log files that exceed the size configured in `GITLAB_LOGGER_MAX_FILESIZE` will be truncated when GITLAB_LOGGER_TRUNCATE_LOGS` is set to `true`. The interval is specified in seconds. | +| `GITLAB_LOGGER_MAX_FILESIZE` | Integer | `1000` | Log files that exceed this size will be truncated at the interval specified in `GITLAB_LOGGER_TRUNCATE_INTERVAL` when `GITLAB_LOGGER_TRUNCATE_LOGS` is set to `true`. This value is specified in bytes. | + +For more information, see [GitLab Logger's documentation](https://gitlab.com/gitlab-org/cloud-native/gitlab-logger#configuration). In particular, see information on: - [`GITLAB_LOGGER_TRUNCATE_INTERVAL`](https://gitlab.com/gitlab-org/cloud-native/gitlab-logger#truncate-logs-interval). -- GitLab From 60667fb39a82580a9cbc0d3c51d3d66b9cc231ac Mon Sep 17 00:00:00 2001 From: Jason Plum Date: Wed, 14 Feb 2024 21:52:09 +0000 Subject: [PATCH 2/2] Fixup markdown format of code string --- doc/charts/globals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/charts/globals.md b/doc/charts/globals.md index a555594c86..b102dcd90a 100644 --- a/doc/charts/globals.md +++ b/doc/charts/globals.md @@ -2517,7 +2517,7 @@ To enable log rotation, set the `GITLAB_LOGGER_TRUNCATE_LOGS` environment variab | Name | Type | Default | Description | | :---------- | :------ | :------ | :---------- | | `GITLAB_LOGGER_TRUNCATE_LOGS` | Boolean | `false` | When enabled, log files that exceed the size configured in `GITLAB_LOGGER_MAX_FILESIZE` will be truncated at the interval specified in `GITLAB_LOGGER_TRUNCATE_INTERVAL` | -| `GITLAB_LOGGER_TRUNCATE_INTERVAL` | Integer | `300` | This is the interval at which log files that exceed the size configured in `GITLAB_LOGGER_MAX_FILESIZE` will be truncated when GITLAB_LOGGER_TRUNCATE_LOGS` is set to `true`. The interval is specified in seconds. | +| `GITLAB_LOGGER_TRUNCATE_INTERVAL` | Integer | `300` | This is the interval at which log files that exceed the size configured in `GITLAB_LOGGER_MAX_FILESIZE` will be truncated when `GITLAB_LOGGER_TRUNCATE_LOGS` is set to `true`. The interval is specified in seconds. | | `GITLAB_LOGGER_MAX_FILESIZE` | Integer | `1000` | Log files that exceed this size will be truncated at the interval specified in `GITLAB_LOGGER_TRUNCATE_INTERVAL` when `GITLAB_LOGGER_TRUNCATE_LOGS` is set to `true`. This value is specified in bytes. | For more information, see [GitLab Logger's documentation](https://gitlab.com/gitlab-org/cloud-native/gitlab-logger#configuration). In particular, -- GitLab