mirror of
https://github.com/bvanroll/example-node-project.git
synced 2025-08-29 11:52:43 +00:00
Draft create
This commit is contained in:
25
charts/frontend-node/templates/hpa.yaml
Executable file
25
charts/frontend-node/templates/hpa.yaml
Executable file
@@ -0,0 +1,25 @@
|
||||
{{- if .Values.hpa.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
draft: {{ default "draft-app" .Values.draft }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ template "fullname" . }}
|
||||
minReplicas: {{ .Values.hpa.minReplicas }}
|
||||
maxReplicas: {{ .Values.hpa.maxReplicas }}
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.hpa.cpuTargetAverageUtilization }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.hpa.memoryTargetAverageUtilization }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user