rancher-partner-charts/charts/f5/nginx-ingress/templates/controller-prometheus-servi...

22 lines
658 B
YAML

{{- if and .Values.prometheus.create .Values.prometheus.service.create}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "nginx-ingress.prometheus.serviceName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.prometheus.service.labels -}}
{{- toYaml .Values.prometheus.service.labels | nindent 4 }}
{{- end }}
spec:
clusterIP: None
ports:
- name: prometheus
protocol: TCP
port: {{ .Values.prometheus.port }}
targetPort: {{ .Values.prometheus.port }}
selector:
{{- include "nginx-ingress.selectorLabels" . | nindent 4 }}
{{- end }}