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

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: servicebindingprojections.internal.bindings.labs.vmware.com
  annotations:
    controller-gen.kubebuilder.io/version: v0.3.0
  labels:
    bindings.labs.vmware.com/release: devel
    bindings.labs.vmware.com/crd-install: "true"
    duck.knative.dev/binding: "true"
spec:
  group: internal.bindings.labs.vmware.com
  names:
    kind: ServiceBindingProjection
    listKind: ServiceBindingProjectionList
    plural: servicebindingprojections
    singular: servicebindingprojection
    categories:
    - bind
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.conditions[?(@.type=="Ready")].status
      name: Ready
      type: string
    - jsonPath: .status.conditions[?(@.type=="Ready")].reason
      name: Reason
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        properties:
          apiVersion:
            type: string
          kind:
            type: string
          metadata:
            type: object
          spec:
            properties:
              binding:
                properties:
                  name:
                    type: string
                required:
                - name
                type: object
              env:
                items:
                  properties:
                    key:
                      type: string
                    name:
                      type: string
                  required:
                  - key
                  - name
                  type: object
                type: array
              name:
                type: string
              provider:
                type: string
              type:
                type: string
              workload:
                properties:
                  apiVersion:
                    type: string
                  containers:
                    items:
                      type: string
                    type: array
                  kind:
                    type: string
                  name:
                    type: string
                  selector:
                    properties:
                      matchExpressions:
                        items:
                          properties:
                            key:
                              type: string
                            operator:
                              type: string
                            values:
                              items:
                                type: string
                              type: array
                          required:
                          - key
                          - operator
                          type: object
                        type: array
                      matchLabels:
                        additionalProperties:
                          type: string
                        type: object
                    type: object
                required:
                - apiVersion
                - kind
                type: object
            required:
            - binding
            - name
            - workload
            type: object
          status:
            properties:
              conditions:
                items:
                  properties:
                    lastTransitionTime:
                      format: date-time
                      type: string
                    message:
                      type: string
                    reason:
                      type: string
                    status:
                      type: string
                    type:
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              observedGeneration:
                format: int64
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
