diff --git a/charts/posthog/templates/worker-hpa.yaml b/charts/posthog/templates/worker-hpa.yaml index c83f7a52..b8e59075 100644 --- a/charts/posthog/templates/worker-hpa.yaml +++ b/charts/posthog/templates/worker-hpa.yaml @@ -3,17 +3,17 @@ apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: {{ template "posthog.fullname" . }}-{{ .name }}-worker - labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }} + name: {{ template "posthog.fullname" $ }}-{{ .name }}-worker + labels: {{- include "_snippet-metadata-labels-common" $ | nindent 4 }} spec: scaleTargetRef: kind: Deployment apiVersion: apps/v1 - name: {{ template "posthog.fullname" . }}-{{ .name }}-worker + name: {{ template "posthog.fullname" $ }}-{{ .name }}-worker minReplicas: {{ .Values.worker.hpa.minpods }} maxReplicas: {{ .Values.worker.hpa.maxpods }} metrics: - {{- with .Values.worker.hpa.cputhreshold }} + {{- with $.Values.worker.hpa.cputhreshold }} - type: Resource resource: name: cpu @@ -22,6 +22,6 @@ spec: averageUtilization: {{ . }} {{- end }} behavior: - {{ toYaml .Values.worker.hpa.behavior | nindent 4 }} + {{ toYaml $.Values.worker.hpa.behavior | nindent 4 }} {{- end }} {{- end }}