apiVersion: apps/v1
kind: Deployment
metadata:
  name: cluster-monitoring-operator
  namespace: openshift-monitoring
  labels:
    app: cluster-monitoring-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cluster-monitoring-operator
  template:
    metadata:
      labels:
        app: cluster-monitoring-operator
    spec:
      serviceAccountName: cluster-monitoring-operator
      nodeSelector:
        beta.kubernetes.io/os: linux
        node-role.kubernetes.io/master: ""
      priorityClassName: "system-cluster-critical"
      tolerations:
      - key: "node.kubernetes.io/memory-pressure"
        operator: "Exists"
        effect: "NoSchedule"
      - key: "node-role.kubernetes.io/master"
        operator: "Exists"
        effect: "NoSchedule"
      - key: "node.kubernetes.io/unreachable"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      - key: "node.kubernetes.io/not-ready"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      containers:
      - image: quay.io/openshift/origin-cluster-monitoring-operator:latest
        name: cluster-monitoring-operator
        terminationMessagePolicy: FallbackToLogsOnError
        env:
        - name: RELEASE_VERSION
          value: "0.0.1-snapshot"
        args:
        - "-namespace=openshift-monitoring"
        - "-configmap=cluster-monitoring-config"
        - "-release-version=$(RELEASE_VERSION)"
        - "-logtostderr=true"
        - "-v=3"
        - "-images=prometheus-operator=quay.io/openshift/origin-prometheus-operator:latest"
        - "-images=prometheus-config-reloader=quay.io/openshift/origin-prometheus-config-reloader:latest"
        - "-images=configmap-reloader=quay.io/openshift/origin-configmap-reloader:latest"
        - "-images=prometheus=quay.io/openshift/origin-prometheus:latest"
        - "-images=alertmanager=quay.io/openshift/origin-prometheus-alertmanager:latest"
        - "-images=grafana=quay.io/openshift/origin-grafana:latest"
        - "-images=oauth-proxy=quay.io/openshift/origin-oauth-proxy:latest"
        - "-images=node-exporter=quay.io/openshift/origin-prometheus-node-exporter:latest"
        - "-images=kube-state-metrics=quay.io/openshift/origin-kube-state-metrics:latest"
        - "-images=openshift-state-metrics=quay.io/openshift/origin-openshift-state-metrics:latest"
        - "-images=kube-rbac-proxy=quay.io/openshift/origin-kube-rbac-proxy:latest"
        - "-images=telemeter-client=quay.io/openshift/origin-telemeter:latest"
        - "-images=prom-label-proxy=quay.io/openshift/origin-prom-label-proxy:latest"
        - "-images=k8s-prometheus-adapter=quay.io/openshift/origin-k8s-prometheus-adapter:latest"
        - "-images=thanos=quay.io/openshift/origin-thanos:latest"
        ports:
        - containerPort: 8080
          name: http
        resources:
          requests:
            cpu: 10m
            memory: 50Mi
