{{- if .Values.prometheus.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "cert-manager.fullname" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels:
    app: {{ template "cert-manager.name" . }}
    app.kubernetes.io/name: {{ template "cert-manager.name" . }}
    app.kubernetes.io/instance:  {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ template "cert-manager.chart" . }}
spec:
  type: ClusterIP
  ports:
    - protocol: TCP
      port: 9402
      targetPort: 9402
  selector:
    app.kubernetes.io/name: {{ template "cert-manager.name" . }}
    app.kubernetes.io/instance:  {{ .Release.Name }}
{{- end }}
