---
kind: ReplicationController
apiVersion: v1
metadata:
  name: redis-master
  labels:
    app: redis
    role: master
spec:
  replicas: 1
  selector:
    app: redis
    role: master
  template:
    metadata:
      labels:
        app: redis
        role: master
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9121'
    spec:
      containers:
      - name: redis-master
        image: redis:2.8.23
        ports:
        - name: redis-server
          containerPort: 6379
      - name: redis-metrics-exporter
        image: oliver006/redis_exporter
        ports:
        - name: metrics
          containerPort: 9121
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: purpose
                operator: NotIn
                values:
                - monitoring
