Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ability to override default clickhouse config #1268

Merged

Conversation

alexandrovas
Copy link
Contributor

@alexandrovas alexandrovas commented May 18, 2024

This PR adds ability to override default Clickhouse config. This can be useful if you need to set TTL for system tables or completely disable them. Without this Clickhouse will filled the disk. The problem is described in more detail here.

Example of values:

clickhouse:
  clickhouse:
    configmap:
      configOverride: |
        <yandex>
            <asynchronous_metric_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </asynchronous_metric_log>
            <query_thread_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </query_thread_log>
            <trace_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </trace_log>
            <part_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </part_log>
            <query_views_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </query_views_log>
            <metric_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </metric_log>
            <query_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </query_log>
            <session_log>
                <ttl>event_date + INTERVAL 1 DAY DELETE</ttl>
            </session_log>
        </yandex>

@@ -375,6 +375,9 @@ clickhouse:
max_part_loading_threads: auto
# If the number of broken parts in a single partition exceeds the max_suspicious_broken_parts value, automatic deletion is denied.
max_suspicious_broken_parts: 100
##
## Allows to override default Clickhouse config via override.xml
configOverride: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you maybe add your example here (commented) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done :)

@alexandrovas alexandrovas force-pushed the feat/clickhouse-config-override branch from a0a9152 to bf3dfe5 Compare May 21, 2024 07:30
Signed-off-by: Aleksandr Aleksandrov <alex.mirenki@gmail.com>
@alexandrovas alexandrovas force-pushed the feat/clickhouse-config-override branch from bf3dfe5 to c935ea1 Compare May 21, 2024 07:32
@Mokto Mokto merged commit 1f8a5d5 into sentry-kubernetes:develop May 21, 2024
2 checks passed
@Mokto Mokto mentioned this pull request May 21, 2024
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.

2 participants