---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    config.couchbase.com/version: 2.3.0
    controller-gen.kubebuilder.io/version: v0.8.0
  name: couchbasecollectiongroups.couchbase.com
spec:
  group: couchbase.com
  names:
    kind: CouchbaseCollectionGroup
    listKind: CouchbaseCollectionGroupList
    plural: couchbasecollectiongroups
    singular: couchbasecollectiongroup
  scope: Namespaced
  versions:
  - name: v2
    schema:
      openAPIV3Schema:
        description: CouchbaseCollectionGroup represent the finest grained size of
          data storage in Couchbase. Collections contain all documents and indexes
          in the system.  Collections also form the finest grain basis for role-based
          access control (RBAC) and cross-datacenter replication (XDCR).  In order
          to be considered by the Operator, every collection group must be referenced
          by a `CouchbaseScope` or `CouchbaseScopeGroup` resource.  Unlike the CouchbaseCollection
          resource, a collection group represents multiple collections, with common
          configuration parameters, to be expressed as a single resource, minimizing
          required configuration and Kubernetes API traffic.  It also forms the basis
          of Couchbase RBAC security boundaries.
        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 desired state of the resource.
            properties:
              maxTTL:
                description: 'MaxTTL defines how long a document is permitted to exist
                  for, without modification, until it is automatically deleted.  This
                  field takes precedence over any TTL defined at the bucket level.  This
                  is a default, and maximum time-to-live and may be set to a lower
                  value by the client.  If the client specifies a higher value, then
                  it is truncated to the maximum durability.  Documents are removed
                  by Couchbase, after they have expired, when either accessed, the
                  expiry pager is run, or the bucket is compacted.  When set to 0,
                  then documents are not expired by default.  This field must be a
                  duration in the range 0-2147483648s, defaulting to 0.  More info:
                  https://golang.org/pkg/time/#ParseDuration'
                type: string
              names:
                description: Names specifies the names of the collections.  Unlike
                  CouchbaseCollection, which specifies a single collection, a collection
                  group specifies multiple, and the collection group must specify
                  at least one collection name. Any collection names specified must
                  be unique. Collection names must be 1-251 characters in length,
                  contain only [a-zA-Z0-9_-%] and not start with either _ or %.
                items:
                  description: ScopeOrCollectionName is a generic type to capture
                    a valid scope or collection name.  These must consist of 1-251
                    characters, include only A-Z, a-z, 0-9, -, _ or %, and must not
                    start with _ (which is an internal marker) or % (which is probably
                    an escape character in language X).
                  maxLength: 251
                  minLength: 1
                  pattern: ^[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250}$
                  type: string
                type: array
                x-kubernetes-list-type: set
            required:
            - names
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
