apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
  annotations:
    # ensure this resource is created after and deleted before the deployment to minimise errors during namespace transition
    argocd.argoproj.io/sync-wave: "3"
  name: v1beta1.custom.metrics.k8s.io
spec:
  service:
    name: elasticsearch-metrics-apiserver
    namespace: {{ .Release.Namespace }}
  group: custom.metrics.k8s.io
  version: v1beta1
  insecureSkipTLSVerify: true
  groupPriorityMinimum: 100
  versionPriority: 100
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
  annotations:
    # ensure this resource is created after and deleted before the deployment to minimise errors during namespace transition
    argocd.argoproj.io/sync-wave: "3"
  name: v1beta2.custom.metrics.k8s.io
spec:
  service:
    name: elasticsearch-metrics-apiserver
    namespace: {{ .Release.Namespace }}
  group: custom.metrics.k8s.io
  version: v1beta2
  insecureSkipTLSVerify: true
  groupPriorityMinimum: 100
  versionPriority: 200