---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-cache
  namespace: haugom
  labels:
    app: redis-cache
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis-cache
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: redis-cache
    spec:
      containers:
      - name: redis-cache
        image: redis:5
        imagePullPolicy: Always
        ports:
        - containerPort: 6379
        volumeMounts:
          - name: cache-vol
            mountPath: /data
        resources:
          requests:
            memory: "24Mi"
            cpu: "50m"
          limits:
            memory: "64Mi"
            cpu: "100m"
      volumes:
        - name: cache-vol
          emptyDir: {}
