---
# Source: robot-shop/templates/redis.yaml
apiVersion: apps/v1

kind: StatefulSet


metadata:
  labels:
    service: redis
  name: redis
spec:
  replicas: 1
  selector:
    matchLabels:
      service: redis
  
  serviceName: redis
  
  template:
    metadata:
      labels:
        service: redis
    spec:
      
      containers:
      - name: redis
        image: redis:4.0.6
        imagePullPolicy: Always
        ports:
        - containerPort: 6379
        
        volumeMounts:
          - name: data
            mountPath: /mnt/redis
        
        resources:
          limits:
            cpu: 200m
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 50Mi
      restartPolicy: Always
  
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes: [ "ReadWriteOnce" ]
        
        storageClassName: standard
        volumeMode: Filesystem
        
        resources:
          requests:
            storage: 1Gi
