summaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/prometheus-operator/templates/exporters
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2019-01-29 00:54:16 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-29 00:54:16 +0000
commite03be3845828032fd363b3d9b9ef83424b3428b9 (patch)
tree5c5b17268e4b4d710e936243fa3f99e8644fde32 /vnfs/DAaaS/prometheus-operator/templates/exporters
parent7115cfddb7ecec3cd56b548b4365fdea1783b2d7 (diff)
parentc942e55ceea4ce28e84168bb672a83572d0a6313 (diff)
Merge "Helm charts for Distributed Edge Analytics."
Diffstat (limited to 'vnfs/DAaaS/prometheus-operator/templates/exporters')
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/service.yaml20
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml22
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml25
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml20
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml23
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml25
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/service.yaml24
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml25
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml20
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/service.yaml23
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml39
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml20
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/service.yaml23
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml21
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml19
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml45
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml18
17 files changed, 412 insertions, 0 deletions
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/service.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/service.yaml
new file mode 100644
index 00000000..f66d1c7d
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/service.yaml
@@ -0,0 +1,20 @@
+{{- if .Values.coreDns.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-coredns
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-coredns
+ jobLabel: coredns
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+spec:
+ clusterIP: None
+ ports:
+ - name: http-metrics
+ port: {{ .Values.coreDns.service.port }}
+ protocol: TCP
+ targetPort: {{ .Values.coreDns.service.targetPort }}
+ selector:
+{{ include "prometheus-operator.rangeskipempty" .Values.coreDns.service.selector | indent 4 }}
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml
new file mode 100644
index 00000000..2c29b950
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml
@@ -0,0 +1,22 @@
+{{- if .Values.coreDns.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-coredns
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-coredns
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: jobLabel
+ selector:
+ matchLabels:
+ app: {{ template "prometheus-operator.name" . }}-coredns
+ release: {{ .Release.Name | quote }}
+ namespaceSelector:
+ matchNames:
+ - "kube-system"
+ endpoints:
+ - port: http-metrics
+ interval: 15s
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- end }}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml
new file mode 100644
index 00000000..a0bf6965
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml
@@ -0,0 +1,25 @@
+{{- if .Values.kubeApiServer.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-apiserver
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-apiserver
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ endpoints:
+ - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ interval: 30s
+ port: https
+ scheme: https
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ serverName: {{ .Values.kubeApiServer.tlsConfig.serverName }}
+ insecureSkipVerify: {{ .Values.kubeApiServer.tlsConfig.insecureSkipVerify }}
+ jobLabel: {{ .Values.kubeApiServer.serviceMonitor.jobLabel }}
+ namespaceSelector:
+ matchNames:
+ - default
+ selector:
+{{ toYaml .Values.kubeApiServer.serviceMonitor.selector | indent 4 }}
+{{- end}}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml
new file mode 100644
index 00000000..a7407765
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml
@@ -0,0 +1,20 @@
+{{- if and .Values.kubeControllerManager.enabled .Values.kubeControllerManager.endpoints }}
+apiVersion: v1
+kind: Endpoints
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+ k8s-app: kube-controller-manager
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+subsets:
+ - addresses:
+ {{- range .Values.kubeControllerManager.endpoints }}
+ - ip: {{ . }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ port: {{ .Values.kubeControllerManager.service.port }}
+ protocol: TCP
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml
new file mode 100644
index 00000000..f680ac36
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml
@@ -0,0 +1,23 @@
+{{- if .Values.kubeControllerManager.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+ jobLabel: kube-controller-manager
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+spec:
+ clusterIP: None
+ ports:
+ - name: http-metrics
+ port: {{ .Values.kubeControllerManager.service.port }}
+ protocol: TCP
+ targetPort: {{ .Values.kubeControllerManager.service.targetPort }}
+{{- if .Values.kubeControllerManager.endpoints }}{{- else }}
+ selector:
+{{ include "prometheus-operator.rangeskipempty" .Values.kubeControllerManager.service.selector | indent 4 }}
+{{- end }}
+ type: ClusterIP
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml
new file mode 100644
index 00000000..db83e80d
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml
@@ -0,0 +1,25 @@
+{{- if .Values.kubeControllerManager.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: jobLabel
+ selector:
+ matchLabels:
+ app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+ release: {{ .Release.Name | quote }}
+ namespaceSelector:
+ matchNames:
+ - "kube-system"
+ endpoints:
+ - port: http-metrics
+ interval: 15s
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/service.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/service.yaml
new file mode 100644
index 00000000..6a13b746
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/service.yaml
@@ -0,0 +1,24 @@
+{{- if .Values.kubeDns.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-dns
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-dns
+ jobLabel: kube-dns
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+spec:
+ clusterIP: None
+ ports:
+ - name: http-metrics-dnsmasq
+ port: 10054
+ protocol: TCP
+ targetPort: 10054
+ - name: http-metrics-skydns
+ port: 10055
+ protocol: TCP
+ targetPort: 10055
+ selector:
+{{ include "prometheus-operator.rangeskipempty" .Values.kubeDns.service.selector | indent 4 }}
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml
new file mode 100644
index 00000000..0ba0984a
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml
@@ -0,0 +1,25 @@
+{{- if .Values.kubeDns.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-dns
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-dns
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: jobLabel
+ selector:
+ matchLabels:
+ app: {{ template "prometheus-operator.name" . }}-kube-dns
+ release: {{ .Release.Name | quote }}
+ namespaceSelector:
+ matchNames:
+ - "kube-system"
+ endpoints:
+ - port: http-metrics-dnsmasq
+ interval: 15s
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ - port: http-metrics-skydns
+ interval: 15s
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- end }}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml
new file mode 100644
index 00000000..537acaec
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml
@@ -0,0 +1,20 @@
+{{- if and .Values.kubeEtcd.enabled .Values.kubeEtcd.endpoints }}
+apiVersion: v1
+kind: Endpoints
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-etcd
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-etcd
+ k8s-app: etcd-server
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+subsets:
+ - addresses:
+ {{- range .Values.kubeEtcd.endpoints }}
+ - ip: {{ . }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ port: {{ .Values.kubeEtcd.service.port }}
+ protocol: TCP
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/service.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/service.yaml
new file mode 100644
index 00000000..7b0cacb1
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/service.yaml
@@ -0,0 +1,23 @@
+{{- if .Values.kubeEtcd.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-etcd
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-etcd
+ jobLabel: kube-etcd
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+spec:
+ clusterIP: None
+ ports:
+ - name: http-metrics
+ port: {{ .Values.kubeEtcd.service.port }}
+ protocol: TCP
+ targetPort: {{ .Values.kubeEtcd.service.targetPort }}
+{{- if .Values.kubeEtcd.endpoints }}{{- else }}
+ selector:
+ {{ include "prometheus-operator.rangeskipempty" .Values.kubeEtcd.service.selector | indent 4 }}
+{{- end }}
+ type: ClusterIP
+{{- end -}} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml
new file mode 100644
index 00000000..6d4a4447
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml
@@ -0,0 +1,39 @@
+{{- if .Values.kubeEtcd.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-etcd
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-etcd
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: jobLabel
+ selector:
+ matchLabels:
+ app: {{ template "prometheus-operator.name" . }}-kube-etcd
+ release: {{ .Release.Name | quote }}
+ namespaceSelector:
+ matchNames:
+ - "kube-system"
+ endpoints:
+ - port: http-metrics
+ interval: 15s
+ 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 }}
+{{- end }}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml
new file mode 100644
index 00000000..26426c84
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml
@@ -0,0 +1,20 @@
+{{- if and .Values.kubeScheduler.enabled .Values.kubeScheduler.endpoints }}
+apiVersion: v1
+kind: Endpoints
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+ k8s-app: kube-scheduler
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+subsets:
+ - addresses:
+ {{- range .Values.kubeScheduler.endpoints }}
+ - ip: {{ . }}
+ {{- end }}
+ ports:
+ - name: http-metrics
+ port: {{ .Values.kubeScheduler.service.port }}
+ protocol: TCP
+{{- end }} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/service.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/service.yaml
new file mode 100644
index 00000000..264b8acf
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/service.yaml
@@ -0,0 +1,23 @@
+{{- if .Values.kubeScheduler.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+ jobLabel: kube-scheduler
+{{ include "prometheus-operator.labels" . | indent 4 }}
+ namespace: kube-system
+spec:
+ clusterIP: None
+ ports:
+ - name: http-metrics
+ port: {{ .Values.kubeScheduler.service.port}}
+ protocol: TCP
+ targetPort: {{ .Values.kubeScheduler.service.targetPort}}
+{{- if .Values.kubeScheduler.endpoints }}{{- else }}
+ selector:
+ {{ include "prometheus-operator.rangeskipempty" .Values.kubeScheduler.service.selector | indent 4 }}
+{{- end }}
+ type: ClusterIP
+{{- end -}} \ No newline at end of file
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml
new file mode 100644
index 00000000..b4195b62
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml
@@ -0,0 +1,21 @@
+{{- if .Values.kubeScheduler.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: jobLabel
+ selector:
+ matchLabels:
+ app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+ release: {{ .Release.Name | quote }}
+ namespaceSelector:
+ matchNames:
+ - "kube-system"
+ endpoints:
+ - port: http-metrics
+ interval: 15s
+{{- end }}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml
new file mode 100644
index 00000000..cfbe2d70
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml
@@ -0,0 +1,19 @@
+{{- if .Values.kubeStateMetrics.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kube-state-metrics
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-kube-state-metrics
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: app
+ endpoints:
+ - interval: 30s
+ port: http
+ honorLabels: true
+ selector:
+ matchLabels:
+ app: kube-state-metrics
+ release: "{{ .Release.Name }}"
+{{- end }}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
new file mode 100644
index 00000000..fb3b9a22
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
@@ -0,0 +1,45 @@
+{{- if .Values.kubelet.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-kubelet
+ 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
+ interval: 15s
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ honorLabels: true
+ - port: https-metrics
+ scheme: https
+ path: /metrics/cadvisor
+ interval: 30s
+ honorLabels: true
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ {{- else }}
+ - port: http-metrics
+ interval: 30s
+ honorLabels: true
+ - port: http-metrics
+ path: /metrics/cadvisor
+ interval: 30s
+ honorLabels: true
+ {{- end }}
+ jobLabel: k8s-app
+ namespaceSelector:
+ matchNames:
+ - {{ .Values.kubelet.namespace }}
+ selector:
+ matchLabels:
+ k8s-app: kubelet
+{{- end}}
diff --git a/vnfs/DAaaS/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml b/vnfs/DAaaS/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml
new file mode 100644
index 00000000..392b7c93
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml
@@ -0,0 +1,18 @@
+{{- if .Values.nodeExporter.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: ServiceMonitor
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-node-exporter
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-node-exporter
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+ jobLabel: {{ .Values.nodeExporter.jobLabel }}
+ selector:
+ matchLabels:
+ app: prometheus-node-exporter
+ release: {{ .Release.Name }}
+ endpoints:
+ - port: metrics
+ interval: 30s
+{{- end }}