47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
|
|
{{- if $isDistributed -}}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "loki.queryFrontendFullname" . }}
|
|
namespace: {{ include "loki.namespace" . }}
|
|
labels:
|
|
{{- include "loki.queryFrontendLabels" . | nindent 4 }}
|
|
{{- with .Values.queryFrontend.serviceLabels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
annotations:
|
|
{{- with .Values.loki.serviceAnnotations }}
|
|
{{- toYaml . | nindent 4}}
|
|
{{- end }}
|
|
{{- with .Values.queryFrontend.serviceAnnotations }}
|
|
{{- toYaml . | nindent 4}}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.queryFrontend.serviceType }}
|
|
publishNotReadyAddresses: true
|
|
ports:
|
|
- name: http-metrics
|
|
port: 3100
|
|
targetPort: http-metrics
|
|
protocol: TCP
|
|
- name: grpc
|
|
port: 9095
|
|
targetPort: grpc
|
|
protocol: TCP
|
|
{{- if .Values.queryFrontend.appProtocol.grpc }}
|
|
appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }}
|
|
{{- end }}
|
|
{{- if .Values.queryFrontend.loadBalancer.enabled }}
|
|
- name: grpclb
|
|
port: 9096
|
|
targetPort: grpc
|
|
protocol: TCP
|
|
{{- if .Values.queryFrontend.appProtocol.grpc }}
|
|
appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }}
|
|
{{- end }}
|
|
{{- end }}
|
|
selector:
|
|
{{- include "loki.queryFrontendSelectorLabels" . | nindent 4 }}
|
|
{{- end -}}
|