apiVersion: apps/v1
kind: Deployment
metadata:
  name: cockroachdb
spec:
  replicas: 1
  selector:
    matchLabels:
      name: cockroachdb
  template:
    metadata:
      labels:
        name: cockroachdb
    spec:
      serviceAccountName: cockroachdb
      containers:
        - name: cockroachdb
          # Replace this with the built image name
          image: REPLACE_IMAGE
          imagePullPolicy: Always
          env:
            - name: RELATED_IMAGE_INIT
              value: "registry.connect.redhat.com/cockroachdb/request-cert:latest" 
            - name: RELATED_IMAGE_CORE
              value: "registry.connect.redhat.com/cockroachdb/cockroach:v19.2.4-ubi"
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "cockroachdb"
