Skip to content

Commit

Permalink
use variables
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
  • Loading branch information
dimitarvdimitrov committed Apr 12, 2024
1 parent 03164e8 commit 4db5b1d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ spec:
{{- end }}
name: cortex_querier_hpa_default_requests_duration
type: prometheus
{{- $autoscaling := .Values.querier.kedaAutoscaling -}}
{{- if .Values.querier.kedaAutoscaling.predictiveScalingEnabled }}
- metadata:
query: sum(max_over_time(cortex_query_scheduler_inflight_requests{container="query-scheduler",namespace="{{ .Release.Namespace }}",quantile="0.5"}[30m] offset 6d23h30m))
query: sum(max_over_time(cortex_query_scheduler_inflight_requests{container="query-scheduler",namespace="{{ .Release.Namespace }}",quantile="0.5"}[{{$autoscaling.predictiveScalingLookback}}] offset {{$autoscaling.predictiveScalingPeriod}}))
serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }}
threshold: {{ .Values.querier.kedaAutoscaling.querySchedulerInflightRequestsThreshold | quote }}
threshold: {{ $autoscaling.querySchedulerInflightRequestsThreshold | quote }}
{{- if .Values.kedaAutoscaling.customHeaders }}
customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }}
{{- end }}
Expand Down

0 comments on commit 4db5b1d

Please sign in to comment.