oc-k8s/opencloud/charts/loki/templates/bloom-builder/service-bloom-builder-headless.yaml

47 lines
1.4 KiB
YAML

{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true" -}}
{{- if (and $isDistributed (or (gt (int .Values.bloomBuilder.replicas) 0)) .Values.bloomBuilder.autoscaling.enabled) -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.bloomBuilderFullname" . }}-headless
namespace: {{ .Release.Namespace }}
labels:
{{- include "loki.bloomBuilderLabels" . | nindent 4 }}
{{- with .Values.bloomBuilder.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
prometheus.io/service-monitor: "false"
annotations:
{{- with .Values.loki.serviceAnnotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.bloomBuilder.serviceAnnotations }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
clusterIP: None
type: ClusterIP
publishNotReadyAddresses: true
ports:
- name: http-metrics
port: 3100
targetPort: http-metrics
protocol: TCP
- name: grpc
port: 9095
targetPort: grpc
protocol: TCP
{{- if .Values.bloomBuilder.appProtocol.grpc }}
appProtocol: {{ .Values.bloomBuilder.appProtocol.grpc }}
{{- end }}
- name: grpclb
port: 9096
targetPort: grpc
protocol: TCP
{{- if .Values.bloomBuilder.appProtocol.grpc }}
appProtocol: {{ .Values.bloomBuilder.appProtocol.grpc }}
{{- end }}
selector:
{{- include "loki.bloomBuilderSelectorLabels" . | nindent 4 }}
{{- end -}}