Skip to content

Commit

Permalink
Add default persistence settings to prometheus example (#272)
Browse files Browse the repository at this point in the history
* Add minimalistic persistence settings to prometheus example

* fix

* fix
  • Loading branch information
a-thaler authored Oct 24, 2023
1 parent 89a6c76 commit 07a965f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kiali/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
50 changes: 50 additions & 0 deletions prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -185,6 +227,7 @@ prometheus:
action: replace
target_label: node

# Configures grafana with istio sidecar and alertmanage as additional datasource
grafana:
additionalDataSources:
- name: Alertmanager
Expand All @@ -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

0 comments on commit 07a965f

Please sign in to comment.