apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: ndbs.ndbcontroller.mysql.com
spec:
  group: ndbcontroller.mysql.com
  names:
    kind: Ndb
    plural: ndbs
  scope: Namespaced
  versions: 
    - name: v1alpha1
      # Each version can be enabled/disabled by Served flag.
      served: true
      # One and only one version must be marked as the storage version.
      storage: true
      subresources:
        status: {}
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                deploymentName:
                  type: string
                config:
                  type: object
                  properties:
                    name:
                      type: string
                ndbd:
                  type: object
                  properties:
                    name: 
                      type: string
                    nodecount: 
                      type: integer
                    noofreplicas: 
                      type: integer
                mgmd:
                  type: object
                  properties:
                    name: 
                      type: string
                    nodecount: 
                      type: integer
                mysqld:
                  type: object
                  properties:
                    name: 
                      type: string
                    nodecount: 
                      type: integer
            status:
              type: object
              properties:
                lastUpdate:
                  type: string
                processedGeneration:
                  type: integer  
                receivedConfigHash:
                  type: string