apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ml-pipeline-persistenceagent
    application-crd-id: kubeflow-pipelines
  name: ml-pipeline-persistenceagent
  namespace: kubeflow
spec:
  selector:
    matchLabels:
      app: ml-pipeline-persistenceagent
      application-crd-id: kubeflow-pipelines
  template:
    metadata:
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
      labels:
        app: ml-pipeline-persistenceagent
        application-crd-id: kubeflow-pipelines
    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:1.7.1
        imagePullPolicy: IfNotPresent
        name: ml-pipeline-persistenceagent
        resources:
          requests:
            cpu: 120m
            memory: 500Mi
      serviceAccountName: ml-pipeline-persistenceagent
