aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml')
-rwxr-xr-xkud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml124
1 files changed, 124 insertions, 0 deletions
diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
new file mode 100755
index 00000000..8650081a
--- /dev/null
+++ b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
@@ -0,0 +1,124 @@
+{{- if .Values.kubelet.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kubelet
+ namespace: {{ template "prometheus-operator.namespace" . }}
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kubelet
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ endpoints:
+ {{- if .Values.kubelet.serviceMonitor.https }}
+ - port: https-metrics
+ scheme: https
+ {{- if .Values.kubelet.serviceMonitor.interval }}
+ interval: {{ .Values.kubelet.serviceMonitor.interval }}
+ {{- end }}
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ honorLabels: true
+{{- if .Values.kubelet.serviceMonitor.metricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.metricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.relabelings }}
+ relabelings:
+{{ toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4 }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.cAdvisor }}
+ - port: https-metrics
+ scheme: https
+ path: /metrics/cadvisor
+ {{- if .Values.kubelet.serviceMonitor.interval }}
+ interval: {{ .Values.kubelet.serviceMonitor.interval }}
+ {{- end }}
+ honorLabels: true
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.cAdvisorRelabelings }}
+ relabelings:
+{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4 }}
+{{- end }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.probes }}
+ - port: https-metrics
+ scheme: https
+ path: /metrics/probes
+ {{- if .Values.kubelet.serviceMonitor.interval }}
+ interval: {{ .Values.kubelet.serviceMonitor.interval }}
+ {{- end }}
+ honorLabels: true
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- if .Values.kubelet.serviceMonitor.probesMetricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.probesMetricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.probesRelabelings }}
+ relabelings:
+{{ toYaml .Values.kubelet.serviceMonitor.probesRelabelings | indent 4 }}
+{{- end }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.resource }}
+ - port: https-metrics
+ scheme: https
+ path: {{ .Values.kubelet.serviceMonitor.resourcePath }}
+{{- if .Values.kubelet.serviceMonitor.resourceMetricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceMetricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.resourceRelabelings }}
+ relabelings:
+{{ toYaml .Values.kubelet.serviceMonitor.resourceRelabelings | indent 4 }}
+{{- end }}
+{{- end }}
+ {{- else }}
+ - port: http-metrics
+ {{- if .Values.kubelet.serviceMonitor.interval }}
+ interval: {{ .Values.kubelet.serviceMonitor.interval }}
+ {{- end }}
+ honorLabels: true
+{{- if .Values.kubelet.serviceMonitor.metricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.metricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.relabelings }}
+ relabelings:
+{{ toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4 }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.cAdvisor }}
+ - port: http-metrics
+ path: /metrics/cadvisor
+ {{- if .Values.kubelet.serviceMonitor.interval }}
+ interval: {{ .Values.kubelet.serviceMonitor.interval }}
+ {{- end }}
+ honorLabels: true
+{{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.cAdvisorRelabelings }}
+ relabelings:
+{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4 }}
+{{- end }}
+{{- end }}
+ {{- end }}
+ jobLabel: k8s-app
+ namespaceSelector:
+ matchNames:
+ - {{ .Values.kubelet.namespace }}
+ selector:
+ matchLabels:
+ k8s-app: kubelet
+{{- end}}