apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: servicebrokers.servicecatalog.k8s.io
  labels:
    svcat: "true"
  annotations:
    "api-approved.kubernetes.io": "unapproved"
spec:
  group: servicecatalog.k8s.io
  scope: Namespaced
  names:
    plural: servicebrokers
    singular: servicebroker
    kind: ServiceBroker
    # categories is a list of grouped resources the custom resource belongs to.
    categories:
    - all
    - svcat
  versions:
  - name: v1beta1
    additionalPrinterColumns:
    - name: URL
      type: string
      jsonPath: .spec.url
    - name: Status
      type: string
      jsonPath: .status.lastConditionState
    - name: Age
      type: date
      jsonPath: .metadata.creationTimestamp
    schema:
      openAPIV3Schema:
        description: ServiceBroker represents an entity that provides ServiceClasses for use in the service catalog.
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Spec defines the behavior of the broker.
            properties:
              authInfo:
                description: AuthInfo contains the data that the service catalog should use to authenticate with the ServiceBroker.
                properties:
                  basic:
                    description: BasicAuthConfig provides configuration for basic authentication.
                    properties:
                      secretRef:
                        description: "SecretRef is a reference to a Secret containing information the catalog should use to authenticate to this ServiceBroker. \n Required at least one of the fields: - Secret.Data[\"username\"] - username used for authentication - Secret.Data[\"password\"] - password or token needed for authentication"
                        properties:
                          name:
                            description: Name of the referent.
                            type: string
                        type: object
                    type: object
                  bearer:
                    description: BearerTokenAuthConfig provides configuration to send an opaque value as a bearer token. The value is referenced from the 'token' field of the given secret.  This value should only contain the token value and not the `Bearer` scheme.
                    properties:
                      secretRef:
                        description: "SecretRef is a reference to a Secret containing information the catalog should use to authenticate to this ServiceBroker. \n Required field: - Secret.Data[\"token\"] - bearer token for authentication"
                        properties:
                          name:
                            description: Name of the referent.
                            type: string
                        type: object
                    type: object
                type: object
              caBundle:
                description: CABundle is a PEM encoded CA bundle which will be used to validate a Broker's serving certificate.
                format: byte
                type: string
              catalogRestrictions:
                description: CatalogRestrictions is a set of restrictions on which of a broker's services and plans have resources created for them.
                properties:
                  serviceClass:
                    description: ServiceClass represents a selector for plans, used to filter catalog re-lists.
                    items:
                      type: string
                    type: array
                    x-kubernetes-list-type: set
                  servicePlan:
                    description: ServicePlan represents a selector for classes, used to filter catalog re-lists.
                    items:
                      type: string
                    type: array
                    x-kubernetes-list-type: set
                type: object
              insecureSkipTLSVerify:
                description: InsecureSkipTLSVerify disables TLS certificate verification when communicating with this Broker. This is strongly discouraged.  You should use the CABundle instead.
                type: boolean
              relistBehavior:
                description: RelistBehavior specifies the type of relist behavior the catalog should exhibit when relisting ServiceClasses available from a broker.
                type: string
              relistDuration:
                description: RelistDuration is the frequency by which a controller will relist the broker when the RelistBehavior is set to ServiceBrokerRelistBehaviorDuration. Users are cautioned against configuring low values for the RelistDuration, as this can easily overload the controller manager in an environment with many brokers. The actual interval is intrinsically governed by the configured resync interval of the controller, which acts as a minimum bound. For example, with a resync interval of 5m and a RelistDuration of 2m, relists will occur at the resync interval of 5m.
                type: string
              relistRequests:
                description: RelistRequests is a strictly increasing, non-negative integer counter that can be manually incremented by a user to manually trigger a relist.
                format: int64
                type: integer
              url:
                description: URL is the address used to communicate with the ServiceBroker.
                type: string
            required:
            - url
            type: object
          status:
            description: Status represents the current status of a broker.
            properties:
              conditions:
                items:
                  description: ServiceBrokerCondition contains condition information for a Broker.
                  properties:
                    lastTransitionTime:
                      description: LastTransitionTime is the timestamp corresponding to the last status change of this condition.
                      format: date-time
                      type: string
                    message:
                      description: Message is a human readable description of the details of the last transition, complementing reason.
                      type: string
                    reason:
                      description: Reason is a brief machine readable explanation for the condition's last transition.
                      type: string
                    status:
                      description: Status of the condition, one of ('True', 'False', 'Unknown').
                      type: string
                    type:
                      description: Type of the condition, currently ('Ready').
                      type: string
                  required:
                  - lastTransitionTime
                  - message
                  - reason
                  - status
                  - type
                  type: object
                type: array
              lastCatalogRetrievalTime:
                description: LastCatalogRetrievalTime is the time the Catalog was last fetched from the Service Broker
                format: date-time
                type: string
              lastConditionState:
                description: LastConditionState aggregates state from the Conditions array It is used for printing in a kubectl output via additionalPrinterColumns
                type: string
              operationStartTime:
                description: OperationStartTime is the time at which the current operation began.
                format: date-time
                type: string
              reconciledGeneration:
                description: ReconciledGeneration is the 'Generation' of the ClusterServiceBrokerSpec that was last processed by the controller. The reconciled generation is updated even if the controller failed to process the spec.
                format: int64
                type: integer
            required:
            - conditions
            - lastConditionState
            - reconciledGeneration
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
