rancher-partner-charts/charts/kubecost/cost-analyzer/templates/cost-analyzer-servicemonito...

28 lines
735 B
YAML

{{- if .Values.serviceMonitor }}
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "cost-analyzer.fullname" . }}
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
{{- if .Values.serviceMonitor.additionalLabels }}
{{ toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: tcp-model
honorLabels: true
interval: 1m
scrapeTimeout: 10s
path: /metrics
scheme: http
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{ include "cost-analyzer.selectorLabels" . | nindent 6 }}
{{- end }}
{{- end }}