Skip to content

docs: budget metric and alert still describe every cap hit as deferred #853

Description

@SebTardif

The budget counter and its alert still describe every hit as "deferred until the next cycle." That is only true for one of the two events.

attune_budget_exhausted_total increments in recordBudgetBlock (internal/controller/resize.go) for both:

  • BudgetExhausted: this increase fits the configured cap, but not the budget left in this cycle. A later cycle can run it.
  • IncreaseExceedsBudget: one container's increase is larger than maxCpuIncreasePerMinute, maxMemoryIncreasePerMinute, maxTotalCpuIncrease, or maxTotalMemoryIncrease. Waiting does not help. Raise that cap or lower the target.

Stale text today:

  • docs/reference/metrics.md, section attune_budget_exhausted_total, mentions only the per-cycle cap and says the resize was deferred.
  • charts/attune/templates/prometheusrule.yaml, alert AttuneBudgetExhausted, says the per-cycle budget was exhausted, that resizes are being deferred, and names only maxTotalCPUIncrease / maxTotalMemoryIncrease.
  • docs/guides/prometheus-setup.md table row says "Resize budget exhausted for 30m".

This issue is reserved for a first-time contributor. Please leave the ready label off.

Done when

  • docs/reference/metrics.md says the counter covers both events, including the per-minute caps.
  • The AttuneBudgetExhausted annotation tells the reader to check the policy event (BudgetExhausted vs IncreaseExceedsBudget) and names the per-minute fields as well as the per-cycle fields.
  • The prometheus-setup table row matches that distinction.
  • charts/attune/tests/prometheusrule_test.yaml has a case, with the rule enabled, that asserts the AttuneBudgetExhausted annotation mentions IncreaseExceedsBudget and maxCpuIncreasePerMinute. Follow the existing default-alert cases in that file (matchRegex on the rendered rule). With every rule enabled, this alert is spec.groups[0].rules[5].
  • make helm-unittest passes.

Pull request

Use a title like docs: describe both budget cap events on the alert. The subject after docs: must start with a lowercase letter. Commit with git commit -s.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions