{{- include "common.values.setup" . -}}
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
  name: v1alpha1.{{ .Values.groupName }}
  labels:
    {{- include "common.labels" . | nindent 4 }}
  annotations:
    certmanager.k8s.io/inject-ca-from: "{{ .Release.Namespace }}/{{ include "dnsmadeeasy-webhook.servingCertificate" . }}"
spec:
  group: {{ .Values.groupName }}
  groupPriorityMinimum: 1000
  versionPriority: 15
  #TBD : avoid insecureSkipTLSVerify
  insecureSkipTLSVerify: true
  service:
    name: {{ include "common.names.fullname" . }}
    namespace: {{ .Release.Namespace }}
  version: v1alpha1
