Skip to content

Commit

Permalink
added configurable namespace selector
Browse files Browse the repository at this point in the history
  • Loading branch information
a-thaler committed Oct 15, 2020
1 parent a5b4a27 commit bf45a27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ metadata:
namespace: {{ .Release.Namespace }}
spec:
namespaceSelector:
{{- if .Values.prometheus.envoyPodMonitor.namespaces }}
matchNames:
{{- range $i, $namespace := (splitList "," .Values.prometheus.envoyPodMonitor.namespaces) }}
- {{ $namespace }}
{{- end }}
{{- else }}
any: true
{{- end }}
podMetricsEndpoints:
- interval: {{ .Values.prometheus.envoyPodMonitor.scrapeInterval }}
metricRelabelings:
Expand Down
2 changes: 2 additions & 0 deletions resources/istio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ istio:
prometheus:
envoyPodMonitor:
scrapeInterval: 2m
#comma separated list of namespaces to match. If not set, all namespaces will be matched
#namespaces:
istioServiceMonitor:
scrapeInterval: 1m

0 comments on commit bf45a27

Please sign in to comment.