mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-18 02:06:52 +00:00
add value for override of namespace of serviceMonitor (#2258)
* add value for override of namespace of serviceMonitor Signed-off-by: Issif <issif+github@gadz.org> * set version of chart to v2.0.1 Signed-off-by: Issif <issif+github@gadz.org>
This commit is contained in:
parent
6ba341ff9b
commit
7c96bd3e21
4 changed files with 8 additions and 1 deletions
charts/kyverno
|
@ -1,6 +1,6 @@
|
|||
apiVersion: v1
|
||||
name: kyverno
|
||||
version: v2.0
|
||||
version: v2.0.1
|
||||
appVersion: v1.4.2
|
||||
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
|
||||
description: Kubernetes Native Policy Management
|
||||
|
|
|
@ -106,6 +106,7 @@ The following table lists the configurable parameters of the kyverno chart and t
|
|||
| `service.port` | port for the service | `443` |
|
||||
| `service.type` | type of service | `ClusterIP` |
|
||||
| `serviceMonitor.enabled` | create a ServiceMonitor(Requires Prometheus) | `false` |
|
||||
| `serviceMonitor.namespace` | override namespace for ServiceMonitor (default is same than kyverno) | `false` |
|
||||
| `serviceMonitor.additionalLabels` | additional labels to add for ServiceMonitor | `nil` |
|
||||
| `serviceMonitor.interval` | interval to scrape metrics | `30s` |
|
||||
| `serviceMonitor.scrapeTimeout` | timeout if metrics can't be retrieved in given time interval | `25s` |
|
||||
|
|
|
@ -13,7 +13,11 @@ metadata:
|
|||
{{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kyverno.serviceName" . }}-service-monitor
|
||||
{{- if .Values.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||
{{- else }}
|
||||
namespace: {{ template "kyverno.namespace" . }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{ include "kyverno.matchLabels" . | nindent 6 }}
|
||||
|
|
|
@ -181,6 +181,8 @@ serviceMonitor:
|
|||
# Additional labels
|
||||
additionalLabels:
|
||||
# key: value
|
||||
# Override namespace (default is same than kyverno)
|
||||
namespace:
|
||||
|
||||
# Interval to scrape metrics
|
||||
interval: 30s
|
||||
|
|
Loading…
Add table
Reference in a new issue