apiVersion: apps/v1
kind: Deployment
metadata:
  name: job-lease-keeper
spec:
  replicas: 1
  selector:
    matchLabels:
      name: job-lease-keeper
  template:
    metadata:
      labels:
        name: job-lease-keeper
    spec:
      serviceAccountName: job-lease-keeper
      containers:
       - name: job-lease-keeper
         image: kubesailmaker/job-lease-keeper:0.10.2
         command:
         - "/job-lease-keeper"
         imagePullPolicy: IfNotPresent
         env:
         - name: CONTROLLER_NAME
           valueFrom:
             fieldRef:
               fieldPath: metadata.name
         - name: JOBS_NAMESPACE
           valueFrom:
             fieldRef:
               fieldPath: metadata.namespace
         - name: JOBS_SUCCESS_THRESHOLD_MINUTES
           value: "10"
         - name: JOBS_FAILURE_THRESHOLD_MINUTES
           value: "20"
         - name: CHECK_FREQUENCY_MINUTES
           value: "5"
         - name: KUBERNETES_SERVICE_HOST
           value: "kubernetes.default.svc"
         - name: KUBERNETES_SERVICE_PORT
           value: "443"
         resources:
           requests:
             cpu: 50m
             memory: 256Mi
           limits:
             cpu: 50m
             memory: 256Mi
