6290322f1b
- VM stack 10 charts: victoria-metrics-cluster/auth, victoria-logs-cluster, victoria-metrics-agent/alert, opentelemetry-collector, kube-state-metrics, prometheus-node-exporter, alertmanager, perses (JWT/OIDC, Infisical-ready) - ArgoCD ApplicationSet (syncWave) + per-chart dip-values overlays - doc/victoria-metrics-architecture.md, define-chart-resources updates - includes pending working-tree changes (mlflow, kubeflow, apisix, CLAUDE.md) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
962 B
YAML
30 lines
962 B
YAML
{{- $ctx := dict "helm" . }}
|
|
{{- $ns := include "vm.namespace" . }}
|
|
{{- range $name, $app := .Values }}
|
|
{{- if and (kindIs "map" $app) $app.enabled ($app.horizontalPodAutoscaler).enabled }}
|
|
{{- $isStatefulSet := eq $name "vlstorage" }}
|
|
{{- $hpa := $app.horizontalPodAutoscaler }}
|
|
{{- $_ := set $ctx "extraLabels" $app.extraLabels }}
|
|
{{- $_ := set $ctx "appKey" $name }}
|
|
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
|
---
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
|
name: {{ $fullname }}
|
|
namespace: {{ $ns }}
|
|
spec:
|
|
maxReplicas: {{ $hpa.maxReplicas }}
|
|
minReplicas: {{ $hpa.minReplicas }}
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: {{ ternary "StatefulSet" "Deployment" $isStatefulSet }}
|
|
name: {{ $fullname }}
|
|
metrics: {{ toYaml $hpa.metrics | nindent 4 }}
|
|
{{- with $hpa.behavior }}
|
|
behavior: {{ toYaml . | nindent 4 }}
|
|
{{- end -}}
|
|
{{- end }}
|
|
{{- end }}
|