You've already forked reposilite-charts
feat(prometheus): add podMonitor and serviceMonitor
This patch adds Prometheus podMonitor and serviceMonitor.
This commit is contained in:
27
templates/_podMonitors.tpl
Normal file
27
templates/_podMonitors.tpl
Normal file
@@ -0,0 +1,27 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/* annotations */}}
|
||||
{{- define "reposilite.podMonitor.annotations" -}}
|
||||
{{ include "reposilite.annotations" . }}
|
||||
{{- if .Values.prometheus.metrics.podMonitor.annotations }}
|
||||
{{ toYaml .Values.prometheus.metrics.podMonitor.annotations }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* enabled */}}
|
||||
{{- define "reposilite.podMonitor.enabled" -}}
|
||||
{{- if and .Values.prometheus.metrics.enabled .Values.prometheus.metrics.podMonitor.enabled (not .Values.prometheus.metrics.serviceMonitor.enabled) -}}
|
||||
true
|
||||
{{- else -}}
|
||||
false
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{/* labels */}}
|
||||
|
||||
{{- define "reposilite.podMonitor.labels" -}}
|
||||
{{ include "reposilite.labels" . }}
|
||||
{{- if .Values.prometheus.metrics.podMonitor.labels }}
|
||||
{{ toYaml .Values.prometheus.metrics.podMonitor.labels }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user