Files
charts/bitnami/airflow/templates/scheduler/hpa.yaml
T
c74d5b3ea3 [bitnami/airflow] chore: ♻️ ⬆️ Update common and remove k8s < 1.23 references (#33333)
* [bitnami/airflow] chore: ♻️ ⬆️ Update common and remove k8s < 1.23 references

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* fix: 🐛 Add missing end

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* chore: 🔧 Bump resourcesPreset

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* chore: 🔧 Add serial verification

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

---------

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
2025-05-07 13:40:59 +02:00

42 lines
1.5 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.scheduler.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "airflow.scheduler.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: scheduler
{{- 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: {{ template "airflow.scheduler.fullname" . }}
minReplicas: {{ .Values.scheduler.autoscaling.hpa.minReplicas }}
maxReplicas: {{ .Values.scheduler.autoscaling.hpa.maxReplicas }}
metrics:
{{- if .Values.scheduler.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.scheduler.autoscaling.hpa.targetCPU }}
{{- end }}
{{- if .Values.scheduler.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.scheduler.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}