blob: 360ec645efdbf728728aa1c783507d37e5a6f510 [file] [log] [blame]
giob6e9f2f2026-07-23 16:53:10 +04001{{- if and .Values.prometheus.enabled (not .Values.prometheus.podmonitor.enabled) }}
2apiVersion: v1
3kind: Service
4metadata:
5 name: {{ template "cert-manager.fullname" . }}
6 namespace: {{ include "cert-manager.namespace" . }}
7{{- with .Values.serviceAnnotations }}
8 annotations:
9{{ toYaml . | indent 4 }}
10{{- end }}
11 labels:
12 app: {{ include "cert-manager.name" . }}
13 app.kubernetes.io/name: {{ include "cert-manager.name" . }}
14 app.kubernetes.io/instance: {{ .Release.Name }}
15 app.kubernetes.io/component: "controller"
16 {{- include "labels" . | nindent 4 }}
17 {{- with .Values.serviceLabels }}
18 {{- toYaml . | nindent 4 }}
19 {{- end }}
20spec:
21 type: ClusterIP
22 {{- if .Values.serviceIPFamilyPolicy }}
23 ipFamilyPolicy: {{ .Values.serviceIPFamilyPolicy }}
24 {{- end }}
25 {{- if .Values.serviceIPFamilies }}
26 ipFamilies: {{ .Values.serviceIPFamilies | toYaml | nindent 2 }}
27 {{- end }}
28 ports:
29 - protocol: TCP
30 port: 9402
31 name: tcp-prometheus-servicemonitor
32 targetPort: {{ .Values.prometheus.servicemonitor.targetPort }}
33 selector:
34 app.kubernetes.io/name: {{ include "cert-manager.name" . }}
35 app.kubernetes.io/instance: {{ .Release.Name }}
36 app.kubernetes.io/component: "controller"
37{{- end }}