{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "certmanager.webhook.fullname" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: webhook
spec:
  type: ClusterIP
  selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
    app.kubernetes.io/component: webhook
  ports:
    - name: https
      port: {{ .Values.webhook.httpsPort }}
      targetPort: {{ .Values.webhook.containerPort }}
{{- end }}
