kubezero/charts/kubezero-metrics/charts/kube-prometheus-stack/templates/prometheus/serviceThanosSIdecar.yaml

28 lines
1.0 KiB
YAML
Raw Normal View History

2021-02-26 21:25:43 +00:00
{{- if and .Values.prometheus.enabled .Values.prometheus.thanosService.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-discovery
namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.prometheus.thanosService.labels }}
{{ toYaml .Values.prometheus.thanosService.labels | indent 4 }}
{{- end }}
{{- if .Values.prometheus.thanosService.annotations }}
annotations:
{{ toYaml .Values.prometheus.thanosService.annotations | indent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: {{ .Values.prometheus.thanosService.portName }}
port: {{ .Values.prometheus.thanosService.port }}
targetPort: {{ .Values.prometheus.thanosService.targetPort }}
selector:
app: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
{{- end }}