# Copyright (c) 2021 Red Hat, Inc.
# Copyright Contributors to the Open Cluster Management project
apiVersion: apps/v1
kind: Deployment
metadata:
  name: search-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: search-operator
  template:
    metadata:
      labels:
        name: search-operator
    spec:
      serviceAccountName: search-operator
      containers:
        - name: search-operator
          image: quay.io/open-cluster-management/search-operator
          command:
          - search-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "search-operator"
            - name: SEARCH_COLLECTOR_IMAGE_NAME
              value: "quay.io/stolostron/search_collector:latest"
