mirror of https://git.rancher.io/charts
51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
{{- if .Values.kubeEtcd.enabled }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ template "kube-prometheus-stack.fullname" . }}-kube-etcd
|
|
namespace: {{ template "kube-prometheus-stack.namespace" . }}
|
|
labels:
|
|
app: {{ template "kube-prometheus-stack.name" . }}-kube-etcd
|
|
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
|
|
spec:
|
|
jobLabel: jobLabel
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "kube-prometheus-stack.name" . }}-kube-etcd
|
|
release: {{ $.Release.Name | quote }}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- "kube-system"
|
|
endpoints:
|
|
- port: http-metrics
|
|
{{- if .Values.kubeEtcd.serviceMonitor.interval }}
|
|
interval: {{ .Values.kubeEtcd.serviceMonitor.interval }}
|
|
{{- end }}
|
|
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
{{- if eq .Values.kubeEtcd.serviceMonitor.scheme "https" }}
|
|
scheme: https
|
|
tlsConfig:
|
|
{{- if .Values.kubeEtcd.serviceMonitor.serverName }}
|
|
serverName: {{ .Values.kubeEtcd.serviceMonitor.serverName }}
|
|
{{- end }}
|
|
{{- if .Values.kubeEtcd.serviceMonitor.caFile }}
|
|
caFile: {{ .Values.kubeEtcd.serviceMonitor.caFile }}
|
|
{{- end }}
|
|
{{- if .Values.kubeEtcd.serviceMonitor.certFile }}
|
|
certFile: {{ .Values.kubeEtcd.serviceMonitor.certFile }}
|
|
{{- end }}
|
|
{{- if .Values.kubeEtcd.serviceMonitor.keyFile }}
|
|
keyFile: {{ .Values.kubeEtcd.serviceMonitor.keyFile }}
|
|
{{- end}}
|
|
insecureSkipVerify: {{ .Values.kubeEtcd.serviceMonitor.insecureSkipVerify }}
|
|
{{- end }}
|
|
{{- if .Values.kubeEtcd.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings:
|
|
{{ tpl (toYaml .Values.kubeEtcd.serviceMonitor.metricRelabelings | indent 4) . }}
|
|
{{- end }}
|
|
{{- if .Values.kubeEtcd.serviceMonitor.relabelings }}
|
|
relabelings:
|
|
{{ toYaml .Values.kubeEtcd.serviceMonitor.relabelings | indent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|