apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: objectbucketclaims.objectbucket.io
spec:
  version: v1alpha1
  versions:
    - name: v1alpha1
      served: true
      storage: true
  group: objectbucket.io
  names:
    kind: ObjectBucketClaim
    listKind: ObjectBucketClaimList
    plural: objectbucketclaims
    singular: objectbucketclaim
    shortNames:
      - obc
      - obcs
  scope: Namespaced
  subresources:
    status: {}
  additionalPrinterColumns:
  - JSONPath: .spec.storageClassName
    description: StorageClass
    name: Storage-Class
    type: string
  - JSONPath: .status.phase
    description: Phase
    name: Phase
    type: string
  - JSONPath: .metadata.creationTimestamp
    name: Age
    type: date
  validation:
    openAPIV3Schema:
      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/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/api-conventions.md#types-kinds'
          type: string
        metadata:
          description: Standard object metadata.
          type: object
        spec:
          description: Specification of the desired behavior of the claim.
          properties:
            storageClassName:
              description: StorageClass names the StorageClass object representing the 
                desired provisioner and parameters
              type: string
            bucketName:
              description: BucketName (not recommended) the name of the bucket. Caution!
                In-store bucket names may collide across namespaces.  If you define
                the name yourself, try to make it as unique as possible.
              type: string
            generateBucketName:
              description: GenerateBucketName (recommended) a prefix for a bucket name to be
                followed by a hyphen and 5 random characters. Protects against
                in-store name collisions.
              type: string
            additionalConfig:
              description: AdditionalConfig gives providers a location to set
                proprietary config values (tenant, namespace, etc)
              additionalProperties:
                type: string
              type: object
          required:
            - storageClassName
          type: object
        status:
          description: Most recently observed status of the claim.
          properties:
            phase:
              description: ObjectBucketClaimStatusPhase is set by the controller to save the state of the provisioning process
              enum:
                - "pending"
                - "bound"
                - "released"
                - "failed"
              type: string
          type: object
