apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis
  labels:
    app: redis
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
        - name: redis
          image: redis:6
          # args:
          #   - --dbfilename dump.rdb
          #   - --dir /data
          resources:
            requests:
              cpu: "1"
              memory: "2Gi"
            limits:
              cpu: "2"
              memory: "4Gi"
          volumeMounts:
            - mountPath: /data
              name: redis
      # nodeSelector:
      #   node_store_type: redis
      restartPolicy: Always
      volumes:
        - name: redis
          persistentVolumeClaim:
            claimName: redis-pv-claim
