---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: tus-php-redis
  labels:
    app: tus-php
spec:
  replicas: 1
  serviceName: tus-php-redis
  selector:
    matchLabels:
      app: tus-php-redis

  template:
    metadata:
      name: tus-php-redis
      labels:
        app: tus-php-redis

    spec:
      volumes:
        - name: redis
          persistentVolumeClaim:
            claimName: pvc-tus-php-redis

      containers:
        - name: tus-php-redis
          image: redis
          imagePullPolicy: Always
          ports:
            - containerPort: 6379
          volumeMounts:
            - name: redis
              mountPath: /data
              readOnly: false
