apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: session-dev
  name: redis-cache-always
  labels:
    app: redis-cache-always
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  selector:
    matchLabels:
      app: redis-cache-always
  template:
    metadata:
      labels:
        app: redis-cache-always
    spec:
      containers:
        - name: redis-cache-always
          image: redis:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 6379
          env:
            # - name: ALLOW_EMPTY_PASSWORD
            #   value: "yes"
            - name: REDIS_PASSWORD
              value: Password12#$
          resources:
            limits:
              cpu: 500m
              memory: 512Mi
            requests:
              cpu: 300m
              memory: 256Mi