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

Update Prometheus stack

* Use Grafana from kube-prometheus-stack instead of own subchart
* Allow for using Prometheus from kube-prometheus-stack for full-stack monitoring
* Provide a Helm values file for full-stack monitoring
* This includes Kubernetes metrics exporters and dashboards
parent 23d8f1b1
No related branches found
No related tags found
No related merge requests found
Pipeline #9992 passed
......@@ -14,15 +14,15 @@ type: application
dependencies:
- name: grafana
version: 6.17.5
version: 6.17.*
repository: https://grafana.github.io/helm-charts
condition: grafana.enabled
- name: kube-prometheus-stack
version: 20.0.1
version: 41.7.*
repository: https://prometheus-community.github.io/helm-charts
condition: kube-prometheus-stack.enabled
- name: strimzi-kafka-operator
version: 0.29.0
version: 0.29.*
repository: https://strimzi.io/charts/
condition: strimzi.enabled
......
###
# Prometheus Monitoring Stack (Prometheus Operator)
###
kube-prometheus-stack:
global:
rbac:
create: true # enable for full-stack monitoring
grafana:
defaultDashboardsEnabled: true
kubelet:
enabled: true
kubeDns:
enabled: true
kubeStateMetrics:
enabled: true
nodeExporter:
enabled: true
prometheus:
enabled: true # Use built-in Prometheus
prometheus:
enabled: false # Use built-in Prometheus
{{- if .Values.grafana.enabled -}}
{{- if (index .Values "kube-prometheus-stack" "grafana" "enabled") -}}
apiVersion: v1
kind: ConfigMap
metadata:
......
{{- if .Values.grafana.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "theodolite.fullname" . }}-prometheus
labels:
grafana_datasource: "1"
data:
datasource.yaml: |-
# config file version
apiVersion: 1
datasources:
# <string, required> name of the datasource. Required
- name: Prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
access: proxy
# <bool> mark as default datasource. Max one per org
isDefault: true
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://prometheus-operated:9090 #http://localhost:9090
# <map> fields that will be converted to json and stored in json_data
jsonData:
timeInterval: "15s"
version: 1
# <bool> allow users to edit datasources from the UI.
editable: true
{{- end }}
\ No newline at end of file
{{- if .Values.grafana.enabled -}}
{{- if (index .Values "kube-prometheus-stack" "grafana" "enabled") -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "theodolite.fullname" . }}-grafana-scalability-osp
labels:
grafana_dashboard: "2"
grafana_dashboard: "1"
data:
osp-dashboard.json: |-
{{`{
......
......@@ -15,46 +15,8 @@ kafkaClient:
# Grafana
###
grafana:
enabled: true
nodeSelector: {}
image:
repository: grafana/grafana
tag: 6.7.3
pullPolicy: IfNotPresent
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
adminPassword: admin
grafana.ini:
#org_name: Theodolite
auth.anonymous:
# enable anonymous access
enabled: true
org_role: Admin # Role for unauthenticated users, other valid values are `Viewer`, `Editor` and `Admin`
users:
default_theme: light
#dashboards: # the following doesn't work but is planed
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
#default_home_dashboard_path: "/tmp/dashboards/k8s-dashboard.json"
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
sidecar:
image:
repository: "kiwigrid/k8s-sidecar"
tag: "0.1.99"
imagePullPolicy: IfNotPresent
dashboards:
enabled: true
provider:
# allow updating provisioned dashboards from the UI
allowUiUpdates: true
datasources:
enabled: true
service:
nodePort: 31199
type: NodePort
rbac:
pspEnabled: false
namespaced: true
enabled: false
###
......@@ -123,16 +85,45 @@ strimzi:
kube-prometheus-stack:
global:
rbac:
create: false
commonLabels:
appScope: titan-ccp
create: false # enable for full-stack monitoring
alertmanager:
enabled: false
grafana:
enabled: false
enabled: true
nodeSelector: {}
defaultDashboardsEnabled: false
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
adminPassword: admin
grafana.ini:
#org_name: Theodolite
auth.anonymous:
# enable anonymous access
enabled: true
org_role: Admin # Role for unauthenticated users, other valid values are `Viewer`, `Editor` and `Admin`
users:
default_theme: light
#dashboards: # the following doesn't work but is planed
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
#default_home_dashboard_path: "/tmp/dashboards/k8s-dashboard.json"
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
sidecar:
dashboards:
enabled: true
provider:
# allow updating provisioned dashboards from the UI
allowUiUpdates: true
datasources:
enabled: true
url: http://prometheus-operated:9090/
service:
nodePort: 31199
type: NodePort
rbac:
namespaced: true
kubeApiServer:
enabled: false
......@@ -177,13 +168,22 @@ kube-prometheus-stack:
serviceAccount:
create: true
# We use our own Prometheus
prometheus:
enabled: false
enabled: false # Default is using our own Prometheus
prometheusSpec:
serviceMonitorSelectorNilUsesHelmValues: false # Select all service monitors
podMonitorSelectorNilUsesHelmValues: false # Select all pod monitors
probeSelectorNilUsesHelmValues: false # Select all pod monitors
ruleSelectorNilUsesHelmValues: false # Select all pod monitors
resources:
requests:
memory: 400Mi
scrapeInterval: 15s
enableAdminAPI: true
###
# Prometheus
# Theodolite's custom Prometheus
###
prometheus:
enabled: true
......
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