From 07a965f4d5f1e399667ccbeaad3bfe78a2c31a43 Mon Sep 17 00:00:00 2001 From: Andreas Thaler Date: Tue, 24 Oct 2023 13:53:33 +0200 Subject: [PATCH] Add default persistence settings to prometheus example (#272) * Add minimalistic persistence settings to prometheus example * fix * fix --- kiali/README.md | 2 +- prometheus/README.md | 2 ++ prometheus/values.yaml | 50 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/kiali/README.md b/kiali/README.md index 132b9065..11811c57 100644 --- a/kiali/README.md +++ b/kiali/README.md @@ -81,7 +81,7 @@ To see the service communication visualized in Kiali, follow the instructions in If you use [Jaeger](https://www.jaegertracing.io/) for distributed tracing, Kiali can use your Jaeger instance to [provide traces](https://kiali.io/docs/features/tracing/). -For integration instructions, read [Kiali: Jaeger configuration](https://kiali.io/docs/configuration/p8s-jaeger-grafana/jaeger/). +For integration instructions, read [Kiali: Jaeger configuration](https://kiali.io/docs/configuration/p8s-jaeger-grafana/tracing/jaeger/). ### Integrate Grafana diff --git a/prometheus/README.md b/prometheus/README.md index f8d1c3e7..8bdb6c2b 100644 --- a/prometheus/README.md +++ b/prometheus/README.md @@ -59,6 +59,8 @@ The provided `values.yaml` covers the following adjustments: - Parallel operation to a Kyma monitoring stack - Client certificate injection to support scraping of workload secured with Istio strict mTLS - Active scraping of workload annotated with prometheus.io/scrape +- Basic configuration of data persistence with retention +- Basic resource limits for involved components ### Activate scraping of Istio metrics & Grafana dashboards diff --git a/prometheus/values.yaml b/prometheus/values.yaml index 4f3e610f..b18b20e0 100644 --- a/prometheus/values.yaml +++ b/prometheus/values.yaml @@ -7,6 +7,15 @@ prometheusOperator: kubeletService: enabled: false + # Define resource limits + resources: + requests: + cpu: "10m" + memory: "128Mi" + limits: + cpu: "500m" + memory: "1Gi" + # change the port of the node-exporter to be different from the one used by the Kyma monitoring stack prometheus-node-exporter: service: @@ -19,6 +28,15 @@ prometheus-node-exporter: kube-state-metrics: prometheusScrape: false + # Define resource limits + resources: + requests: + cpu: "10m" + memory: "128Mi" + limits: + cpu: "500m" + memory: "2Gi" + ####### This block disables control plane components which are not reachable from within the Gardener data plane # Disable scraping of etcd @@ -62,6 +80,30 @@ prometheus: - mountPath: /etc/prometheus/secrets/istio.default/ name: istio-certs +####### This block configures data retention and persistence + # How long to retain metrics + retention: 30d + + # Maximum size of metrics + retentionSize: 25GB + + # Use a persistent volume for durable storage of data + storageSpec: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 30Gi + + # Define resource limits + resources: + limits: + cpu: 1000m + memory: 4Gi + requests: + cpu: 125m + memory: 256m + ####### This block is needed to also use ServiceMonitors, which are not deployed as part of the chart # Disable required Helm release labels on ServiceMonitors @@ -185,6 +227,7 @@ prometheus: action: replace target_label: node +# Configures grafana with istio sidecar and alertmanage as additional datasource grafana: additionalDataSources: - name: Alertmanager @@ -201,3 +244,10 @@ grafana: runAsUser: 1337 podLabels: sidecar.istio.io/inject: "true" + serviceMonitor: + scheme: https + tlsConfig: + caFile: /etc/prometheus/secrets/istio.default/root-cert.pem + certFile: /etc/prometheus/secrets/istio.default/cert-chain.pem + insecureSkipVerify: true + keyFile: /etc/prometheus/secrets/istio.default/key.pem