apiVersion: apps/v1
kind: Deployment
metadata:
  name: gesher
spec:
  replicas: 1
  selector:
    matchLabels:
      name: gesher
  template:
    metadata:
      labels:
        name: gesher
    spec:
      serviceAccountName: gesher
      containers:
        - name: gesher
          image: redislabs/gesher:test
          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
          readinessProbe:
            failureThreshold: 3
            successThreshold: 1
            periodSeconds: 30
            timeoutSeconds: 10
            httpGet:
              path: /healthz
              port: 8443
              scheme: HTTPS