---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: quotas.moon.aerokube.com
spec:
  group: moon.aerokube.com
  names:
    kind: Quota
    listKind: QuotaList
    plural: quotas
    singular: quota
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        properties:
          apiVersion:
            type: string
          kind:
            type: string
          metadata:
            type: object
          spec:
            properties:
              browsers:
                type: string
                pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
              config:
                type: string
                pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
              devices:
                type: string
                pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
              namespace:
                type: string
                pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'
            required:
            - browsers
            - config
            - devices
            - namespace
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
    additionalPrinterColumns:
    - name: Namespace
      type: string
      jsonPath: .spec.namespace
    - name: Config
      type: string
      jsonPath: .spec.config
    - name: Browsers
      type: string
      jsonPath: .spec.browsers
    - name: Devices
      type: string
      jsonPath: .spec.devices
    - name: Age
      type: date
      jsonPath: .metadata.creationTimestamp
