apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-cluster-operator
  namespace: public-service
spec:
  replicas: 1
  selector:
    matchLabels:
      name: redis-cluster-operator
  template:
    metadata:
      labels:
        name: redis-cluster-operator
    spec:
      serviceAccountName: redis-cluster-operator
      containers:
        - name: redis-cluster-operator
          # Replace this with the built image name
          image: fishu/redis-cluster-operator:latest
          command:
            - redis-cluster-operator
#          args:
#            - --rename-command-path=/etc/redisconf
#            - --rename-command-file=redis.conf
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "redis-cluster-operator"
#          volumeMounts:
#            - name: redisconf
#              mountPath: /etc/redisconf
#      volumes:
#        - name: redisconf
#          configMap:
#            name: redis-admin
#---
#apiVersion: v1
#kind: ConfigMap
#metadata:
#  name: redis-admin
#data:
#  redis.conf: |-
#    rename-command CONFIG lni07z1p
#    rename-command BGSAVE pp14qluk
#    rename-command DEBUG 8a4insyv
#    rename-command SAVE 6on30p6z
#    rename-command SHUTDOWN dvui0opr
#    rename-command SLAVEOF xwxvcw36
#    rename-command BGREWRITEAOF www07fko
