apiVersion: apps/v1
kind: Deployment
metadata:
  name: metadata-writer
  labels:
    app: metadata-writer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: metadata-writer
  template:
    metadata:
      labels:
        app: metadata-writer
    spec:
      containers:
      - name: main
        env:
        - name: NAMESPACE_TO_WATCH
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: PIPELINE_RUNTIME
          value: tekton
        - name: ARCHIVE_LOGS
          valueFrom:
            configMapKeyRef:
              name: kfp-tekton-config
              key: archive_logs
      serviceAccountName: kubeflow-pipelines-metadata-writer
