Files
charts/bitnami/contour/templates/envoy/hpa.yaml
Timofey Titovets a561f35d44 [bitnami/contour] Envoy: add support for kind Deployment (#7293)
* [bitnami/contour] Envoy: add support for kind Deployment

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com>

* Update values.yaml according to metadata standard

Signed-off-by: juan131 <juanariza@vmware.com>

* Include validations in NOTES.txt

Signed-off-by: juan131 <juanariza@vmware.com>

* Bump chart version

Signed-off-by: juan131 <juanariza@vmware.com>

* Fix validations

* [bitnami/contour] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
2021-08-25 10:03:06 +02:00

36 lines
1.4 KiB
YAML

{{- if and .Values.envoy.enabled .Values.envoy.autoscaling.enabled (eq .Values.envoy.kind "deployment") }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "common.names.fullname" . }}-envoy
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: envoy
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ include "common.names.fullname" . }}-envoy
minReplicas: {{ .Values.envoy.autoscaling.minReplicas }}
maxReplicas: {{ .Values.envoy.autoscaling.maxReplicas }}
metrics:
{{- if .Values.envoy.autoscaling.targetCPU }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.envoy.autoscaling.targetCPU }}
{{- end }}
{{- if .Values.envoy.autoscaling.targetMemory }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.envoy.autoscaling.targetMemory }}
{{- end }}
{{- end }}