apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prow
  namespace: prow-monitoring
spec:
  replicas: 2
  storage:
    volumeClaimTemplate:
      metadata:
        name: prometheus
      spec:
        accessModes:
        - "ReadWriteOnce"
        storageClassName: "standard"
        resources:
          requests:
            storage: 100Gi
  retention: "90d" # TODO(chaodaiG): change back to 180d once figure out how to properly increase the volume.
  serviceAccountName: prometheus-prow
  alerting:
    alertmanagers:
    - namespace: prow-monitoring
      name: alertmanager
      port: http
  enableAdminAPI: false
  ruleSelector:
    matchLabels:
      role: alert-rules
      prometheus: prow
  serviceMonitorSelector:
    matchExpressions:
    - key: app
      operator: Exists
    - key: app.kubernetes.io/name
      operator: Exists
  version: v2.7.1
  image: docker.io/prom/prometheus
  externalLabels: {}
  listenLocal: false
  nodeSelector: {}
  securityContext:
    fsGroup: 2000
    runAsNonRoot: true
    runAsUser: 1000
  additionalScrapeConfigs:
    name: additional-scrape-configs
    key: prometheus-additional.yaml

apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prow
  namespace: prow-monitoring
spec:
  replicas: 2
  storage:
    volumeClaimTemplate:
      metadata:
        name: prometheus
      spec:
        accessModes:
        - "ReadWriteOnce"
        storageClassName: "standard"
        resources:
          requests:
            storage: 100Gi
  retention: "90d" # TODO(chaodaiG): change back to 180d once figure out how to properly increase the volume.
  serviceAccountName: prometheus-prow
  alerting:
    alertmanagers:
    - namespace: prow-monitoring
      name: alertmanager
      port: http
  enableAdminAPI: false
  ruleSelector:
    matchLabels:
      role: alert-rules
      prometheus: prow
  serviceMonitorSelector:
    matchExpressions:
    - key: app
      operator: Exists
  version: v2.7.1
  image: docker.io/prom/prometheus
  externalLabels: {}
  listenLocal: false
  nodeSelector: {}
  securityContext:
    fsGroup: 2000
    runAsNonRoot: true
    runAsUser: 1000
  additionalScrapeConfigs:
    name: additional-scrape-configs
    key: prometheus-additional.yaml

Revert "Prometheus: service monitor also monitors label app.kubernetes.io/name"
Revert "Prometheus: service monitor also monitors label app.kubernetes.io/name"

This reverts commit 4667228810f0fdb70864e121775e651a36fc0978.
