{{- if not (.Capabilities.APIVersions.Has "kubeapps.com/v1alpha1") -}}
# The condition above will be true if another instance of Kubeapps is
# already installed
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: apprepositories.kubeapps.com
  annotations:
    "helm.sh/hook": crd-install
  labels:{{ include "kubeapps.extraAppLabels" $ | nindent 4 }}
    app: {{ template "kubeapps.apprepository.fullname" $ }}
spec:
  group: kubeapps.com
  scope: Namespaced
  names:
    kind: AppRepository
    plural: apprepositories
    shortNames:
      - apprepos
  version: v1alpha1
{{- end -}}
