32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
|
{{- if .Values.serviceMonitor.networkCosts.enabled }}
|
||
|
apiVersion: monitoring.coreos.com/v1
|
||
|
kind: ServiceMonitor
|
||
|
metadata:
|
||
|
name: {{ include "cost-analyzer.networkCostsName" . }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
|
||
|
{{- if .Values.serviceMonitor.networkCosts.additionalLabels }}
|
||
|
{{ toYaml .Values.serviceMonitor.networkCosts.additionalLabels | nindent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
endpoints:
|
||
|
- port: metrics
|
||
|
honorLabels: true
|
||
|
interval: 1m
|
||
|
scrapeTimeout: {{ .Values.serviceMonitor.networkCosts.scrapeTimeout }}
|
||
|
path: /metrics
|
||
|
scheme: http
|
||
|
{{- with .Values.serviceMonitor.networkCosts.metricRelabelings }}
|
||
|
metricRelabelings: {{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.serviceMonitor.networkCosts.relabelings }}
|
||
|
relabelings: {{ toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
namespaceSelector:
|
||
|
matchNames:
|
||
|
- {{ .Release.Namespace }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: {{ include "cost-analyzer.networkCostsName" . }}
|
||
|
{{- end }}
|