Update hpa version
This commit is contained in:
		
							parent
							
								
									788906385b
								
							
						
					
					
						commit
						7144d26954
					
				
					 2 changed files with 18 additions and 10 deletions
				
			
		| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
{{- if .Values.web.autoscaling.enabled -}}
 | 
					{{- if .Values.web.autoscaling.enabled -}}
 | 
				
			||||||
apiVersion: autoscaling/v2beta1
 | 
					apiVersion: autoscaling/v2
 | 
				
			||||||
kind: HorizontalPodAutoscaler
 | 
					kind: HorizontalPodAutoscaler
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: {{ template "django.fullname" . }}-web
 | 
					  name: {{ template "django.fullname" . }}-web
 | 
				
			||||||
| 
						 | 
					@ -13,16 +13,20 @@ spec:
 | 
				
			||||||
  minReplicas: {{ .Values.web.autoscaling.minReplicas }}
 | 
					  minReplicas: {{ .Values.web.autoscaling.minReplicas }}
 | 
				
			||||||
  maxReplicas: {{ .Values.web.autoscaling.maxReplicas }}
 | 
					  maxReplicas: {{ .Values.web.autoscaling.maxReplicas }}
 | 
				
			||||||
  metrics:
 | 
					  metrics:
 | 
				
			||||||
    {{- if .Values.web.autoscaling.targetCPUUtilizationPercentage }}
 | 
					    {{- if .Values.web.autoscaling.targetCPU }}
 | 
				
			||||||
    - type: Resource
 | 
					    - type: Resource
 | 
				
			||||||
      resource:
 | 
					      resource:
 | 
				
			||||||
        name: cpu
 | 
					        name: cpu
 | 
				
			||||||
        targetAverageUtilization: {{ .Values.web.autoscaling.targetCPUUtilizationPercentage }}
 | 
					        target:
 | 
				
			||||||
 | 
					          type: "Utilization"
 | 
				
			||||||
 | 
					          averageUtilization: {{ .Values.web.autoscaling.targetCPU }}
 | 
				
			||||||
    {{- end }}
 | 
					    {{- end }}
 | 
				
			||||||
    {{- if .Values.web.autoscaling.targetMemoryUtilizationPercentage }}
 | 
					    {{- if .Values.web.autoscaling.targetMemory }}
 | 
				
			||||||
    - type: Resource
 | 
					    - type: Resource
 | 
				
			||||||
      resource:
 | 
					      resource:
 | 
				
			||||||
        name: memory
 | 
					        name: memory
 | 
				
			||||||
        targetAverageUtilization: {{ .Values.web.autoscaling.targetMemoryUtilizationPercentage }}
 | 
					        target:
 | 
				
			||||||
 | 
					          type: "Utilization"
 | 
				
			||||||
 | 
					          averageUtilization: {{ .Values.web.autoscaling.targetMemory }}
 | 
				
			||||||
    {{- end }}
 | 
					    {{- end }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
{{- if .Values.worker.autoscaling.enabled -}}
 | 
					{{- if .Values.worker.autoscaling.enabled -}}
 | 
				
			||||||
apiVersion: autoscaling/v2beta1
 | 
					apiVersion: autoscaling/v2
 | 
				
			||||||
kind: HorizontalPodAutoscaler
 | 
					kind: HorizontalPodAutoscaler
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: {{ template "django.fullname" . }}-worker
 | 
					  name: {{ template "django.fullname" . }}-worker
 | 
				
			||||||
| 
						 | 
					@ -13,16 +13,20 @@ spec:
 | 
				
			||||||
  minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
 | 
					  minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
 | 
				
			||||||
  maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
 | 
					  maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
 | 
				
			||||||
  metrics:
 | 
					  metrics:
 | 
				
			||||||
    {{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
 | 
					    {{- if .Values.worker.autoscaling.targetCPU }}
 | 
				
			||||||
    - type: Resource
 | 
					    - type: Resource
 | 
				
			||||||
      resource:
 | 
					      resource:
 | 
				
			||||||
        name: cpu
 | 
					        name: cpu
 | 
				
			||||||
        targetAverageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
 | 
					        target:
 | 
				
			||||||
 | 
					          type: "Utilization"
 | 
				
			||||||
 | 
					          averageUtilization: {{ .Values.worker.autoscaling.targetCPU }}
 | 
				
			||||||
    {{- end }}
 | 
					    {{- end }}
 | 
				
			||||||
    {{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
 | 
					    {{- if .Values.worker.autoscaling.targetMemory }}
 | 
				
			||||||
    - type: Resource
 | 
					    - type: Resource
 | 
				
			||||||
      resource:
 | 
					      resource:
 | 
				
			||||||
        name: memory
 | 
					        name: memory
 | 
				
			||||||
        targetAverageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
 | 
					        target:
 | 
				
			||||||
 | 
					          type: "Utilization"
 | 
				
			||||||
 | 
					          averageUtilization: {{ .Values.worker.autoscaling.targetMemory }}
 | 
				
			||||||
    {{- end }}
 | 
					    {{- end }}
 | 
				
			||||||
{{- end }}
 | 
					{{- end }}
 | 
				
			||||||
		Reference in a new issue