hydra bootstraping
This commit is contained in:
36
opencloud/charts/hydra/templates/hpa.yaml
Normal file
36
opencloud/charts/hydra/templates/hpa.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
{{- if .Values.deployment.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
{{- if .Release.Namespace }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
name: {{ include "hydra.fullname" . }}
|
||||
labels:
|
||||
{{- include "hydra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- with .Values.deployment.autoscaling.behavior }}
|
||||
behavior: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "hydra.fullname" . }}
|
||||
minReplicas: {{ .Values.deployment.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.deployment.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- with .Values.deployment.autoscaling.targetMemory }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.deployment.autoscaling.targetCPU}}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user