-
Notifications
You must be signed in to change notification settings - Fork 87
/
prometheus-servicemonitor.yaml
38 lines (37 loc) · 1.27 KB
/
prometheus-servicemonitor.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{{/*
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
*/}}
{{- if .Values.telemetry.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "vso.chart.fullname" . }}-controller-manager-metrics-monitor
namespace: {{ .Release.Namespace }}
labels:
control-plane: controller-manager
app.kubernetes.io/component: controller-manager
{{- include "vso.chart.labels" . | nindent 4 }}
{{- /* update the selectors docs in values.yaml whenever the defaults below change. */ -}}
{{- $selectors := .Values.telemetry.serviceMonitor.selectors }}
{{- if $selectors }}
{{- toYaml $selectors | nindent 4 }}
{{ end }}
spec:
selector:
matchLabels:
control-plane: controller-manager
endpoints:
- port: {{ .Values.telemetry.serviceMonitor.port }}
scheme: {{ .Values.telemetry.serviceMonitor.scheme }}
bearerTokenFile: {{ .Values.telemetry.serviceMonitor.bearerTokenFile }}
interval: {{ .Values.telemetry.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.telemetry.serviceMonitor.scrapeTimeout }}
path: {{ .Values.telemetry.serviceMonitor.path }}
params:
format:
- prometheus
tlsConfig:
insecureSkipVerify: true
{{ end }}