Cleanup chart code

This commit is contained in:
ChiefAlexander 2020-03-02 08:49:26 -06:00
parent 103eb067f2
commit 388a499533
No known key found for this signature in database
GPG key ID: 0FF2F4C67F06A1AC
38 changed files with 403 additions and 446 deletions

View file

@ -1,5 +1,4 @@
{{- if or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both") }}
{{- if .Values.controller.autoscaling.enabled }}
{{- if and .Values.controller.autoscaling.enabled (or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both")) -}}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
@ -15,17 +14,16 @@ spec:
minReplicas: {{ .Values.controller.autoscaling.minReplicas }}
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}
metrics:
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }}
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ . }}
{{- end }}
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}