apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    prometheusK8s:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
      retention: 15d
      volumeClaimTemplate:
        metadata:
          name: prometheus-data
        spec:
          resources:
            requests:
              storage: 100Gi
    alertmanagerMain:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
      volumeClaimTemplate:
        metadata:
          name: alertmanager-data
        spec:
          resources:
            requests:
              storage: 10Gi
    telemeterClient:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
      telemeterServerURL: ${TELEMETER_SERVER_URL}
    prometheusOperator:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
    grafana:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
    k8sPrometheusAdapter:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
    kubeStateMetrics:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
      tolerations: 
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
    # https://access.redhat.com/solutions/5685771
    # https://bugzilla.redhat.com/show_bug.cgi?id=1906496
    thanosQuerier:
      resources:
        limits:
          cpu: 250m
          memory: 2048Mi
        requests:
          cpu: 5m
          memory: 125Mi
