apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: 'my-gitlabredis'
  name: 'my-gitlabredis'
spec:
  replicas: 1
  selector:
    matchLabels:
      app: 'my-gitlabredis'
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: 'my-gitlabredis'
    spec:
      containers:
        - name: 'my-gitlabredis'
          image: 'redis:5.0.7'
          ports:
            - containerPort: 6379
              protocol: TCP
          resources:
            limits:
              cpu: '1'
              ephemeral-storage: '1G'
              memory: '1G'
            requests:
              cpu: '1'
              ephemeral-storage: '1G'
              memory: '1G'
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
