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>
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
{{- $ctx := dict "helm" . }}
|
|
{{- range $name, $app := .Values }}
|
|
{{- if and (kindIs "map" $app) $app.enabled ($app.service).enabled }}
|
|
{{- $service := $app.service }}
|
|
{{- $_ := set $ctx "extraLabels" $service.labels }}
|
|
{{- $_ := set $ctx "appKey" $name }}
|
|
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
{{- with $service.annotations }}
|
|
annotations: {{ toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
|
{{- $_ := unset $ctx "extraLabels" }}
|
|
name: {{ $fullname }}
|
|
namespace: {{ include "vm.namespace" $ }}
|
|
spec:
|
|
{{- with $service.trafficDistribution }}
|
|
trafficDistribution: {{ . }}
|
|
{{- end }}
|
|
{{- $type := $service.type }}
|
|
{{- if and (not $type) (eq $app.mode "statefulSet") }}
|
|
{{- $type = "ClusterIP" }}
|
|
{{- end }}
|
|
type: {{ $type }}
|
|
{{- if eq $type "ClusterIP" }}
|
|
{{- with $service.clusterIP }}
|
|
clusterIP: {{. }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with $service.externalIPs }}
|
|
externalIPs: {{ toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with $service.loadBalancerIP }}
|
|
loadBalancerIP: {{ . }}
|
|
{{- end }}
|
|
{{- with $service.loadBalancerSourceRanges }}
|
|
loadBalancerSourceRanges: {{ toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with $service.healthCheckNodePort }}
|
|
healthCheckNodePort: {{ . }}
|
|
{{- end }}
|
|
{{- with $service.externalTrafficPolicy }}
|
|
externalTrafficPolicy: {{ . }}
|
|
{{- end }}
|
|
{{- with $service.ipFamilyPolicy }}
|
|
ipFamilyPolicy: {{ . }}
|
|
{{- end }}
|
|
{{- with $service.ipFamilies }}
|
|
ipFamilies: {{ toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- $portsTpl := printf "%s.ports" $name }}
|
|
{{- with include $portsTpl $app }}
|
|
ports: {{ . | nindent 4 }}
|
|
{{- if and (eq $type "NodePort") $service.nodePort }}
|
|
nodePort: {{ $service.nodePort }}
|
|
{{- end }}
|
|
{{- end }}
|
|
selector: {{ include "vm.selectorLabels" $ctx | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|