{{- if .Values.apiService.create -}}
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
  name: v1beta1.metrics.k8s.io
  labels: {{- include "metrics-server.labels" . | nindent 4 }}
spec:
  service:
    name: {{ template "metrics-server.fullname" . }}
    namespace: {{ .Release.Namespace }}
  group: metrics.k8s.io
  version: v1beta1
  insecureSkipTLSVerify: true
  groupPriorityMinimum: 100
  versionPriority: 100
{{- end -}}
