Commit 3c0c1a5
add interval to prometheus service monitor
We have a use-case where we need to modify the default scrape interval
on a number of apps, including coredns.
This PR simply adds support to change it. (It should be backwards
compatible with existing implmentations.)
Test/verification:
```
$ helm template charts/coredns --set prometheus.monitor.enabled=true --set prometheus.monitor.interval=60s |grep servicemonitor.yaml -A 22
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: RELEASE-NAME-coredns
labels:
app.kubernetes.io/managed-by: "Helm"
app.kubernetes.io/instance: "RELEASE-NAME"
helm.sh/chart: "coredns-1.16.5"
k8s-app: "coredns"
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "CoreDNS"
app.kubernetes.io/name: coredns
spec:
selector:
matchLabels:
app.kubernetes.io/instance: "RELEASE-NAME"
k8s-app: "coredns"
app.kubernetes.io/name: coredns
app.kubernetes.io/component: metrics
endpoints:
- port: metrics
interval: 60s
```
Signed-off-by: Craig Sebenik <[email protected]>1 parent 939b013 commit 3c0c1a5
File tree
3 files changed
+5
-0
lines changed- charts/coredns
- templates
3 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
0 commit comments