aboutsummaryrefslogtreecommitdiff
path: root/templates/hpa.yaml
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-09-23 09:32:46 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-09-23 09:32:46 +0200
commit258ae0c022e0c57e9e87c61e9ca5890ef0480da1 (patch)
treefb08d7d06b4bf606925da3db12f4d84b3bfbe884 /templates/hpa.yaml
Initial commit
Diffstat (limited to 'templates/hpa.yaml')
-rw-r--r--templates/hpa.yaml18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/hpa.yaml b/templates/hpa.yaml
new file mode 100644
index 0000000..c6fbefe
--- /dev/null
+++ b/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 }}