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