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>
127 lines
4.9 KiB
YAML
127 lines
4.9 KiB
YAML
{{- $app := merge (deepCopy .Values.vlinsert) (deepCopy .Values.common) -}}
|
|
{{- $_ := set .Values "vlinsert" $app }}
|
|
{{- if $app.enabled -}}
|
|
{{- $ctx := dict "helm" . "appKey" "vlinsert" }}
|
|
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
|
{{- $sa := include "vm.fullname" . }}
|
|
{{- $ns := include "vm.namespace" $ctx }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
{{- with $app.annotations }}
|
|
annotations: {{ toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- $_ := set $ctx "extraLabels" $app.extraLabels }}
|
|
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
|
{{- $_ := unset $ctx "extraLabels" }}
|
|
name: {{ $fullname }}
|
|
namespace: {{ $ns }}
|
|
spec:
|
|
selector:
|
|
matchLabels: {{ include "vm.selectorLabels" $ctx | nindent 6 }}
|
|
{{- if not $app.horizontalPodAutoscaler.enabled }}
|
|
replicas: {{ $app.replicaCount }}
|
|
{{- end }}
|
|
{{- with $app.strategy }}
|
|
strategy: {{ toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
{{- with $app.podAnnotations }}
|
|
annotations: {{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- $_ := set $ctx "extraLabels" $app.podLabels }}
|
|
labels: {{ include "vm.podLabels" $ctx | nindent 8 }}
|
|
spec:
|
|
{{- with $app.priorityClassName }}
|
|
priorityClassName: {{ . }}
|
|
{{- end }}
|
|
{{- with $app.initContainers }}
|
|
initContainers: {{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with ($app.imagePullSecrets | default .Values.global.imagePullSecrets) }}
|
|
imagePullSecrets: {{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: vlinsert
|
|
image: {{ include "vm.image" $ctx }}
|
|
imagePullPolicy: {{ $app.image.pullPolicy }}
|
|
{{- with $app.lifecycle }}
|
|
lifecycle: {{ . | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- with $app.containerWorkingDir }}
|
|
workingDir: {{ . }}
|
|
{{- end }}
|
|
{{- if $app.securityContext.enabled }}
|
|
securityContext: {{ include "vm.securityContext" (dict "securityContext" $app.securityContext "helm" .) | nindent 12 }}
|
|
{{- end }}
|
|
args: {{ include "vlinsert.args" $ctx | nindent 12 }}
|
|
{{- with $app.envFrom }}
|
|
envFrom: {{ tpl (toYaml .) $ctx | nindent 12 }}
|
|
{{- end }}
|
|
{{- with $app.env }}
|
|
env: {{ tpl (toYaml .) $ctx | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: {{ $app.ports.name | default "http" }}
|
|
containerPort: {{ include "vm.port.from.flag" (dict "flag" $app.extraArgs.httpListenAddr "default" "9481") }}
|
|
{{- with (fromYaml (include "vm.probe" (dict "app" $app "type" "readiness"))) }}
|
|
readinessProbe: {{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with (fromYaml (include "vm.probe" (dict "app" $app "type" "liveness"))) }}
|
|
livenessProbe: {{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with (fromYaml (include "vm.probe" (dict "app" $app "type" "startup"))) }}
|
|
startupProbe: {{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- $license := include "vm.license.mount" . }}
|
|
{{- if or $app.extraVolumeMounts $license }}
|
|
volumeMounts:
|
|
{{- with $app.extraVolumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- $license | nindent 12 }}
|
|
{{- end }}
|
|
{{- with $app.resources }}
|
|
resources: {{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with $app.extraContainers }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $app.nodeSelector }}
|
|
nodeSelector: {{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if $app.podSecurityContext.enabled }}
|
|
securityContext: {{ include "vm.securityContext" (dict "securityContext" $app.podSecurityContext "helm" .) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if or (.Values.serviceAccount).name (.Values.serviceAccount).create }}
|
|
serviceAccountName: {{ tpl ((.Values.serviceAccount).name | default $sa) $ctx }}
|
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
|
|
{{- end }}
|
|
{{- with $app.tolerations }}
|
|
tolerations: {{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $app.affinity }}
|
|
affinity: {{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $app.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- range $constraint := . }}
|
|
- {{ toYaml $constraint | nindent 10 | trim }}
|
|
{{- if not $constraint.labelSelector }}
|
|
labelSelector:
|
|
matchLabels: {{ include "vm.selectorLabels" $ctx | nindent 14 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
terminationGracePeriodSeconds: {{ $app.terminationGracePeriodSeconds }}
|
|
{{- $license := include "vm.license.volume" . }}
|
|
{{- if or $app.extraVolumes $license }}
|
|
volumes:
|
|
{{- with $app.extraVolumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- $license | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|