oc-k8s/opencloud/charts/loki/templates/single-binary/service-headless.yaml

36 lines
998 B
YAML
Raw Permalink Normal View History

2024-12-16 14:55:43 +01:00
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- if $isSingleBinary }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "loki.name" . }}-headless
namespace: {{ $.Release.Namespace }}
labels:
{{- include "loki.labels" . | nindent 4 }}
{{- with .Values.loki.serviceLabels }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.singleBinary.service.labels }}
{{- toYaml . | nindent 4}}
{{- end }}
variant: headless
prometheus.io/service-monitor: "false"
annotations:
{{- with .Values.loki.serviceAnnotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- with .Values.singleBinary.service.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
clusterIP: None
ports:
- name: http-metrics
port: {{ .Values.loki.server.http_listen_port }}
targetPort: http-metrics
protocol: TCP
selector:
{{- include "loki.selectorLabels" . | nindent 4 }}
{{- end }}