apiVersion: apps/v1
kind: Deployment
metadata:
  name: couchbase-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: couchbase-operator
  template:
    metadata:
      labels:
        app: couchbase-operator
    spec:
      containers:
      - name: couchbase-operator
        image: couchbase/operator:1.2.0-DP
        command:
        - couchbase-operator
        args:
        - -create-crd
        env:
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        ports:
          - name: readiness-port
            containerPort: 8080
        readinessProbe:
          httpGet:
            path: /readyz
            port: readiness-port
          initialDelaySeconds: 3
          periodSeconds: 3
          failureThreshold: 19
      serviceAccountName: couchbase-operator
