mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/nginx-ingress] add HPA in case of Deployment (#2736)
This commit is contained in:
committed by
Reinhard Nägele
parent
bbd3c4c0ea
commit
f3e86bf589
@@ -1,5 +1,5 @@
|
||||
name: nginx-ingress
|
||||
version: 0.8.15
|
||||
version: 0.8.16
|
||||
appVersion: 0.9.0-beta.15
|
||||
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
|
||||
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- if eq .Values.controller.kind "Deployment" }}
|
||||
{{- if .Values.controller.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.controller.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "controller.fullname" . }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
name: {{ template "controller.fullname" . }}
|
||||
minReplicas: "{{ .Values.controller.autoscaling.minReplicas }}"
|
||||
maxReplicas: "{{ .Values.controller.autoscaling.maxReplicas }}"
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: "{{ .Values.controller.autoscaling.targetAverageUtilization }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -97,6 +97,12 @@ controller:
|
||||
# cpu: 100m
|
||||
# memory: 64Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
# minReplicas: 1
|
||||
# maxReplicas: 11
|
||||
# targetAverageUtilization: 50
|
||||
|
||||
## Override NGINX template
|
||||
customTemplate:
|
||||
configMapName: ""
|
||||
|
||||
Reference in New Issue
Block a user