Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-cluster-latest/templates/vmselect-clusternative-service-lb.yaml
T
2026-08-26 03:39:42 +05:30

38 lines
1.4 KiB
YAML

{{- if .Values.vmselect.enabled }}
{{- if .Values.vmselect.clusternativeService.enabled }}
{{- $ctx := dict "helm" . "appKey" "vmselect" }}
{{- $fullname := include "vm.plain.fullname" $ctx }}
apiVersion: v1
kind: Service
metadata:
name: {{ $fullname }}-tcp-lb
namespace: {{ .Release.Namespace }}
annotations:
networking.gke.io/load-balancer-type: "Internal"
labels: {{ include "vm.labels" $ctx | nindent 4 }}
{{- if .Values.vmselect.service.labels }}
{{ toYaml .Values.vmselect.service.labels | indent 4}}
{{- end }}
spec:
type: LoadBalancer
{{- if .Values.vmselect.clusternativeService.sessionAffinity }}
sessionAffinity: {{ .Values.vmselect.clusternativeService.sessionAffinity }}
{{- end }}
{{- if .Values.vmselect.clusternativeService.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.vmselect.clusternativeService.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.vmselect.clusternativeService.ipFamilyPolicy }}
ipFamilyPolicy: {{ .Values.vmselect.clusternativeService.ipFamilyPolicy }}
{{- end }}
ports:
{{- if .Values.vmselect.extraArgs.clusternativeListenAddr }}
- name: cluster-tcp
port: {{ .Values.vmselect.clusternativeService.port }}
protocol: TCP
targetPort: cluster-tcp
{{- end }}
selector: {{ include "vm.selectorLabels" $ctx | nindent 4 }}
{{- end }}
{{- end }}