apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus
  labels:
    app: metrics
    component: prometheus
data:
  prometheus.yml: |-
    global:
      scrape_interval: 15s
    scrape_configs:
    - job_name: 'prometheus'
      # Override the global default and scrape targets from this job every 5 seconds.
      scrape_interval: 5s
      # metrics_path defaults to '/metrics'
      # scheme defaults to 'http'.
      static_configs: 
      - targets: ['localhost:9090']
    - job_name: 'gateway'
      # Override the global default and scrape targets from this job every 5 seconds.
      scrape_interval: 5s
      # metrics_path defaults to '/metrics'
      # scheme defaults to 'http'.
      metrics_path: '/prometheus'
      static_configs:
      - targets: ['gateway:80']
