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(config): set rule version record limit by default, bump grafana to 11.3.0 #1763

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

weisdd
Copy link
Collaborator

@weisdd weisdd commented Nov 18, 2024

Changes

  • set rule_version_record_limit to 5 by default:
    • Prior to Grafana 11.3.0, alert_rule_version table would uncontrollably grow to accommodate multiple copies of alert rules;
    • In Grafana 11.3.0, a new field (rule_version_record_limit, which is part of unified_alerting section) was introduced to enforce a limit on the rule versions. It is set to 0 there by default. To mitigate the behaviour, this PR instructs the operator to set the value to 5 by default;
  • Other changes:
    • bumped the default Grafana version to 11.3.0 (I can drop that commit if needed).

Backwards compatibility

If someone wants to preserve the previous behaviour or postpone initial database cleanup, it's possible to pass:

apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
# omitted
spec:
  config:
    # omitted
    unified_alerting:
      rule_version_record_limit: "0"

Fixes: #1639

@weisdd weisdd changed the title Feat/set rule version record limit by default feat(config): set rule version record limit by default, bump grafana to 11.3.0 Nov 18, 2024
@weisdd weisdd changed the title feat(config): set rule version record limit by default, bump grafana to 11.3.0 [WIP] feat(config): set rule version record limit by default, bump grafana to 11.3.0 Nov 18, 2024
@weisdd weisdd force-pushed the feat/set-rule-version-record-limit-by-default branch from 82053cd to ec73d78 Compare November 18, 2024 11:52
@weisdd weisdd changed the title [WIP] feat(config): set rule version record limit by default, bump grafana to 11.3.0 feat(config): set rule version record limit by default, bump grafana to 11.3.0 Nov 18, 2024
@theSuess theSuess added this pull request to the merge queue Nov 18, 2024
Merged via the queue into master with commit f12bbc4 Nov 18, 2024
14 checks passed
@theSuess theSuess deleted the feat/set-rule-version-record-limit-by-default branch November 18, 2024 12:30
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.

Enforce a limit on growth of alert_rule_version table
2 participants