apiVersion: v1
kind: Secret
metadata:
  name: cb-example-auth
type: Opaque
data:
  username: QWRtaW5pc3RyYXRvcg== # Administrator
  password: cGFzc3dvcmQ=         # password
---
apiVersion: couchbase.com/v2
kind: CouchbaseCluster
metadata:
  name: cb-example
spec:
  paused: false
  image: couchbase/server:6.5.0
  networking:
    exposeAdminConsole: false
    adminConsoleServices:
    - data
    adminConsoleServiceType: NodePort
    exposedFeatures:
    - xdcr
    exposedFeatureServiceType: NodePort
    exposedFeatureTrafficPolicy: Local
  security:
    adminSecret: cb-example-auth
    rbac:
      managed: true
      selector:
        matchLabels:
          cluster: cb-example
  buckets:
    managed: true
    selector:
      matchLabels:
        cluster: cb-bucket
  servers:
  - size: 3
    name: data_services
    services:
    - data
    - query
    - index
    volumeMounts:
      default: couchbase
  volumeClaimTemplates: 
    - metadata:
        name: couchbase 
      spec:
        storageClassName: standard 
        resources: 
          requests:
           storage: 5Gi
  cluster:
    clusterName: cb-example
    dataServiceMemoryQuota: 512Mi
    indexServiceMemoryQuota: 300Mi
    searchServiceMemoryQuota: 256Mi
    eventingServiceMemoryQuota: 256Mi
    analyticsServiceMemoryQuota: 1Gi
    autoFailoverTimeout: 5s
    autoFailoverMaxCount: 3
    autoFailoverOnDataDiskIssues: true
    indexStorageSetting: memory_optimized
    autoFailoverOnDataDiskIssuesTimePeriod: 120s
    autoFailoverServerGroup: false
  xdcr:
    managed: false
    remoteClusters:
    - name: cb-test
      uuid: 4038a01902d25b862d82f4652bb3daf1
      hostname: cb-test-0000.cb-test.default.svc
      authenticationSecret: cb-test-auth
      replications:
        selector:
          matchLabels:
            cluster: cb-example
  backup:
    managed: true
    image: couchbase/operator-backup:6.5.1-111
    serviceAccountName: couchbase-backup
    resources:
      requests:
        cpu: 2000m
        memory: 512Mi
    selector:
      matchLabels:
        cluster: cb-backup
