first commit
This commit is contained in:
35
templates/fusion-operator/hpa.yaml
Normal file
35
templates/fusion-operator/hpa.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.fusionOperator.enabled }}
|
||||
{{- if and .Values.fusionOperator.autoscaling.enabled (ne (include "parent.dataplaneMode" . ) "shared") }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ template "fusionOperator.appName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "fusionOperator.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ template "fusionOperator.appName" . }}
|
||||
minReplicas: {{ .Values.fusionOperator.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.fusionOperator.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.fusionOperator.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.fusionOperator.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.fusionOperator.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.fusionOperator.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user