Skip to content

Commit

Permalink
[stable/traefik] config option for endpoint of prometheus ServiceMonitor
Browse files Browse the repository at this point in the history
Signed-off-by: a-hat <github@andreaskappler.de>
  • Loading branch information
a-hat committed Nov 22, 2019
1 parent 9939a9f commit 6677976
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/traefik/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: traefik
version: 1.82.0
version: 1.83.0
appVersion: 1.7.19
description: A Traefik based Kubernetes ingress controller with Let's Encrypt support
keywords:
Expand Down
1 change: 1 addition & 0 deletions stable/traefik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ The following table lists the configurable parameters of the Traefik chart and t
| `metrics.prometheus.enabled` | Whether to enable the `/metrics` endpoint for metric collection by Prometheus. | `false` |
| `metrics.prometheus.buckets` | A list of response times (in seconds) - for each list element, Traefik will report all response times less than the element. | `[0.1,0.3,1.2,5]` |
| `metrics.serviceMonitor.enabled` | Whether to enable servicemonitor for Prometheus. | `false` |
| `metrics.serviceMonitor.endpointConfig`| Specify additional yaml for the endpoint configuration (e.g. for re-labeling) | `{} ` |
| `metrics.datadog.enabled` | Whether to enable pushing metrics to Datadog. | `false` |
| `metrics.datadog.address` | Datadog host in the format <hostname>:<port> | `localhost:8125` |
| `metrics.datadog.pushInterval` | How often to push metrics to Datadog. | `10s` |
Expand Down
3 changes: 3 additions & 0 deletions stable/traefik/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spec:
path: /metrics
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
{{- with .Values.metrics.serviceMonitor.endpointConfig }}
{{ toYaml . | indent 4 }}
{{- end }}
jobLabel: {{ template "traefik.fullname" . }}-prometheus-exporter
namespaceSelector:
Expand Down
2 changes: 2 additions & 0 deletions stable/traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ metrics:
# interval: 30s
# Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator
# labels:
# Specify additional yaml for the endpoint configuration (e.g. for re-labeling)
# endpointConfig: {}
datadog:
enabled: false
# address: localhost:8125
Expand Down

0 comments on commit 6677976

Please sign in to comment.