Files
devops-infra-helm-charts-gcp/helm-templates/jfrog/templates/artifactory-hpa.yaml
T
2026-08-26 03:39:42 +05:30

30 lines
893 B
YAML

{{- if .Values.autoscaling.enabled }}
{{- if semverCompare ">=v1.23.0-0" .Capabilities.KubeVersion.Version }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta2
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
labels:
app: {{ template "artifactory.name" . }}
chart: {{ template "artifactory.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "artifactory.fullname" . }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ template "artifactory.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}