apiVersion: apps/v1
kind: Deployment
metadata:
  name: xzbc-redis-cluster-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: xzbc-redis-cluster
  template:
    metadata:
      labels:
        name: xzbc-redis-cluster
    spec:
      serviceAccountName: xzbc-redis-cluster
      containers:
        - name: xzbc-redis-cluster
          # Replace this with the built image name
          image: redis-operator-xzbc:1.0
          command:
          - xzbc-redis-cluster
          imagePullPolicy: IfNotPresent
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "xzbc-redis-cluster"
