diff --git a/charts/redirect/Chart.lock b/charts/redirect/Chart.lock new file mode 100644 index 0000000..f377b39 --- /dev/null +++ b/charts/redirect/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: horizontal-pod-autoscalers + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 +digest: sha256:b69c147f2b6a3d345e7155979fc23ff6bbf4fa0c3822d1d9f64691ab29d9778c +generated: "2020-10-20T19:31:36.647230414+02:00" diff --git a/charts/redirect/Chart.yaml b/charts/redirect/Chart.yaml index f9fc424..be752a4 100644 --- a/charts/redirect/Chart.yaml +++ b/charts/redirect/Chart.yaml @@ -4,8 +4,12 @@ description: Redirect home: https://github.com/wyrihaximusnet/docker-redirect icon: https://helm.wyrihaximus.net/images/charts/redirect.png type: application -version: 0.6.0 +version: 0.6.1 appVersion: random maintainers: - name: WyriHaximus email: helm@wyrihaximus.net +dependencies: + - name: horizontal-pod-autoscalers + version: ^0.1 + repository: https://helm.wyrihaximus.net/ diff --git a/charts/redirect/templates/hpa.yaml b/charts/redirect/templates/hpa.yaml index e6515ab..eabeb64 100644 --- a/charts/redirect/templates/hpa.yaml +++ b/charts/redirect/templates/hpa.yaml @@ -1,20 +1,3 @@ {{- if .Values.hpa.enable -}} -apiVersion: autoscaling/v2beta2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ template ".helm.fullname" . }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template ".helm.fullname" . }} - minReplicas: {{ .Values.replicas }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 80 -{{ end }} \ No newline at end of file +{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include ".helm.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} +{{ end }}