apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis
  namespace: default
  labels:
    app: redis
spec:
  selector:
    matchLabels:
      app: redis
  template:
    metadata:
      labels:
        app: redis
    spec:
      restartPolicy: Always
      containers:
      - name: redis
        image: redis:5.0
        resources:
          limits:
            memory: "50Mi"
            cpu: "50m"
        ports:
        - containerPort: 6379
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                  - epitech-s4ql
