apiVersion: v1
kind: Service
metadata:
  name: {{ template "webhook.fullname" . }}
  namespace: {{ .Release.Namespace | quote }}
  labels:
    app: {{ include "webhook.name" . }}
    app.kubernetes.io/name: {{ include "webhook.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/component: "webhook"
    helm.sh/chart: {{ include "webhook.chart" . }}
spec:
  type: ClusterIP
  ports:
  - name: https
    port: 443
    targetPort: {{ .Values.webhook.securePort }}
  selector:
    app.kubernetes.io/name: {{ include "webhook.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/component: "webhook"
