Start migration of helm chart (#5159)
This commit is contained in:
parent
7e65b90c4b
commit
624cb5f048
67 changed files with 2977 additions and 0 deletions
34
charts/ingress-nginx/templates/controller-hpa.yaml
Normal file
34
charts/ingress-nginx/templates/controller-hpa.yaml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{{- if or (eq .Values.controller.kind "Deployment") (eq .Values.controller.kind "Both") }}
|
||||
{{- if .Values.controller.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "nginx-ingress.name" . }}
|
||||
chart: {{ template "nginx-ingress.chart" . }}
|
||||
component: "{{ .Values.controller.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "nginx-ingress.controller.fullname" . }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
name: {{ template "nginx-ingress.controller.fullname" . }}
|
||||
minReplicas: {{ .Values.controller.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue