File tree Expand file tree Collapse file tree 6 files changed +62
-0
lines changed Expand file tree Collapse file tree 6 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## master / unreleased
4
4
5
+ * [ FEATURE] Add autoscaler for queriers #190
5
6
* [ FEATURE] Add autoscaler for distributors #189
6
7
* [ FEATURE] Add autoscaler for ingesters #182
7
8
* [ ENHANCEMENT] Define namespace in templates #184
Original file line number Diff line number Diff line change @@ -632,6 +632,12 @@ Kubernetes: `^1.19.0-0`
632
632
| querier.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.topologyKey | string | `"kubernetes.io/hostname"` | |
633
633
| querier.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].weight | int | `100` | |
634
634
| querier.annotations | object | `{}` | |
635
+ | querier.autoscaling.behavior | object | `{}` | Ref : https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-configurable-scaling-behavior |
636
+ | querier.autoscaling.enabled | bool | `false` | Creates a HorizontalPodAutoscaler for the querier pods. |
637
+ | querier.autoscaling.maxReplicas | int | `30` | |
638
+ | querier.autoscaling.minReplicas | int | `2` | |
639
+ | querier.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
640
+ | querier.autoscaling.targetMemoryUtilizationPercentage | int | `0` | |
635
641
| querier.containerSecurityContext.enabled | bool | `true` | |
636
642
| querier.containerSecurityContext.readOnlyRootFilesystem | bool | `true` | |
637
643
| querier.env | list | `[]` | |
Original file line number Diff line number Diff line change @@ -67,5 +67,8 @@ distributor:
67
67
autoscaling :
68
68
enabled : true
69
69
minReplicas : 1
70
+ querier :
71
+ autoscaling :
72
+ enabled : true
70
73
nginx :
71
74
replicas : 1
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ metadata:
8
8
annotations :
9
9
{{- toYaml .Values.querier.annotations | nindent 4 }}
10
10
spec :
11
+ {{- if not .Values.querier.autoscaling.enabled }}
11
12
replicas : {{ .Values.querier.replicas }}
13
+ {{- end }}
12
14
selector :
13
15
matchLabels :
14
16
{{- include "cortex.querierSelectorLabels" . | nindent 6 }}
Original file line number Diff line number Diff line change
1
+ {{- with .Values.querier.autoscaling -}}
2
+ {{- if .enabled }}
3
+ apiVersion : autoscaling/v2beta2
4
+ kind : HorizontalPodAutoscaler
5
+ metadata :
6
+ name : {{ include "cortex.querierFullname" $ }}
7
+ namespace : {{ $.Release.Namespace }}
8
+ labels :
9
+ {{- include "cortex.querierLabels" $ | nindent 4 }}
10
+ spec :
11
+ scaleTargetRef :
12
+ apiVersion : apps/v1
13
+ kind : Deployment
14
+ name : {{ include "cortex.querierFullname" $ }}
15
+ minReplicas : {{ .minReplicas }}
16
+ maxReplicas : {{ .maxReplicas }}
17
+ metrics :
18
+ {{- with .targetCPUUtilizationPercentage }}
19
+ - type : Resource
20
+ resource :
21
+ name : cpu
22
+ target :
23
+ type : Utilization
24
+ averageUtilization : {{ . }}
25
+ {{- end }}
26
+ {{- with .targetMemoryUtilizationPercentage }}
27
+ - type : Resource
28
+ resource :
29
+ name : memory
30
+ target :
31
+ type : Utilization
32
+ averageUtilization : {{ . }}
33
+ {{- end }}
34
+ {{- with .behavior }}
35
+ behavior :
36
+ {{- toYaml . | nindent 4 }}
37
+ {{- end }}
38
+ {{- end }}
39
+ {{- end }}
Original file line number Diff line number Diff line change @@ -819,6 +819,17 @@ querier:
819
819
topologyKey : ' kubernetes.io/hostname'
820
820
821
821
annotations : {}
822
+
823
+ autoscaling :
824
+ # -- Creates a HorizontalPodAutoscaler for the querier pods.
825
+ enabled : false
826
+ minReplicas : 2
827
+ maxReplicas : 30
828
+ targetCPUUtilizationPercentage : 80
829
+ targetMemoryUtilizationPercentage : 0 # 80
830
+ # -- Ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-configurable-scaling-behavior
831
+ behavior : {}
832
+
822
833
persistence :
823
834
subPath :
824
835
You can’t perform that action at this time.
0 commit comments