32 lines
875 B
YAML
32 lines
875 B
YAML
|
{{- if .Values.networkCosts }}
|
||
|
{{- if .Values.networkCosts.enabled }}
|
||
|
{{- if .Values.networkCosts.podMonitor }}
|
||
|
{{- if .Values.networkCosts.podMonitor.enabled }}
|
||
|
apiVersion: monitoring.coreos.com/v1
|
||
|
kind: PodMonitor
|
||
|
metadata:
|
||
|
name: {{ include "cost-analyzer.networkCostsName" . }}
|
||
|
labels:
|
||
|
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
|
||
|
{{- if .Values.networkCosts.podMonitor.additionalLabels }}
|
||
|
{{ toYaml .Values.networkCosts.podMonitor.additionalLabels | nindent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
podMetricsEndpoints:
|
||
|
- port: http-server
|
||
|
honorLabels: true
|
||
|
interval: 1m
|
||
|
scrapeTimeout: 10s
|
||
|
path: /metrics
|
||
|
scheme: http
|
||
|
namespaceSelector:
|
||
|
matchNames:
|
||
|
- {{ .Release.Namespace }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: {{ template "cost-analyzer.networkCostsName" . }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|