apiVersion: apps/v1
kind: Deployment
metadata:
  name: scrumlr-cache
spec:
  replicas: 1
  selector:
    matchLabels:
      app: scrumlr-cache
  template:
    metadata:
      labels: 
        app: scrumlr-cache
    spec:
      containers:
        - name: scrumlr-cache
          image: redis:6.2.4-alpine
          imagePullPolicy: IfNotPresent
          ports:
            - name: redis
              containerPort: 6379
          livenessProbe:
            tcpSocket:
              port: redis
            initialDelaySeconds: 10
            periodSeconds: 20
          readinessProbe:
            exec:
              command:
                - redis-cli
                - ping
            initialDelaySeconds: 5
            periodSeconds: 10
      restartPolicy: Always