apiVersion: couchbase.database.couchbase.com/v1
kind: CouchbaseCluster
metadata:
  name: cb-example
  namespace: default
spec:
  antiAffinity: false
  baseImage: couchbase/server
  version: 5.5.0-beta
  authSecret: basic-test-secret
  exposeAdminConsole: false
  adminConsoleServices:
      - data
      - index
      - query
      - search
  paused: false
  serverGroups:
    - us-east-1a
    - us-east-1b
    - us-east-1c
  cluster:
    dataServiceMemoryQuota: 600
    indexServiceMemoryQuota: 256
    searchServiceMemoryQuota: 256
    eventingServiceMemoryQuota: 256
    analyticsServiceMemoryQuota: 1024
    indexStorageSetting: memory_optimized
    autoFailoverOnDataDiskIssuesTimePeriod: 10
    autoFailoverMaxCount: 1
    autoFailoverTimeout: 10
  buckets:
    - name: default1
      type: couchbase
      memoryQuota: 100
      replicas: 0
      ioPriority: high
      evictionPolicy: fullEviction
      conflictResolution: seqno
      enableFlush: true
      enableIndexReplica: false
    - name: default2
      type: couchbase
      memoryQuota: 100
      replicas: 0
      ioPriority: high
      evictionPolicy: valueOnly
      conflictResolution: seqno
      enableFlush: true
      enableIndexReplica: false
    - name: default3
      type: memcached
      memoryQuota: 100
      enableFlush: true
    - name: default4
      type: ephemeral
      memoryQuota: 100
      replicas: 3
      ioPriority: low
      evictionPolicy: noEviction
      conflictResolution: lww
      enableFlush: true
    - name: default5
      type: ephemeral
      memoryQuota: 100
      replicas: 3
      ioPriority: low
      evictionPolicy: nruEviction
      conflictResolution: lww
      enableFlush: true
  servers:
    - size: 1
      name: all_services
      services:
        - data
        - index
        - query
        - search
    - size: 1
      name: data_only
      services:
        - data
      pod:
        volumeMounts:
          default: couchbase
          data: couchbase
          index: couchbase
          analytics:
            - couchbase
            - couchbase
    - size: 1
      name: server_groups
      services:
        - data
        - index
        - query
      serverGroups:
        - us-east-1a
        - us-east-1b
  volumeClaimTemplates:
    - metadata:
        name: couchbase
      spec:
        storageClassName: standard
        resources:
          requests:
            storage: 2Gi
