apiVersion: v1
kind: ReplicationController
metadata:
  name: sb-instanceid-redis-master
spec:
  replicas: 1
  selector:
    sb-instanceid-redis-master: master
  template:
    metadata:
      labels:
        sb-instanceid-redis-master: master
        sb-instanceid-redis-sentinel-svc: sentinel
        servicebroker: sb-instanceid-redis
      name: sb-instanceid-redisbt
      #name: sb-instanceid-redisboot
    spec:
      containers:
        - name: master
          image: http://redis-image-place-holder/redis-openshift-orchestration
          imagePullPolicy: IfNotPresent
          env:
            - name: CLUSTER_NAME
              value: cluster-sb-instanceid-redis
            - name: MASTER
              value: "true"
            - name: REDIS_PASSWORD
              value: pass*****
          ports:
            - containerPort: 6379
          resources:
            limits:
              cpu: "0.1"
          volumeMounts:
            - mountPath: /redis-master-data
              name: data
        - name: sentinel
          image: http://redis-image-place-holder/redis-openshift-orchestration
          imagePullPolicy: IfNotPresent
          env:
            - name: CLUSTER_NAME
              value: cluster-sb-instanceid-redis
            - name: SENTINEL
              value: "true"
            - name: SENTINEL_HOST
              value: sb-instanceid-redis
            - name: SENTINEL_PORT
              value: "26379"
            - name: REDIS_PASSWORD
              value: pass*****
          ports:
            - containerPort: 26379
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: "pvcname*****master"
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
