feat: Remove redundant helm charts and add console as a dependency (#223)

This commit is contained in:
Kent Dong
2023-03-07 11:37:00 +08:00
committed by GitHub
parent 7e2c039fc2
commit 7f6b157a19
75 changed files with 27 additions and 16165 deletions

View File

@@ -0,0 +1,55 @@
{{- if .Values.gateway.autoscaling.enabled }}
{{- if not .Values.global.autoscalingv2API }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "gateway.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gateway.labels" . | nindent 4 }}
annotations:
{{- .Values.gateway.annotations | toYaml | nindent 4 }}
spec:
minReplicas: {{ .Values.gateway.autoscaling.minReplicas }}
maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "gateway.name" . }}
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.gateway.autoscaling.targetCPUUtilizationPercentage }}
---
{{- else }}
{{- if (semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion)}}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta2
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "gateway.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gateway.labels" . | nindent 4 }}
annotations:
{{- .Values.gateway.annotations | toYaml | nindent 4 }}
spec:
minReplicas: {{ .Values.gateway.autoscaling.minReplicas }}
maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "gateway.name" . }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.gateway.autoscaling.targetCPUUtilizationPercentage }}
---
{{- end }}
{{- end }}