rancher-partner-charts/charts/kubecost/cost-analyzer/2.0.2/templates/prometheus-server-service-h...

30 lines
967 B
YAML

{{ if .Values.global.prometheus.enabled }}
{{- if .Values.prometheus.server.enabled -}}
{{- if .Values.prometheus.server.statefulSet.enabled -}}
apiVersion: v1
kind: Service
metadata:
{{- if .Values.prometheus.server.statefulSet.headless.annotations }}
annotations:
{{ toYaml .Values.prometheus.server.statefulSet.headless.annotations | indent 4 }}
{{- end }}
labels:
{{- include "prometheus.server.labels" . | nindent 4 }}
{{- if .Values.prometheus.server.statefulSet.headless.labels }}
{{ toYaml .Values.prometheus.server.statefulSet.headless.labels | indent 4 }}
{{- end }}
name: {{ template "prometheus.server.fullname" . }}-headless
namespace: {{ .Release.Namespace }}
spec:
clusterIP: None
ports:
- name: http
port: {{ .Values.prometheus.server.statefulSet.headless.servicePort }}
protocol: TCP
targetPort: 9090
selector:
{{- include "prometheus.server.matchLabels" . | nindent 4 }}
{{- end -}}
{{- end -}}
{{ end }}