apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: builds.kpack.io
spec:
  group: kpack.io
  versions:
  - name: v1alpha1
    served: true
    storage: false
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-preserve-unknown-fields: true
    subresources:
      status: { }
    additionalPrinterColumns:
    - name: Image
      type: string
      jsonPath: ".status.latestImage"
    - name: Succeeded
      type: string
      jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].status"
  - name: v1alpha2
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-preserve-unknown-fields: true
    subresources:
      status: { }
    additionalPrinterColumns:
    - name: Image
      type: string
      jsonPath: ".status.latestImage"
    - name: Succeeded
      type: string
      jsonPath: ".status.conditions[?(@.type==\"Succeeded\")].status"
  conversion:
    strategy: Webhook
    webhook:
      clientConfig:
        service:
          name: kpack-webhook
          namespace: kpack
          path: /convert
          port: 443
      conversionReviewVersions: [ "v1" ]
  names:
    kind: Build
    listKind: BuildList
    singular: build
    plural: builds
    shortNames:
    - cnbbuild
    - cnbbuilds
    - bld
    - blds
    categories:
    - kpack
  scope: Namespaced
