blob: 14ba0f62f9f8a76b288c266070faa05086b68d9f [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
2{{ if $isSimpleScalable }}
3---
4apiVersion: v1
5kind: Service
6metadata:
7 name: {{ include "loki.readFullname" . }}-headless
Giovanni Tirloni59219b62024-04-09 14:50:25 -03008 namespace: {{ $.Release.Namespace }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00009 labels:
10 {{- include "loki.readSelectorLabels" . | nindent 4 }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -030011 {{- with .Values.loki.serviceLabels }}
12 {{- toYaml . | nindent 4}}
13 {{- end }}
14 {{- with .Values.read.service.labels }}
15 {{- toYaml . | nindent 4}}
16 {{- end }}
17 variant: headless
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000018 prometheus.io/service-monitor: "false"
Giovanni Tirloni59219b62024-04-09 14:50:25 -030019 annotations:
20 {{- with .Values.loki.serviceAnnotations }}
21 {{- toYaml . | nindent 4}}
22 {{- end }}
23 {{- with .Values.read.service.annotations }}
24 {{- toYaml . | nindent 4}}
25 {{- end }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000026spec:
27 type: ClusterIP
28 clusterIP: None
29 ports:
30 - name: http-metrics
Giovanni Tirloni59219b62024-04-09 14:50:25 -030031 port: {{ .Values.loki.server.http_listen_port }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000032 targetPort: http-metrics
33 protocol: TCP
34 - name: grpc
Giovanni Tirloni59219b62024-04-09 14:50:25 -030035 port: {{ .Values.loki.server.grpc_listen_port }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000036 targetPort: grpc
37 protocol: TCP
38 appProtocol: tcp
39 selector:
40 {{- include "loki.readSelectorLabels" . | nindent 4 }}
41{{- end }}