diff options
Diffstat (limited to 'deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml')
-rw-r--r-- | deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml b/deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml new file mode 100644 index 00000000..e884ac56 --- /dev/null +++ b/deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml @@ -0,0 +1,28 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "fluentd.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- end }} + labels: {{- include "fluentd.labels" . | nindent 4 }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }} + endpoints: + - port: metrics + path: "/metrics" + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} |