{{- if and .Values.vmselect.enabled .Values.vmselect.statefulSet.enabled -}} apiVersion: v1 kind: Service metadata: {{- if .Values.vmselect.statefulSet.service.annotations }} annotations: {{ toYaml .Values.vmselect.statefulSet.service.annotations | indent 4}} {{- end }} labels: {{- include "victoria-metrics.vmselect.labels" . | nindent 4 }} {{- if .Values.vmselect.statefulSet.service.labels }} {{ toYaml .Values.vmselect.statefulSet.service.labels | indent 4}} {{- end }} name: {{ template "victoria-metrics.vmselect.fullname" . }} spec: clusterIP: None ports: - name: http port: {{ .Values.vmselect.statefulSet.service.servicePort }} protocol: TCP targetPort: http selector: {{- include "victoria-metrics.vmselect.matchLabels" . | nindent 4 }} {{- end -}}