title: How to add extraScrapeConfigs to Prometheus helm chart from --set argument?
body: <p>I want to deploy Prometheus from the official helm chart on the <code>stable</code> repo.</p>
  
  <p>Also, I want to add my own scrape config.</p>
  
  <p>I can successfully add extra configs directly from the <code>values.yml</code> file of the chart, after downloading and altering it, but when I try to pass it as argument with <code>--set</code> nothing happens.</p>
  
  <p>This works [in <code>values.yml</code>]:</p>
  
  <pre><code># adds additional scrape configs to prometheus.yml
  # must be a string so you have to add a | after extraScrapeConfigs:
  # example adds prometheus-blackbox-exporter scrape config
  extraScrapeConfigs: |
    - job_name: 'sample-job'
      scrape_interval: 1s
      metrics_path: /
      kubernetes_sd_configs:
        - role: endpoints
  </code></pre>
  
  <p>this does not:</p>
  
  <pre><code>sudo helm upgrade --install prometheus \
  --set rbac.create=true \
  --set server.persistentVolume.enabled=false \
  --set alertmanager.persistentVolume.enabled=false \
  --set alertmanager.enabled=false \
  --set kubeStateMetrics.enabled=false \
  --set nodeExporter.enabled=false \
  --set pushgateway.enabled=false \
  --set extraScrapeConfigs="|
    - job_name: 'sample-pods'
      scrape_interval: 1s
      metrics_path: /
      kubernetes_sd_configs:
        - role: endpoints
  " \
  stable/prometheus
  </code></pre>
  
  <p>Is it possible someway?</p>
  
  <p>I found this SO question <a href="https://stackoverflow.com/questions/48523661/how-to-use-set-to-set-values-with-prometheus-chart">How to use --set to set values with Prometheus chart?</a> , but I cannot find a way to apply it to my case.</p>