HPA with http requests

This commit is contained in:
Stefan Prodan
2018-01-30 14:17:47 +02:00
parent 7a8506e60f
commit 02e34f72e0
3 changed files with 9 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ Parameter | Description | Default
`hpa.enabled` | Enables HPA | `false`
`hpa.cpu` | Target CPU usage per pod | None
`hpa.memory` | Target memory usage per pod | None
`hpa.requests` | Target requests per second per pod | None
`hpa.maxReplicas` | Maximum pod replicas | `10`
`ingress.hosts` | Ingress accepted hostnames | None
`ingress.tls` | Ingress TLS configuration | None:

View File

@@ -23,4 +23,10 @@ spec:
name: memory
targetAverageValue: {{ .Values.hpa.memory }}
{{- end }}
{{- if .Values.hpa.requests }}
- type: Pod
pods:
metricName: http_requests
targetAverageValue: {{ .Values.hpa.requests }}
{{- end }}
{{- end }}

View File

@@ -21,6 +21,8 @@ hpa:
cpu:
# average memory usage per pod (100Mi-1Gi)
memory:
# average http requests per second per pod (k8s-prometheus-adapter)
requests:
ingress:
enabled: false