{{- if .Values.apiService.create }}
apiVersion: {{ include "common.capabilities.apiService.apiVersion" . }}
kind: APIService
metadata:
  name: v1beta1.external.metrics.k8s.io
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: wavefront-hpa-adapter
    {{- if .Values.commonLabels }}
    {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
    {{- end }}
  namespace: {{ .Release.Namespace }}
  {{- if .Values.commonAnnotations }}
  annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  {{- end }}
spec:
  service:
    name: {{ include "common.names.fullname" . }}
    namespace: {{ .Release.Namespace }}
  group: external.metrics.k8s.io
  version: v1beta1
  insecureSkipTLSVerify: true
  groupPriorityMinimum: 100
  versionPriority: 100
{{- end }}
