-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathprometheus-adapter.yaml
93 lines (87 loc) · 2.62 KB
/
prometheus-adapter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
apiVersion: v1
kind: Namespace
metadata:
name: "prometheus"
labels:
name: "prometheus"
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: prometheus
namespace: argocd
labels:
name: prometheus
spec:
project: default
source:
# chart: prometheus-community/prometheus
chart: prometheus
repoURL: https://prometheus-community.github.io/helm-charts
targetRevision: 15.18.0
helm:
values: |
server:
# extraArgs:
# storage.tsdb.max-block-duration: 4h
# storage.tsdb.min-block-duration: 2h
# storage.tsdb.retention.time: 8h
resources:
limits:
cpu: 1000m
memory: 16000Mi
requests:
cpu: 500m
memory: 10240Mi
# Destination cluster and namespace to deploy the application
destination:
namespace: prometheus
server: https://kubernetes.default.svc
# keep in sync
syncPolicy:
automated:
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ).
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: prometheus-adapter
namespace: argocd
labels:
name: prometheus-adapter
spec:
project: default
source:
# chart: prometheus-community/prometheus-adapter
chart: prometheus-adapter
repoURL: https://prometheus-community.github.io/helm-charts
targetRevision: 3.4.2
helm:
values: |
prometheus:
url: http://prometheus-server.prometheus
port: 80
rules:
custom:
- seriesQuery: 'http_connections{pod!="",namespace!=""}'
resources:
overrides:
namespace:
resource: "namespace"
pod:
resource: "pod"
name:
matches: ""
as: "http_connections"
metricsQuery: avg(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>)
# Destination cluster and namespace to deploy the application
destination:
namespace: prometheus
server: https://kubernetes.default.svc
# keep in sync
syncPolicy:
automated:
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ).