apiVersion: apps/v1
kind: Deployment
metadata:
  name: alameda-evictioner
  namespace: federatorai
  labels:
    app: alameda
    component: alameda-evictioner
  annotations:
    description: Defines how to deploy the alameda-evictioner
    template.alpha.openshift.io/wait-for-ready: 'true'
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      component: alameda-evictioner
  template:
    metadata:
      name: alameda-evictioner
      labels:
        app: alameda
        component: alameda-evictioner
    spec:
      containers:
      - name: alameda-evictioner
        image: quay.io/prophetstor/alameda-evictioner-ubi:v0.3.8
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            cpu: 45m
            memory: 75Mi
        env:
        - name: ALAMEDA_EVICTIONER_DATAHUB_ADDRESS
          value: "alameda-datahub.federatorai.svc:50050"
        - name: ALAMEDA_EVICTIONER_EVICTION_ENABLE
          value: "true"
        readinessProbe:
          exec:
            command:
            - /usr/local/bin/evictioner
            - probe
            - --type=readiness
          initialDelaySeconds: 5
          periodSeconds: 5
        livenessProbe:
          exec:
            command:
            - /usr/local/bin/evictioner
            - probe
            - --type=liveness
          initialDelaySeconds: 5
          periodSeconds: 5
      volumes:
      - name:  alameda-evictioner-data-storage
      - name:  alameda-evictioner-log-storage
      serviceAccount: alameda-evictioner
      serviceAccountName: alameda-evictioner
