apiVersion: apps/v1
kind: Deployment
metadata:
  name: gesher
spec:
  replicas: 1
  selector:
    matchLabels:
      name: gesher
  template:
    metadata:
      labels:
        name: gesher
    spec:
      securityContext:
        runAsUser: 1001
        runAsGroup: 1001
        fsGroup: 1001
      serviceAccountName: gesher
      volumes:
      - name: certs
        emptyDir:
          medium: Memory
      containers:
        - name: gesher
          volumeMounts:
          - mountPath: /certs
            name: certs
          image: redislabs/gesher:0.4
          command:
          - "/manager"
          args:
          - "--namespace"
          - "$(POD_NAMESPACE)"
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: OPERATOR_NAME
              value: "gesher"
          resources:
            limits:
              cpu: 4000m
              memory: 512Mi
            requests:
              cpu: 500m
              memory: 256Mi
              
