apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ml-pipeline-persistenceagent
  name: ml-pipeline-persistenceagent
spec:
  selector:
    matchLabels:
      app: ml-pipeline-persistenceagent
  template:
    metadata:
      labels:
        app: ml-pipeline-persistenceagent
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
    spec:
      containers:
      - env:
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: TTL_SECONDS_AFTER_WORKFLOW_FINISH
            value: "86400"
          - name: NUM_WORKERS
            value: "2"
        image: gcr.io/ml-pipeline/persistenceagent:dummy
        imagePullPolicy: IfNotPresent
        name: ml-pipeline-persistenceagent
        resources:
          requests:
            cpu: 120m
            memory: 500Mi
      serviceAccountName: ml-pipeline-persistenceagent
