{{- if .Values.vmselect.enabled }} {{- if .Values.vmselect.clusternativeService.enabled }} apiVersion: v1 kind: Service metadata: name: {{ template "victoria-metrics.vmselect.fullname" . }}-tcp-lb namespace: {{ .Release.Namespace }} annotations: networking.gke.io/load-balancer-type: "Internal" labels: {{- include "victoria-metrics.vmselect.labels" . | 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 "victoria-metrics.vmselect.matchLabels" . | nindent 4 }} zone_extended: {{ .Values.vmselect.extraLabels.zone_extended }} {{- end }} {{- end }}