Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 1 | {{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}} |
| 2 | {{- if $isDistributed -}} |
| 3 | apiVersion: v1 |
| 4 | kind: Service |
| 5 | metadata: |
| 6 | name: {{ include "loki.querierFullname" . }} |
| 7 | namespace: {{ .Release.Namespace }} |
| 8 | labels: |
| 9 | {{- include "loki.querierLabels" . | nindent 4 }} |
| 10 | {{- with .Values.querier.serviceLabels }} |
| 11 | {{- toYaml . | nindent 4 }} |
| 12 | {{- end }} |
| 13 | {{- with .Values.loki.serviceAnnotations }} |
| 14 | annotations: |
| 15 | {{- toYaml . | nindent 4 }} |
| 16 | {{- end }} |
| 17 | spec: |
| 18 | type: ClusterIP |
| 19 | ports: |
| 20 | - name: http-metrics |
| 21 | port: 3100 |
| 22 | targetPort: http-metrics |
| 23 | protocol: TCP |
| 24 | - name: grpc |
| 25 | port: 9095 |
| 26 | targetPort: grpc |
| 27 | protocol: TCP |
| 28 | {{- if .Values.querier.appProtocol.grpc }} |
| 29 | appProtocol: {{ .Values.querier.appProtocol.grpc }} |
| 30 | {{- end }} |
| 31 | selector: |
| 32 | {{- include "loki.querierSelectorLabels" . | nindent 4 }} |
| 33 | {{- end -}} |