# Copyright 2020 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: vspherebindings.sources.tanzu.vmware.com
  labels:
    sources.tanzu.vmware.com/release: devel
    knative.dev/crd-install: "true"
spec:
  group: sources.tanzu.vmware.com
  names:
    kind: VSphereBinding
    plural: vspherebindings
    singular: vspherebinding
    categories:
    - all
    - knative
    - vsphere
    shortNames:
    - vsb
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-preserve-unknown-fields: true
        # TODO: use controller-gen from controller-tools to fill this in?
    subresources:
      status: {}
    additionalPrinterColumns:
    - name: Ready
      type: string
      jsonPath: ".status.conditions[?(@.type=='Ready')].status"
    - name: Reason
      type: string
      jsonPath: ".status.conditions[?(@.type=='Ready')].reason"
