mirror of
https://github.com/bitnami/charts.git
synced 2026-03-11 15:37:20 +08:00
* Update hpa.yaml Signed-off-by: younessof2m <55084139+younessof2m@users.noreply.github.com> Signed-off-by: youness.chetoui <youness.chetoui@additi.fr> * upgrade chart version Signed-off-by: youness.chetoui <youness.chetoui@additi.fr> --------- Signed-off-by: younessof2m <55084139+younessof2m@users.noreply.github.com> Signed-off-by: youness.chetoui <youness.chetoui@additi.fr>
50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
{{- /*
|
|
Copyright VMware, Inc.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
{{- if and (not .Values.daemonset.enable) .Values.autoscaling.hpa.enabled }}
|
|
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
app.kubernetes.io/part-of: fluent-bit
|
|
{{- if or .Values.autoscaling.hpa.annotations .Values.commonAnnotations }}
|
|
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.autoscaling.hpa.annotations .Values.commonAnnotations ) "context" . ) }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.autoscaling.hpa.behavior }}
|
|
behavior:
|
|
{{- toYaml .Values.autoscaling.hpa.behavior | nindent 4 }}
|
|
{{- end }}
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ include "fluent-bit.fullname" . }}
|
|
minReplicas: {{ .Values.autoscaling.hpa.minReplicas }}
|
|
maxReplicas: {{ .Values.autoscaling.hpa.maxReplicas }}
|
|
metrics:
|
|
{{- if .Values.autoscaling.hpa.targetCPUUtilizationPercentage }}
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
averageUtilization: {{ .Values.autoscaling.hpa.targetCPUUtilizationPercentage }}
|
|
type: Utilization
|
|
{{- end }}
|
|
{{- if .Values.autoscaling.hpa.targetMemoryUtilizationPercentage }}
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
target:
|
|
averageUtilization: {{ .Values.autoscaling.hpa.targetMemoryUtilizationPercentage }}
|
|
type: Utilization
|
|
{{- end }}
|
|
{{- if .Values.autoscaling.hpa.customRules -}}
|
|
{{- toYaml .Values.autoscaling.hpa.customRules | nindent 4}}
|
|
{{- end -}}
|
|
{{- end }}
|