mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Now possible to define namespaces to scrape by prometheus (#18886)
Signed-off-by: Emil Marklund <emil.marklund@vkmedia.se>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
f3084097af
commit
2cdb664c11
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: nginx-ingress
|
||||
version: 1.24.7
|
||||
version: 1.25.0
|
||||
appVersion: 0.26.1
|
||||
home: https://github.com/kubernetes/ingress-nginx
|
||||
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
|
||||
|
||||
@@ -139,6 +139,7 @@ Parameter | Description | Default
|
||||
`controller.metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}`
|
||||
`controller.metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels. | `false`
|
||||
`controller.metrics.serviceMonitor.namespace` | namespace where servicemonitor resource should be created | `the same namespace as nginx ingress`
|
||||
`controller.metrics.serviceMonitor.namespaceSelector` | [namespaceSelector](https://github.com/coreos/prometheus-operator/blob/v0.34.0/Documentation/api.md#namespaceselector) to configure what namespaces to scrape | `will scrape the helm release namespace only`
|
||||
`controller.metrics.serviceMonitor.scrapeInterval` | interval between Prometheus scraping | `30s`
|
||||
`controller.metrics.prometheusRule.enabled` | Set this to `true` to create prometheusRules for Prometheus operator | `false`
|
||||
`controller.metrics.prometheusRule.additionalLabels` | Additional labels that can be used so prometheusRules will be discovered by Prometheus | `{}`
|
||||
|
||||
@@ -22,9 +22,14 @@ spec:
|
||||
{{- if .Values.controller.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: true
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics.serviceMonitor.namespaceSelector }}
|
||||
namespaceSelector:
|
||||
{{ toYaml .Values.controller.metrics.serviceMonitor.namespaceSelector | indent 4 -}}
|
||||
{{ else }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "nginx-ingress.name" . }}
|
||||
|
||||
@@ -364,6 +364,11 @@ controller:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
namespace: ""
|
||||
namespaceSelector: {}
|
||||
# Default: scrape .Release.Namespace only
|
||||
# To scrape all, use the following:
|
||||
# namespaceSelector:
|
||||
# any: true
|
||||
scrapeInterval: 30s
|
||||
# honorLabels: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user