Skip to content
Snippets Groups Projects
Commit 09d8e4c1 authored by Sören Henning's avatar Sören Henning
Browse files

Add optional support for collecting more metrics

parent 5f8a1ba3
No related branches found
No related tags found
No related merge requests found
Pipeline #9538 passed
......@@ -38,6 +38,31 @@ To store the results of benchmark executions in a [PersistentVolume](https://kub
You can also use an existing PersistentVolumeClaim by setting `operator.resultsVolume.persistent.existingClaim`.
If persistence is not enabled, all results will be gone upon pod termination.
### Exposing Grafana
Per default, Theodolite exposes a Grafana instance as NodePort at port `31199`. This can configured by setting `grafana.service.nodePort`.
## Additional Kubernetes cluster metrics
As long as you have sufficient permissions on your cluster, you can integrate additional Kubernetes metrics into Prometheus by enabling the following exporters:
```yaml
kube-prometheus-stack:
kubelet:
enabled: true
kubeStateMetrics:
enabled: true
nodeExporter:
enabled: true
prometheus:
role:
clusterRole: true
roleBinding:
clusterRoleBinding: true
```
The ClusterRole and ClusterRoleBindings are required for collecting metrics from the kubelets. See the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) for more details on configuring the individual exporters.
### Random scheduler
Installation of the random scheduler can be enabled via `randomScheduler.enabled`. Please note that the random scheduler is neither required in operator mode nor in standalone mode. However, it has to be installed if benchmark executions should use random scheduling.
......
{{- if .Values.prometheus.roleBinding.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
kind: {{ if .Values.prometheus.roleBinding.clusterRoleBinding }}ClusterRoleBinding{{ else }}RoleBinding{{ end }}
metadata:
name: {{ template "theodolite.fullname" . }}-prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
kind: {{ if .Values.prometheus.role.clusterRole }}ClusterRole{{ else }}Role{{ end }}
name: {{ template "theodolite.fullname" . }}-prometheus
subjects:
- kind: ServiceAccount
......
{{- if .Values.prometheus.role.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: {{ if .Values.prometheus.role.clusterRole }}ClusterRole{{ else }}Role{{ end }}
metadata:
name: {{ template "theodolite.fullname" . }}-prometheus
rules:
......@@ -14,4 +14,8 @@ rules:
resources:
- configmaps
verbs: ["get"]
{{- end}}
{{- if .Values.prometheus.role.clusterRole }}
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
{{- end }}
{{- end }}
......@@ -292,8 +292,10 @@ prometheus:
enabled: true
role:
enabled: true
clusterRole: false
roleBinding:
enabled: true
clusterRoleBinding: false
###
# Theodolite Operator
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment