apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: redis
  labels:
    app: redis
spec:
  replicas: 1
  selector:
    app: redis
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
      - image: image-registry.openshift-image-registry.svc:5000/mote/redis
        name: redis
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - mountPath: /var/lib/redis/data
          name: redis-data
        resources:
          limits:
            cpu: 100m
            memory: 1Gi
          requests:
            cpu: '0'
            memory: 200Mi
        env:
        - name: REDIS_PASSWORD
          valueFrom:
            secretKeyRef:
              name: redis-password
              key: password
      volumes:
      - emptyDir: {}
        name: redis-data
      restartPolicy: Always
  triggers:
  - type: ImageChange
    imageChangeParams:
      automatic: true
      from:
        kind: ImageStreamTag
        name: redis:latest
      containerNames:
      - "redis"
