Files
charts/bitnami/dremio/templates/executor/hpa.yaml
Daniel cf71b7189f [bitnami/dremio] Engine overrides are clobbered by the last value (#34725)
* [bitnami/dremio] Engine overrides are clobbered by the last value

Signed-off-by: Daniel Jimenez <daniel.j.jimenez@gmail.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>

---------

Signed-off-by: Daniel Jimenez <daniel.j.jimenez@gmail.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
2025-07-03 12:25:37 +02:00

57 lines
2.3 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- /*
Dremio supports different executor groups called "engines".
These are defined in executor.engines and all the executor-specific k8s objects are created per engine.
Each engine contains an "overrides" section which allows replacing the common executor configuration
set in executor.common. This logic is inspired in upstream Dremio chart.
https://docs.dremio.com/cloud/sonar/workloads/engines/
*/}}
{{- range $engine := .Values.executor.engines }}
{{- $executorValues := deepCopy $.Values.executor.common }}
{{- $executorValues = mustMergeOverwrite $executorValues $engine.overrides }}
{{- if $executorValues.autoscaling.hpa.enabled }}
---
apiVersion: {{ include "common.capabilities.hpa.apiVersion" (dict "context" $) }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "dremio.executor.fullname" (dict "context" $ "engine" $engine.name) }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: dremio
app.kubernetes.io/component: executor
{{- /* We need an extra label for the engine */}}
engine: {{ $engine.name }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" $ }}
kind: StatefulSet
name: {{ include "dremio.executor.fullname" (dict "context" $ "engine" $engine.name) }}
minReplicas: {{ $executorValues.autoscaling.hpa.minReplicas }}
maxReplicas: {{ $executorValues.autoscaling.hpa.maxReplicas }}
metrics:
{{- if $executorValues.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ $executorValues.autoscaling.hpa.targetMemory }}
{{- end }}
{{- if $executorValues.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ $executorValues.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- end }}