-
Notifications
You must be signed in to change notification settings - Fork 4
/
values.yaml
387 lines (377 loc) · 16.2 KB
/
values.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
caas:
rbac:
# -- Whether to enable the RBAC resources
# -- Must be enabled if multiple namespaces are monitored
enabled: true
serviceAccount:
create: true
# -- The name of the serviceAccount to use for all components
name: project-monitoring
# -- List of additional namespaces where the project-monitoring
# -- should watch for custom resources - whitespace separated
# -- Example projectNamespaces: demoapp3 demoapp4
projectNamespaces: ""
grafana:
# -- Whether to deploy additional nginx.conf and dashboard for Grafana
configmaps: true
fullnameOverride: ""
nameOverride: ""
# -- Overrides the default namespace for CaaS related resources
# -- If not set, the namespace will be the same as the release namespace
namespaceOverride: ""
global:
cattle:
# -- Whether to set clusterId for Grafana, so its reachable via the Rancher proxy
# -- Not necessary in deployment via the Rancher UI App store
clusterId: ""
# -- The projectId is used a variable for the rancher UI installation
# -- or if you provide it here, it can be used as a default label for all resources
projectId: &projectId "p-xxxxx"
systemDefaultRegistry: ""
imageRegistry: mtr.devops.telekom.de
# Full set of values and pre-defined for CaaS
# ref: https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml
kube-prometheus-stack:
nameOverride: "project-monitoring"
fullnameOverride: "project-monitoring"
# -- Labels to add to all deployed resources
commonLabels:
field.cattle.io/projectId: *projectId
# Default rules for monitoring the namespaces of the
# rancher project
defaultRules:
# -- Whether to deploy the default rules
create: true
rules:
etcd: false
k8s: true
kubeApiserverAvailability: false
kubeApiserverBurnrate: false
kubeApiserverHistogram: false
kubeApiserverSlos: false
kubeControllerManager: false
kubelet: false
kubeProxy: false
kubePrometheusNodeRecording: false
kubeScheduler: false
node: false
nodeExporterAlerting: false
nodeExporterRecording: false
prometheusOperator: false
# -- Disabled PrometheusRule alerts
disabled:
KubeletDown: true
# Provide custom recording or alerting rules to be deployed into the cluster.
alertmanager:
config:
route:
routes:
- receiver: "null"
matchers:
- alertname =~ "InfoInhibitor|Watchdog"
serviceMonitor:
interval: "30s"
# @ignored
templateFiles:
# The default template copied
# from the rancher cluster monitoring
rancher_defaults.tmpl: "{{- define \"slack.rancher.text\" -}}\n #magic___^_^___line\n{{ template \"rancher.text_multiple\" . }}\n #magic___^_^___line\n{{- end -}}\n #magic___^_^___line\n{{- define \"webex.text_multiple\" -}}\n #magic___^_^___line\n{{- range .Alerts }}\n #magic___^_^___line\n{{ template \"webex.text_single\" . }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .ExternalURL }}\n #magic___^_^___line\nAlertManager: <{{ .ExternalURL }}>\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end -}}\n #magic___^_^___line\n{{- define \"webex.text_single\" -}}\n #magic___^_^___line\n{{- if .Labels.alertname }}\n #magic___^_^___line\n## [ALERT - {{ .Labels.alertname }}]\n #magic___^_^___line\n{{- else }}\n #magic___^_^___line\n## [ALERT]\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Labels.severity }}\n #magic___^_^___line\n### Severity: `{{ .Labels.severity }}`\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Labels.cluster }}\n #magic___^_^___line\n### Cluster: {{ .Labels.cluster }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.summary }}\n #magic___^_^___line\n### Summary: {{ .Annotations.summary }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.message }}\n #magic___^_^___line\nMessage: {{ .Annotations.message }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.description }}\n #magic___^_^___line\nDescription: {{ .Annotations.description }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.runbook_url }}\n #magic___^_^___line\nRunbook URL: <{{ .Annotations.runbook_url }}|:spiral_note_pad:>\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- with .Labels }}\n #magic___^_^___line\n{{- with .Remove (stringSlice \"alertname\" \"severity\" \"cluster\") }}\n #magic___^_^___line\n{{- if gt (len .) 0 }}\n #magic___^_^___line\nAdditional Labels:\n {{- range .SortedPairs }}\n • {{ .Name }}: `{{ .Value }}`\n {{- end }}\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- with .Annotations }}\n #magic___^_^___line\n{{- with .Remove (stringSlice \"summary\" \"message\" \"description\" \"runbook_url\") }}\n #magic___^_^___line\n{{- if gt (len .) 0 }}\n #magic___^_^___line\n## Additional Annotations:*\n {{- range .SortedPairs }}\n • {{ .Name }}: `{{ .Value }}`\n {{- end }}\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n #magic___^_^___line\n{{- end -}}\n #magic___^_^___line\n{{- define \"rancher.text_multiple\" -}}\n #magic___^_^___line\n*[GROUP - Details]* \n #magic___^_^___line\nOne or more alarms in this group have triggered a notification.\n #magic___^_^___line\n #magic___^_^___line\n{{- if gt (len .GroupLabels.Values) 0 }}\n #magic___^_^___line\n*Group Labels:*\n {{- range .GroupLabels.SortedPairs }}\n • *{{ .Name }}:* `{{ .Value }}`\n {{- end }}\n{{- end }}\n #magic___^_^___line\n{{- if .ExternalURL }}\n #magic___^_^___line\n*Link to AlertManager:* {{ .ExternalURL }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n #magic___^_^___line\n{{- range .Alerts }}\n #magic___^_^___line\n{{ template \"rancher.text_single\" . }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end -}}\n #magic___^_^___line\n #magic___^_^___line\n{{- define \"rancher.text_single\" -}}\n #magic___^_^___line\n{{- if .Labels.alertname }}\n #magic___^_^___line\n*[ALERT - {{ .Labels.alertname }}]*\n #magic___^_^___line\n{{- else }}\n #magic___^_^___line\n*[ALERT]*\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Labels.severity }}\n #magic___^_^___line\n*Severity:* `{{ .Labels.severity }}`\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Labels.cluster }}\n #magic___^_^___line\n*Cluster:* {{ .Labels.cluster }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.summary }}\n #magic___^_^___line\n*Summary:* {{ .Annotations.summary }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.message }}\n #magic___^_^___line\n*Message:* {{ .Annotations.message }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.description }}\n #magic___^_^___line\n*Description:* {{ .Annotations.description }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- if .Annotations.runbook_url }}\n #magic___^_^___line\n*Runbook URL:* <{{ .Annotations.runbook_url }}|:spiral_note_pad:>\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- with .Labels }}\n #magic___^_^___line\n{{- with .Remove (stringSlice \"alertname\" \"severity\" \"cluster\") }}\n #magic___^_^___line\n{{- if gt (len .) 0 }}\n #magic___^_^___line\n*Additional Labels:*\n {{- range .SortedPairs }}\n • *{{ .Name }}:* `{{ .Value }}`\n {{- end }}\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- with .Annotations }}\n #magic___^_^___line\n{{- with .Remove (stringSlice \"summary\" \"message\" \"description\" \"runbook_url\") }}\n #magic___^_^___line\n{{- if gt (len .) 0 }}\n #magic___^_^___line\n*Additional Annotations:*\n {{- range .SortedPairs }}\n • *{{ .Name }}:* `{{ .Value }}`\n {{- end }}\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end }}\n #magic___^_^___line\n{{- end -}}"
alertmanagerSpec:
alertmanagerConfigSelector:
matchExpressions:
- key: release
operator: NotIn
values:
- rancher-monitoring
alertmanagerConfigNamespaceSelector:
# -- The namespaceSelector to use for selecting AlertmanagerConfigs
# -- Default value is the project ID for the namespaces
# -- which belong to a rancher project
matchLabels:
"field.cattle.io/projectId": *projectId
image:
repository: kubeprometheusstack/alertmanager
resources:
limits:
memory: 750Mi
cpu: 800m
requests:
memory: 200Mi
cpu: 100m
securityContext:
fsGroup: 2000
supplementalGroups:
- 1000
global:
rbac:
create: false
grafana:
containerSecurityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 472
runAsGroup: 472
readOnlyRootFilesystem: true
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-operated:9090
access: proxy
isDefault: true
defaultDashboardsEnabled: false
extraContainers: |
- name: grafana-proxy
args:
- nginx
- -g
- daemon off;
- -c
- /nginx/nginx.conf
image: mtr.devops.telekom.de/kubeprometheusstack/nginx:1.23.2-alpine
ports:
- containerPort: 8080
name: nginx-http
protocol: TCP
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
runAsUser: 101
runAsGroup: 101
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /nginx
name: grafana-nginx
- mountPath: /var/cache/nginx
name: nginx-home
extraContainerVolumes:
- name: nginx-home
emptyDir: {}
- name: grafana-nginx
configMap:
name: nginx-proxy-config-project-monitoring-grafana
items:
- key: nginx.conf
mode: 438
path: nginx.conf
forceDeployDatasources: true
forceDeployDashboards: true
fullnameOverride: project-monitoring-grafana
grafana.ini:
analytics:
check_for_updates: false
users:
auto_assign_org_role: Viewer
auth:
disable_login_form: false
auth.anonymous:
enabled: true
org_role: Viewer
auth.basic:
enabled: false
security:
# -- Required to embed dashboards in Rancher Cluster Overview Dashboard on Cluster Explorer
allow_embedding: true
log:
level: info
image:
repository: kubeprometheusstack/grafana
initChownData:
enabled: false
nameOverride: project-monitoring-grafana
rbac:
create: false
namespaced: true
resources:
limits:
memory: 600Mi
cpu: 600m
requests:
memory: 200Mi
cpu: 200m
serviceAccount:
create: false
name: project-monitoring
securityContext:
fsGroup: 472
runAsUser: 472
runAsGroup: 472
supplementalGroups:
- 472
sidecar:
image:
repository: kubeprometheusstack/k8s-sidecar
resources:
limits:
cpu: 200m
memory: 300Mi
requests:
cpu: 50m
memory: 200Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsUser: 472
runAsGroup: 472
privileged: false
dashboards:
enabled: true
label: grafana_dashboard
labelValue: "1"
searchNamespace: ""
datasources:
defaultDatasourceEnabled: false
label: grafana_datasource
labelValue: "1"
serviceMonitor:
interval: "30s"
service:
portName: nginx-http
port: 80
targetPort: 8080
testFramework:
enabled: false
kubeApiServer:
enabled: false
kubelet:
enabled: false
kubeControllerManager:
enabled: false
coreDns:
enabled: false
kubeDns:
enabled: false
kubeEtcd:
enabled: false
kubeScheduler:
enabled: false
kubeProxy:
enabled: false
kubeStateMetrics:
enabled: false
kube-state-metrics:
rbac:
create: false
releaseLabel: false
prometheus:
monitor:
enabled: false
honorLabels: false
selfMonitor:
enabled: false
nodeExporter:
enabled: false
prometheus-node-exporter:
prometheus:
monitor:
enabled: false
releaseLabel: false
rbac:
pspEnabled: false
prometheusOperator:
enabled: false
prometheus:
enabled: true
prometheusSpec:
additionalScrapeConfigs:
- job_name: "federate"
scrape_interval: 30s
honor_labels: true
metrics_path: "/federate"
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
static_configs:
- targets:
- rancher-monitoring-prometheus.cattle-monitoring-system.svc:9091
params:
"match[]":
- '{__name__=~".+"}'
evaluationInterval: "30s"
image:
registry: mtr.devops.telekom.de
repository: kubeprometheusstack/prometheus
portName: "http-web"
podMonitorSelector:
matchExpressions:
- key: release
operator: NotIn
values:
- rancher-monitoring
podMonitorNamespaceSelector:
# -- The namespaceSelector to use for selecting PodMonitors
# -- Default value is the project ID for the namespaces
# -- which belong to a rancher project
matchLabels:
"field.cattle.io/projectId": *projectId
probeNamespaceSelector:
# -- The namespaceSelector to use for selecting Probes
# -- Default value is the project ID for the namespaces
# -- which belong to a rancher project
matchLabels:
"field.cattle.io/projectId": *projectId
resources:
limits:
memory: 1000Mi
cpu: 1000m
requests:
memory: 400Mi
cpu: 400m
retention: 10d
ruleNamespaceSelector:
# -- The namespaceSelector to use for selecting PrometheusRules
# -- Default value is the project ID for the namespaces
# -- which belong to a rancher project
matchLabels:
"field.cattle.io/projectId": *projectId
ruleSelector:
matchExpressions:
- key: release
operator: NotIn
values:
- rancher-monitoring
scrapeInterval: "30s"
scrapeTimeout: "10s"
securityContext:
fsGroup: 2000
supplementalGroups:
- 1000
serviceMonitorSelector:
matchExpressions:
- key: release
operator: NotIn
values:
- rancher-monitoring
serviceMonitorNamespaceSelector:
# -- The namespaceSelector to use for selecting ServiceMonitors
# -- Default value is the project ID for the namespaces
# -- which belong to a rancher project
matchLabels:
"field.cattle.io/projectId": *projectId
tsdb:
outOfOrderTimeWindow: 5m
serviceAccount:
create: false
# -- Uses serviceAccount for all components
# -- The name of the serviceAccount to use for all components
name: project-monitoring
serviceMonitor:
interval: "30s"
thanosRuler:
enabled: false