apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: cnpjobs.cnp.ibm.com
spec:
  group: cnp.ibm.com
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                state:
                  type: string
                desired:
                  type: integer
                image:
                  type: string
                args:
                  type: array
                  items:
                    type: string
      additionalPrinterColumns:
        - name: State
          type: string
          description: The job submission status
          jsonPath: .spec.state
        - name: Desired
          type: integer
          description: Desired number of pods
          jsonPath: .spec.desired
  scope: Namespaced
  names:
    kind: Job
    singular: cnpjob
    plural: cnpjobs
    shortNames:
      - cj
      - cjs