Files
service-catalog/manifests/helm/victoria-metrics-agent/0.40.0/templates/service.yaml
T
wbsong111 6290322f1b Add VictoriaMetrics observability stack + sync catalog for monitoring test
- 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>
2026-06-25 11:10:51 +09:00

98 lines
3.0 KiB
YAML

{{- $app := .Values }}
{{- $service := $app.service }}
{{- if $service.enabled -}}
{{- $ctx := dict "helm" . }}
{{- $fullname := include "vm.plain.fullname" $ctx }}
{{- $ns := include "vm.namespace" $ctx }}
---
apiVersion: v1
kind: Service
metadata:
{{- with $service.annotations }}
annotations: {{ toYaml . | nindent 4}}
{{- end }}
{{- $_ := set $ctx "extraLabels" $service.extraLabels }}
labels: {{ include "vm.labels" $ctx | nindent 4 }}
{{- $_ := unset $ctx "extraLabels" }}
name: {{ $fullname }}
namespace: {{ $ns }}
spec:
{{- with $service.clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- with $service.externalIPs }}
externalIPs: {{ toYaml . | nindent 4 }}
{{- end }}
{{- with $service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- with $service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{ toYaml . | nindent 4 }}
{{- end }}
type: {{ $service.type }}
{{- with $service.healthCheckNodePort }}
healthCheckNodePort: {{ . }}
{{- end }}
{{- with $service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with $service.internalTrafficPolicy }}
internalTrafficPolicy: {{ . }}
{{- end }}
{{- with $service.ipFamilyPolicy }}
ipFamilyPolicy: {{ . }}
{{- end }}
{{- with $service.ipFamilies }}
ipFamilies: {{ toYaml . | nindent 4 }}
{{- end }}
{{- with $service.trafficDistribution }}
trafficDistribution: {{ . }}
{{- end }}
ports:
- name: http
port: {{ $service.servicePort }}
protocol: TCP
targetPort: {{ $service.targetPort }}
{{- with $service.nodePort }}
nodePort: {{ . }}
{{- end }}
{{- with .Values.extraArgs.graphiteListenAddr }}
- name: graphite-tcp
protocol: TCP
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: graphite-tcp
- name: graphite-udp
protocol: UDP
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: graphite-udp
{{- end }}
{{- with .Values.extraArgs.influxListenAddr }}
- name: influx-tcp
protocol: TCP
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: influx-tcp
- name: influx-udp
protocol: UDP
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: influx-udp
{{- end }}
{{- with .Values.extraArgs.opentsdbHTTPListenAddr }}
- name: opentsdbhttp
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: opentsdbhttp
{{- end }}
{{- with .Values.extraArgs.opentsdbListenAddr }}
- name: opentsdb-udp
protocol: UDP
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: opentsdb-udp
- name: opentsdb-tcp
protocol: TCP
port: {{ include "vm.port.from.flag" (dict "flag" .) }}
targetPort: opentsdb-tcp
{{- end }}
{{- $_ := set $ctx "extraLabels" (mergeOverwrite (deepCopy .Values.selectorLabels) (deepCopy $service.selectorLabels)) }}
selector: {{ include "vm.selectorLabels" $ctx | nindent 4 }}
{{- $_ := unset $ctx "extraLabels" }}
{{- end }}