apiVersion: apps/v1
kind: Deployment
metadata:
  name: observatorium-operator
  labels:
    app.kubernetes.io/component: observatorium-operator
    app.kubernetes.io/name: observatorium-operator
    app.kubernetes.io/part-of: observatorium
    control-plane: observatorium-operator
    observability.open-cluster-management.io/name: "{{MULTICLUSTEROBSERVABILITY_CR_NAME}}"
spec:
  replicas: 1
  selector:
    matchLabels:
      control-plane: observatorium-operator
      observability.open-cluster-management.io/name: "{{MULTICLUSTEROBSERVABILITY_CR_NAME}}"
  template:
    metadata:
      labels:
        control-plane: observatorium-operator
        observability.open-cluster-management.io/name: "{{MULTICLUSTEROBSERVABILITY_CR_NAME}}"
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: app.kubernetes.io/name
                  operator: In
                  values:
                  - observatorium-operator
              topologyKey: kubernetes.io/hostname
            weight: 30
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: app.kubernetes.io/name
                  operator: In
                  values:
                  - observatorium-operator
              topologyKey: topology.kubernetes.io/zone
            weight: 70
      containers:
      - args:
        - --log-level=info
        image: quay.io/open-cluster-management/observatorium-operator:release-2.2-2020-11-18-0c71113
        imagePullPolicy: "{{MULTICLUSTEROBSERVABILITY_IMAGE_PULL_POLICY}}"
        name: observatorium-operator
        resources:
          limits:
            cpu: 100m
            memory: 600Mi
          requests:
            cpu: 100m
            memory: 100Mi
      imagePullSecrets:
      - name: "{{MULTICLUSTEROBSERVABILITY_IMAGE_PULL_SECRET}}"
      serviceAccountName: observatorium
