libreoffice-online/kubernetes/helm/collabora-online/templates/servicemonitor.yaml
genofire 3e131a9e0f improve HelmChart
Change-Id: 2995f983d09241299ccb7947a2df281aec8977a1

Signed-off-by: Klaus Erber <k.erber@erber-freelance.de>
Signed-off-by: Martin Müller <martin.mueller@dataport.de>
Signed-off-by: genofire <geno+dev@fireorbit.de>
2022-10-24 17:29:21 +02:00

34 lines
1.2 KiB
YAML

{{- if .Values.prometheus.servicemonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "collabora-online.fullname" . }}
labels:
{{- include "collabora-online.labels" . | nindent 4 }}
{{- toYaml .Values.prometheus.servicemonitor.labels | nindent 4 }}
spec:
endpoints:
- port: http
path: "/cool/getMetrics"
basicAuth:
username:
{{- if (.Values.collabora.existingSecret).enabled }}
name: {{ .Values.collabora.existingSecret.secretName | quote }}
key: {{ .Values.collabora.existingSecret.usernameKey | quote }}
{{- else }}
name: {{ include "collabora-online.fullname" . }}
key: username
{{- end }}
password:
{{- if (.Values.collabora.existingSecret).enabled }}
name: {{ .Values.collabora.existingSecret.secretName | quote }}
key: {{ .Values.collabora.existingSecret.passwordKey | quote }}
{{- else }}
name: {{ include "collabora-online.fullname" . }}
key: password
{{- end }}
selector:
matchLabels:
{{- include "collabora-online.selectorLabels" . | nindent 6 }}
type: main
{{- end }}