Files
2026-01-21 17:37:42 +11:00

34 lines
1.1 KiB
YAML

{{- if .Values.pepServer.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "pep-server.appName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "pep-server.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "pep-server.appName" . }}
minReplicas: {{ .Values.pepServer.autoscaling.minReplicas }}
maxReplicas: {{ .Values.pepServer.autoscaling.maxReplicas }}
metrics:
{{- if .Values.pepServer.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.pepServer.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.pepServer.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.pepServer.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}