diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 39e2cf03b5f7173da8d53c87e615946cce3951e9..77c839c06da7e4d978a55bd4c84fb3c98d5f6341 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -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 diff --git a/helm/preconfigs/extended-metrics.yaml b/helm/preconfigs/extended-metrics.yaml new file mode 100644 index 0000000000000000000000000000000000000000..be80ccba0b52aef889cebd3cd35e7bbccf09a3a9 --- /dev/null +++ b/helm/preconfigs/extended-metrics.yaml @@ -0,0 +1,28 @@ +### +# 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 diff --git a/helm/templates/grafana/dashboard-config-map.yaml b/helm/templates/grafana/dashboard-config-map.yaml index 459021213c1d4c746819ddabac790800b9a6ed09..9054ece8ca2fd94576d5dad3983054adbf4204a6 100644 --- a/helm/templates/grafana/dashboard-config-map.yaml +++ b/helm/templates/grafana/dashboard-config-map.yaml @@ -1,4 +1,4 @@ -{{- if .Values.grafana.enabled -}} +{{- if (index .Values "kube-prometheus-stack" "grafana" "enabled") -}} apiVersion: v1 kind: ConfigMap metadata: diff --git a/helm/templates/grafana/datasource-config-map.yaml b/helm/templates/grafana/datasource-config-map.yaml deleted file mode 100644 index b28157940c4dd7cb05eca3fe04926f6e7726830f..0000000000000000000000000000000000000000 --- a/helm/templates/grafana/datasource-config-map.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- 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 diff --git a/helm/templates/grafana/osp-dashboard-config-map.yaml b/helm/templates/grafana/osp-dashboard-config-map.yaml index 22685adf8e93d95614bdbb71ef6bc993a009a150..fc8140979ff2cedf2907ec896334c32bf8e24ce3 100644 --- a/helm/templates/grafana/osp-dashboard-config-map.yaml +++ b/helm/templates/grafana/osp-dashboard-config-map.yaml @@ -1,10 +1,10 @@ -{{- 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: |- {{`{ diff --git a/helm/values.yaml b/helm/values.yaml index f5af9bba4a4b4432a3c97d22e0fbc6ade9772de7..e06537842039bc655af1f842f5ac6b03806de3d3 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -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