apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: plugins.dashboard.k8s.io
spec:
  group: dashboard.k8s.io
  scope: Namespaced
  versions:
    - name: v1alpha1
      served: true
      storage: true
  names:
    kind: Plugin
    plural: plugins
    singular: plugin
  validation:
    openAPIV3Schema:
      type: object
      properties:
        spec:
          type: object
          properties:
            source:
              type: object
              properties:
                configMapRef:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                    - name
                filename:
                  type: string
              required:
                - configMapRef
                - filename
            dependencies:
              type: array
              items:
                type: string
          required:
            - source
      required:
        - spec
