blob: f4000fda5720e5e9b3b01c60f6c1ea03ccb7e380 [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" . }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -03008 namespace: {{ $.Release.Namespace }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00009 labels:
10 {{- include "loki.readLabels" . | 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 annotations:
18 {{- with .Values.loki.serviceAnnotations }}
19 {{- toYaml . | nindent 4}}
20 {{- end }}
21 {{- with .Values.read.service.annotations }}
22 {{- toYaml . | nindent 4}}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000023 {{- end }}
24spec:
25 type: ClusterIP
26 ports:
27 - name: http-metrics
Giovanni Tirloni59219b62024-04-09 14:50:25 -030028 port: {{ .Values.loki.server.http_listen_port }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000029 targetPort: http-metrics
30 protocol: TCP
31 - name: grpc
Giovanni Tirloni59219b62024-04-09 14:50:25 -030032 port: {{ .Values.loki.server.grpc_listen_port }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000033 targetPort: grpc
34 protocol: TCP
35 selector:
36 {{- include "loki.readSelectorLabels" . | nindent 4 }}
37{{- end }}