apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: customers.containermom.josie.cloud
spec:
  group: containermom.josie.cloud
  names:
    kind: Customer
    listKind: CustomerList
    plural: customers
    singular: customer
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              email:
                type: string
              billingPlan:
                type: string
              resourceQuota:
                type: object
                properties:
                  cpu:
                    type: string
                  memory:
                    type: string
                  maxPods:
                    type: integer
                  maxDeployments:
                    type: integer
                  maxClusters:
                    type: integer
          status:
            type: object
            properties:
              billingStatus:
                type: string
              usedResources:
                type: object
                properties:
                  cpu:
                    type: string
                  memory:
                    type: string
              activeDeployments:
                type: array
                items:
                  type: string
              subscriptionItems:
                type: object
                additionalProperties:
                  type: string 