# Copyright Contributors to the Open Cluster Management project

apiVersion: v1
kind: Namespace
metadata:
  labels:
    app: discovery-operator
  name: system
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: discovery-operator
  namespace: system
  labels:
    app: discovery-operator
spec:
  selector:
    matchLabels:
      app: discovery-operator
  replicas: 1
  template:
    metadata:
      labels:
        app: discovery-operator
    spec:
      containers:
      - command:
        - /manager
        args:
        - --leader-elect
        image: controller:latest
        imagePullPolicy: Always
        name: discovery-operator
        securityContext:
          allowPrivilegeEscalation: false
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        resources:
          limits:
            cpu: 300m
            memory: 500Mi
          requests:
            cpu: 100m
            memory: 100Mi
      terminationGracePeriodSeconds: 10
      imagePullSecrets:
        - name: discovery-operator-pull-secret
      serviceAccountName: discovery-operator
