Files
application/backing-services/docker-registry/templates/hpaV1.yaml
2025-11-09 13:22:40 +03:30

23 lines
796 B
YAML

{{- if .Values.autoscaling.enabled }}
{{- $apiVersions := .Capabilities.APIVersions -}}
{{- if not ($apiVersions.Has "autoscaling/v2") }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "docker-registry.fullname" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "docker-registry.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- end }}