apiVersion: v1
kind: Secret
metadata:
  name: cb-test-auth
type: Opaque
data:
  username: QWRtaW5pc3RyYXRvcg== # Administrator
  password: cGFzc3dvcmQ=         # password
---
apiVersion: couchbase.com/v2
kind: CouchbaseCluster
metadata:
  name: cb-test
spec:
  paused: false
  image: couchbase/server:7.0.2
  networking:
    networkPlatform: Istio
    exposeAdminConsole: false
    adminConsoleServices:
    - data
    adminConsoleServiceType: NodePort
    exposedFeatures:
    - xdcr
    exposedFeatureServiceType: NodePort
    exposedFeatureTrafficPolicy: Local
  security:
    adminSecret: cb-test-auth
    rbac:
      managed: true
      selector:
        matchLabels:
          cluster: cb-test
  buckets:
    managed: false
    selector:
      matchLabels:
        cluster: cb-bucket
  servers:
  - size: 1
    name: data_services
    services:
    - data
    - index
    - query
    volumeMounts:
      default: couchbase
  volumeClaimTemplates: 
    - metadata:
        name: couchbase 
      spec:
        storageClassName: standard 
        resources: 
          requests:
           storage: 5Gi
  cluster:
    clusterName: cb-test
    dataServiceMemoryQuota: 512Mi
    indexServiceMemoryQuota: 512Mi
    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-example
      uuid: 4038a01902d25b862d82f4652bb3daf1
      hostname: cb-example-0000.cb-example.default.svc
      authenticationSecret: cb-example-auth
      replications:
        selector:
          matchLabels:
            cluster: cb-test
  backup:
    managed: true
    image: couchbase/operator-backup:1.1.1
    serviceAccountName: couchbase-backup
    resources:
      requests:
        cpu: 2000m
        memory: 300Mi
    selector:
      matchLabels:
        cluster: cb-test
