diff options
author | maximilien <me@mricher.fr> | 2023-01-27 10:51:04 +0000 |
---|---|---|
committer | maximilien <me@mricher.fr> | 2023-01-27 10:51:04 +0000 |
commit | df30f3df4b2b6cb67c4e37117fb30d6f61cfefc5 (patch) | |
tree | 2e9291b5f91abf355e92668fd3ed4bbbb5896698 /script/helm/garage/templates/servicemonitor.yaml | |
parent | f2c256cac4e599335d592dd580011cf15f278a51 (diff) | |
parent | 50bce43f25574d168f015f31fb7f8a69dafac072 (diff) | |
download | garage-df30f3df4b2b6cb67c4e37117fb30d6f61cfefc5.tar.gz garage-df30f3df4b2b6cb67c4e37117fb30d6f61cfefc5.zip |
Merge pull request 'helm chart improvements' (#425) from patrickjahns/garage:helm-improvements into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/425
Diffstat (limited to 'script/helm/garage/templates/servicemonitor.yaml')
-rw-r--r-- | script/helm/garage/templates/servicemonitor.yaml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/script/helm/garage/templates/servicemonitor.yaml b/script/helm/garage/templates/servicemonitor.yaml new file mode 100644 index 00000000..6838d09f --- /dev/null +++ b/script/helm/garage/templates/servicemonitor.yaml @@ -0,0 +1,44 @@ +{{- if .Values.monitoring.metrics.serviceMonitor.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "garage.fullname" . }} + {{- if .Values.monitoring.metrics.serviceMonitor.namespace }} + namespace: {{ tpl .Values.monitoring.metrics.serviceMonitor.namespace . }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + {{- include "garage.labels" . | nindent 4 }} + {{- with .Values.monitoring.metrics.serviceMonitor.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + endpoints: + - port: metrics + {{- with .Values.monitoring.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- with .Values.monitoring.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} + honorLabels: true + path: {{ .Values.monitoring.metrics.serviceMonitor.path }} + scheme: {{ .Values.monitoring.metrics.serviceMonitor.scheme }} + {{- with .Values.monitoring.metrics.serviceMonitor.tlsConfig }} + tlsConfig: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.monitoring.metrics.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 6 }} + {{- end }} + jobLabel: "{{ .Release.Name }}" + selector: + matchLabels: + {{- include "garage.selectorLabels" . | nindent 6 }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }}
\ No newline at end of file |