aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server')
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml25
1 files changed, 25 insertions, 0 deletions
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}}