---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: session-db-v1
  labels:
    name: session-db
    app: session-db
    version: v1
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      name: session-db
      app: session-db
      version: v1
  template:
    metadata:
      labels:
        name: session-db
        app: session-db
        version: v1
    spec:
      containers:
      - name: session-db
        image: redis:alpine
        ports:
        - name: redis
          containerPort: 6379
        resources:
          requests:
            cpu: 100m
            memory: 50Mi
          limits:
            cpu: 300m
            memory: 300Mi
        securityContext:
          capabilities:
            drop:
              - all
            add:
              - CHOWN
              - SETGID
              - SETUID
          readOnlyRootFilesystem: true
      nodeSelector:
        beta.kubernetes.io/os: linux
