apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: users.system.codezero.io
spec:
  group: system.codezero.io
  versions:
    - name: v1
      served: true
      storage: true
      # subresources:
      #   status: {}
      additionalPrinterColumns:
      - name: Status
        type: string
        jsonPath: .status
      - name: Age
        type: date
        jsonPath: .metadata.creationTimestamp
      schema:
        openAPIV3Schema:
          type: object
          properties:
            status:
              type: string
            spec:
              x-kubernetes-preserve-unknown-fields: true
            credentials:
              type: object
              properties:
                privateKey:
                  type: string
                publicKey:
                  type: string
                certificate:
                  type: string
  scope: Cluster
  names:
    # plural name to be used in the URL: /apis/<group>/<version>/<plural>
    plural: users
    # singular name to be used as an alias on the CLI and for display
    singular: user
    # kind is normally the CamelCased singular type. Your resource manifests use this.
    kind: User
    # shortNames allow shorter string to match your resource on the CLI
    shortNames:
    - user