diff options
| author | Leon Klingele <git@leonklingele.de> | 2020-02-03 23:19:18 +0100 |
|---|---|---|
| committer | Leon Klingele <git@leonklingele.de> | 2020-02-07 13:46:12 +0100 |
| commit | 3cde5e28a8d946c1110697946b180027204b5d2c (patch) | |
| tree | 37a3e69fde854e13d54c8de6ed5e3ce3d637e290 /kubernetes/templates/hpa.yaml | |
| parent | 9841f74adc94a4845aea6aace8d2408c3255dfa7 (diff) | |
| download | invidious-3cde5e28a8d946c1110697946b180027204b5d2c.tar.gz invidious-3cde5e28a8d946c1110697946b180027204b5d2c.tar.bz2 invidious-3cde5e28a8d946c1110697946b180027204b5d2c.zip | |
Add support to run on Kubernetes, add Helm chart
See relevant README.md for more details.
Diffstat (limited to 'kubernetes/templates/hpa.yaml')
| -rw-r--r-- | kubernetes/templates/hpa.yaml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kubernetes/templates/hpa.yaml b/kubernetes/templates/hpa.yaml new file mode 100644 index 00000000..c6fbefe2 --- /dev/null +++ b/kubernetes/templates/hpa.yaml @@ -0,0 +1,18 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ template "invidious.fullname" . }} + labels: + app: {{ template "invidious.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: {{ .Release.Name }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ template "invidious.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} +{{- end }} |
