mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add metrics port to containerSpec (#19479)
WIthout a metrics port given in the container spec, prometheus scraping annotations would not scrape the correct port. See https://github.com/prometheus/prometheus/issues/3826#issuecomment-380736580 for details. Signed-off-by: Tammo van Lessen <tvanlessen@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
2ef9c1ea20
commit
24a110fa18
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
appVersion: "1.2.0"
|
||||
description: A Helm chart for kured
|
||||
name: kured
|
||||
version: 1.4.1
|
||||
version: 1.4.2
|
||||
home: https://github.com/weaveworks/kured
|
||||
maintainers:
|
||||
- name: plumdog
|
||||
|
||||
@@ -36,3 +36,14 @@ extraArgs:
|
||||
bar-baz: 2
|
||||
```
|
||||
becomes `/usr/bin/kured ... --foo=1 --bar-baz=2`.
|
||||
|
||||
## Prometheus Metrics
|
||||
|
||||
Kured exposes a single prometheus metric indicating whether a reboot is required or not (see [kured docs](https://github.com/weaveworks/kured#prometheus-metrics)) for details. It can be scraped with the following set of annotations:
|
||||
|
||||
```yaml
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "/metrics"
|
||||
prometheus.io/port: "8080"
|
||||
```
|
||||
@@ -61,6 +61,9 @@ spec:
|
||||
- --{{ $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
env:
|
||||
# Pass in the name of the node on which this pod is scheduled
|
||||
# for use with drain/uncordon operations and lock acquisition
|
||||
|
||||
Reference in New Issue
Block a user