apiVersion: v1
kind: Service
metadata:
  name: metrics-webhook-service
  namespace: {{ .Release.Namespace | quote }}
  {{- $annotations := include "common.annotations" (dict "context" .) }}
  {{- with $annotations }}
  annotations: {{- . -}}
  {{- end }}
  labels:
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
spec:
  type: {{ .Values.webhookService.type }}
  selector:
    control-plane: metrics-operator
  {{- include "common.selectorLabels"  ( dict "context" . )  | nindent 4 }}
  ports:
	{{- .Values.webhookService.ports | toYaml | nindent 2 -}}