Commit 57b0b85
static-exporter: Update httpd.conf file to include headers (#1361)
* static-exporter: Update httpd.conf file to include headers
Prometheus v3.0.0 has a stricter requirements on the headers that are
returned from exporters. The static-exporter does not set any headers
and causes scrapes to fail with the following error:
```
non-compliant scrape target sending blank Content-Type and no fallback_scrape_protocol specified for target ````
```
This adds an httpd.conf file to mount to the container that includes a
directive to add a header that solves this problem. To generate the
httpd.conf file, I ran the following command:
`docker run --rm httpd:2.4 cat /usr/local/apache2/conf/httpd.conf > my-httpd.conf`
* Mount the httpdConfig to the filesystem
* Include withSubPath mixin volumeMount mixin
* Move httpConfig setup to a method so it's opt in
* Add reference to name that can be called elsewhere
* Update withHttpConfig() to accept a config that can be patched
* Update configMap to have a prefix with the name and a suffix foir -httpd-config
* Update README.md for static-exporter to add explicit instructions to update the httpd.conf
* Update static-exporter/httpd.conf
Co-authored-by: Jeroen Op 't Eynde <[email protected]>
---------
Co-authored-by: Zach Leslie <[email protected]>
Co-authored-by: Jeroen Op 't Eynde <[email protected]>1 parent 51cad60 commit 57b0b85
3 files changed
+587
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments