Files
charts/bitnami/clickhouse/templates/vpa.yaml
Per Osbäck 69f5d02d1d [bitnami/clickhouse] Fix clickhouse VPA apiVersion and template (#36442)
* fix: correct context reference for custom labels in VerticalPodAutoscaler metadata

Fixes #36439

fix: update apiVersion for Vertical Pod Autoscaler to use autoscaling.k8s.io/v1

Fixes #36303

chore: bump ClickHouse chart version to 9.4.6
chore: bump version to 2.31.8 in Chart.yaml

Signed-off-by: Per Osbäck <per@osbeck.com>

* Apply suggestion from @jotamartos

Signed-off-by: Juan José Martos <jota.martos@broadcom.com>

* Remove old VPA apiVersion reference

Removed outdated Vertical Pod Autoscaler apiVersion handling.

Signed-off-by: Juan José Martos <jota.martos@broadcom.com>

---------

Signed-off-by: Per Osbäck <per@osbeck.com>
Signed-off-by: Juan José Martos <jota.martos@broadcom.com>
Co-authored-by: Juan José Martos <jota.martos@broadcom.com>
2026-02-09 12:49:21 +01:00

50 lines
2.0 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (include "common.capabilities.apiVersions.has" (dict "version" "autoscaling.k8s.io/v1/VerticalPodAutoscaler" "context" . )) .Values.autoscaling.vpa.enabled }}
{{- $shards := .Values.shards | int }}
{{- range $i, $e := until $shards }}
apiVersion: {{ include "common.capabilities.vpa.apiVersion" $ }}
kind: VerticalPodAutoscaler
metadata:
name: {{ printf "%s-shard%d" (include "common.names.fullname" $ ) $i }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" (dict "customLabels" $.Values.commonLabels "context" $) | nindent 4 }}
app.kubernetes.io/component: clickhouse
app.kubernetes.io/part-of: clickhouse
{{- if or $.Values.autoscaling.vpa.annotations $.Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list $.Values.autoscaling.vpa.annotations $.Values.commonAnnotations) "context" $) }}
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
resourcePolicy:
containerPolicies:
- containerName: keeper
{{- with $.Values.autoscaling.vpa.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.autoscaling.vpa.maxAllowed }}
maxAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.autoscaling.vpa.minAllowed }}
minAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
targetRef:
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" $ }}
kind: StatefulSet
name: {{ printf "%s-shard%d" (include "common.names.fullname" $ ) $i }}
{{- if $.Values.autoscaling.vpa.updatePolicy }}
updatePolicy:
{{- with $.Values.autoscaling.vpa.updatePolicy.updateMode }}
updateMode: {{ . }}
{{- end }}
{{- end }}
{{- end }}
---
{{- end }}