---
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: couchbasereplications.couchbase.com
spec:
  group: couchbase.com
  names:
    kind: CouchbaseReplication
    listKind: CouchbaseReplicationList
    plural: couchbasereplications
    singular: couchbasereplication
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.bucket
      name: bucket
      type: string
    - jsonPath: .spec.remoteBucket
      name: remote bucket
      type: string
    - jsonPath: .spec.paused
      name: paused
      type: boolean
    - jsonPath: .metadata.creationTimestamp
      name: age
      type: date
    name: v2
    schema:
      openAPIV3Schema:
        description: The CouchbaseReplication resource represents a Couchbase-to-Couchbase,
          XDCR replication stream from a source bucket to a destination bucket.  This
          provides off-site backup, migration, and disaster recovery.
        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
          explicitMapping:
            description: The explicit mappings to use for replication which are optional.
              For Scopes and Collection replication support we can specify a set of
              implicit and explicit mappings to use. If none is specified then it
              is assumed to be existing bucket level replication. https://docs.couchbase.com/server/current/learn/clusters-and-availability/xdcr-with-scopes-and-collections.html#explicit-mapping
            properties:
              allowRules:
                description: 'The list of explicit replications to carry out including
                  any nested implicit replications: specifying a scope implicitly
                  replicates all collections within it. There should be no duplicates,
                  including more-specific duplicates, e.g. if you specify replication
                  of a scope then you can only deny replication of collections within
                  it.'
                items:
                  description: CouchbaseAllowReplicationMapping is to cover Scope
                    and Collection explicit replication. If a scope is defined then
                    it implicitly allows all collections unless a more specific CouchbaseDenyReplicationMapping
                    rule is present to block it. Once a rule is defined at scope level
                    it should not be redefined at collection level. https://docs.couchbase.com/server/current/learn/clusters-and-availability/xdcr-with-scopes-and-collections.html
                  properties:
                    sourceKeyspace:
                      description: 'The source keyspace: where to replicate from.
                        Source and target must match whether they have a collection
                        or not, i.e. you cannot replicate from a scope to a collection.'
                      properties:
                        collection:
                          description: The optional collection within the scope. May
                            be empty to just work at scope level.
                          maxLength: 251
                          minLength: 1
                          pattern: ^(_default|[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250})$
                          type: string
                        scope:
                          description: The scope to use.
                          maxLength: 251
                          minLength: 1
                          pattern: ^(_default|[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250})$
                          type: string
                      required:
                      - scope
                      type: object
                    targetKeyspace:
                      description: 'The target keyspace: where to replicate to. Source
                        and target must match whether they have a collection or not,
                        i.e. you cannot replicate from a scope to a collection.'
                      properties:
                        collection:
                          description: The optional collection within the scope. May
                            be empty to just work at scope level.
                          maxLength: 251
                          minLength: 1
                          pattern: ^(_default|[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250})$
                          type: string
                        scope:
                          description: The scope to use.
                          maxLength: 251
                          minLength: 1
                          pattern: ^(_default|[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250})$
                          type: string
                      required:
                      - scope
                      type: object
                  required:
                  - sourceKeyspace
                  - targetKeyspace
                  type: object
                type: array
              denyRules:
                description: 'The list of explicit replications to prevent including
                  any nested implicit denials: specifying a scope implicitly denies
                  all collections within it. There should be no duplicates, including
                  more-specific duplicates, e.g. if you specify denial of replication
                  of a scope then you can only specify replication of collections
                  within it.'
                items:
                  description: Provide rules to block implicit replication at scope
                    or collection level. You may want to implicitly map all scopes
                    or collections except a specific one (or set) so this is a better
                    way to express that by creating rules just for those to deny.
                  properties:
                    sourceKeyspace:
                      description: 'The source keyspace: where to block replication
                        from.'
                      properties:
                        collection:
                          description: The optional collection within the scope. May
                            be empty to just work at scope level.
                          maxLength: 251
                          minLength: 1
                          pattern: ^(_default|[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250})$
                          type: string
                        scope:
                          description: The scope to use.
                          maxLength: 251
                          minLength: 1
                          pattern: ^(_default|[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,250})$
                          type: string
                      required:
                      - scope
                      type: object
                  required:
                  - sourceKeyspace
                  type: object
                type: array
            type: object
          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: CouchbaseReplicationSpec allows configuration of an XDCR
              replication.
            properties:
              bucket:
                description: Bucket is the source bucket to replicate from.  This
                  refers to the Couchbase bucket name, not the resource name of the
                  bucket.  A bucket with this name must be defined on this cluster.  Legal
                  bucket names have a maximum length of 100 characters and may be
                  composed of any character from "a-z", "A-Z", "0-9" and "-_%\.".
                maxLength: 100
                pattern: ^[a-zA-Z0-9-_%\.]{1,100}$
                type: string
              compressionType:
                default: Auto
                description: CompressionType is the type of compression to apply to
                  the replication. When None, no compression will be applied to documents
                  as they are transferred between clusters.  When Auto, Couchbase
                  server will automatically compress documents as they are transferred
                  to reduce bandwidth requirements. This field must be one of "None"
                  or "Auto", defaulting to "Auto".
                enum:
                - None
                - Auto
                type: string
              filterExpression:
                description: FilterExpression allows certain documents to be filtered
                  out of the replication.
                type: string
              paused:
                description: Paused allows a replication to be stopped and restarted
                  without having to restart the replication from the beginning.
                type: boolean
              remoteBucket:
                description: RemoteBucket is the remote bucket name to synchronize
                  to.  This refers to the Couchbase bucket name, not the resource
                  name of the bucket.  Legal bucket names have a maximum length of
                  100 characters and may be composed of any character from "a-z",
                  "A-Z", "0-9" and "-_%\.".
                maxLength: 100
                pattern: ^[a-zA-Z0-9-_%\.]{1,100}$
                type: string
            required:
            - bucket
            - remoteBucket
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
