1
0
Fork 0
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
pterodactyl-on-k8s/charts/pterodactyl-panel/templates/nginx/hpa.yaml
Vojtech Mares eeada0e25d
Some checks are pending
Release Docs / Release Docs (push) Waiting to run
Release / Build and publish a Docker image / build-and-push-image (push) Waiting to run
chore: wip
2024-05-01 07:47:42 +02:00

28 lines
996 B
YAML

{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "pterodactyl-panel.fullname" . }}--nginx
labels:
{{- include "pterodactyl-panel.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "pterodactyl-panel.fullname" . }}--nginx
minReplicas: {{ .Values.nginx.autoscaling.minReplicas }}
maxReplicas: {{ .Values.nginx.autoscaling.maxReplicas }}
metrics:
{{- if .Values.nginx.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.nginx.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.nginx.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.nginx.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}