blob: b10eb59edf5e86db7a087a31905b6bf415f3ed37 [file] [log] [blame]
Giorgi Lekveishviliec6b3cc2023-12-01 16:30:04 +04001{{- if .Values.autoscaler.enabled }}
2---
3kind: ConfigMap
4apiVersion: v1
5metadata:
6 name: {{ template "coredns.fullname" . }}-autoscaler
7 namespace: {{ .Release.Namespace }}
8 labels: {{- include "coredns.labels.autoscaler" . | nindent 4 }}
9 {{- if .Values.customLabels }}
10 {{- toYaml .Values.customLabels | nindent 4 }}
11 {{- end }}
12 {{- if or .Values.autoscaler.configmap.annotations .Values.customAnnotations }}
13 annotations:
14 {{- if .Values.customAnnotations }}
15 {{- toYaml .Values.customAnnotations | nindent 4 }}
16 {{- end }}
17 {{- if .Values.autoscaler.configmap.annotations -}}
18 {{ toYaml .Values.autoscaler.configmap.annotations | nindent 4 }}
19 {{- end }}
20 {{- end }}
21data:
22 # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
23 # If using small nodes, "nodesPerReplica" should dominate.
24 linear: |-
25 {
26 "coresPerReplica": {{ .Values.autoscaler.coresPerReplica | float64 }},
27 "nodesPerReplica": {{ .Values.autoscaler.nodesPerReplica | float64 }},
28 "preventSinglePointFailure": {{ .Values.autoscaler.preventSinglePointFailure }},
29 "min": {{ .Values.autoscaler.min | int }},
30 "max": {{ .Values.autoscaler.max | int }},
31 "includeUnschedulableNodes": {{ .Values.autoscaler.includeUnschedulableNodes }}
32 }
33{{- end }}