41 lines
2.0 KiB
YAML
41 lines
2.0 KiB
YAML
{{- if .Values.kubeControllerManager.enabled }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ template "kube-prometheus.fullname" . }}-kube-controller-manager
|
|
namespace: {{ .Release.Namespace }}
|
|
labels: {{- include "kube-prometheus.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: {{ template "kube-prometheus.fullname" . }}-kube-controller-manager
|
|
spec:
|
|
jobLabel: component
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: {{ template "kube-prometheus.fullname" . }}-kube-controller-manager
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ .Values.kubeControllerManager.namespace }}
|
|
endpoints:
|
|
- port: http-metrics
|
|
{{- if .Values.kubeControllerManager.serviceMonitor.interval }}
|
|
interval: {{ .Values.kubeControllerManager.serviceMonitor.interval }}
|
|
{{- end }}
|
|
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
{{- if .Values.kubeControllerManager.serviceMonitor.https }}
|
|
scheme: https
|
|
tlsConfig:
|
|
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
|
{{- if .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify }}
|
|
insecureSkipVerify: {{ .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify }}
|
|
{{- end }}
|
|
{{- if .Values.kubeControllerManager.serviceMonitor.serverName }}
|
|
serverName: {{ .Values.kubeControllerManager.serviceMonitor.serverName }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.kubeControllerManager.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings: {{- include "tc.common.tplvalues.render" (dict "value" .Values.kubeControllerManager.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeControllerManager.serviceMonitor.relabelings }}
|
|
relabelings: {{- include "tc.common.tplvalues.render" (dict "value" .Values.kubeControllerManager.serviceMonitor.relabelings "context" $) | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|