cortexproject / cortex-helm-chart

Helm chart for Cortex
Apache License 2.0
147 stars 163 forks source link

add autoscaler for the ruler #430

Closed kd7lxl closed 1 year ago

kd7lxl commented 1 year ago

What this PR does: Defines an optional HorizontalPodAutoscaler for the ruler.

Requires a config like:

config:
  ruler:
    enable_sharding: true
    ring:
      kvstore:
        store: memberlist
ruler:
  autoscaling:
    enabled: true

as documented in https://cortexmetrics.io/docs/guides/ruler-sharding/.

~Not sure if we should make any of these default or a condition on the HPA. Or maybe~ added a fail block to check for these conditions.

In my experience, both memory and CPU scale pretty linearly with ruler load, so I've included both as target metrics for the ruler HPA.

Which issue(s) this PR fixes: Fixes #

Checklist