/
values.yaml
4190 lines (3624 loc) · 134 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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Default values for kube-prometheus-stack.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Rancher Monitoring Configuration
## Configuration for prometheus-adapter
## ref: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-adapter
##
prometheus-adapter:
enabled: true
prometheus:
# Change this if you change the namespaceOverride or nameOverride of prometheus-operator
url: http://rancher-monitoring-prometheus.cattle-monitoring-system.svc
port: 9090
## RKE PushProx Monitoring
## ref: https://github.com/rancher/charts/tree/dev-v2.5-source/packages/rancher-pushprox
##
rkeControllerManager:
enabled: false
metricsPort: 10257 # default to secure port as of k8s >= 1.22
component: kube-controller-manager
clients:
https:
enabled: true
insecureSkipVerify: true
useServiceAccountCredentials: true
port: 10011
useLocalhost: true
nodeSelector:
node-role.kubernetes.io/controlplane: "true"
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeVersionOverrides:
- constraint: "< 1.22"
values:
metricsPort: 10252 # default to insecure port in k8s < 1.22
clients:
https:
enabled: false
insecureSkipVerify: false
useServiceAccountCredentials: false
rkeScheduler:
enabled: false
metricsPort: 10259
component: kube-scheduler
clients:
https:
enabled: true
insecureSkipVerify: true
useServiceAccountCredentials: true
port: 10012
useLocalhost: true
nodeSelector:
node-role.kubernetes.io/controlplane: "true"
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeVersionOverrides:
- constraint: "< 1.23"
values:
metricsPort: 10251 # default to insecure port in k8s < 1.23
clients:
https:
enabled: false
insecureSkipVerify: false
useServiceAccountCredentials: false
rkeProxy:
enabled: false
metricsPort: 10249
component: kube-proxy
clients:
port: 10013
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
rkeEtcd:
enabled: false
metricsPort: 2379
component: kube-etcd
clients:
port: 10014
https:
enabled: true
certDir: /etc/kubernetes/ssl
certFile: kube-etcd-*.pem
keyFile: kube-etcd-*-key.pem
caCertFile: kube-ca.pem
seLinuxOptions:
# Gives rkeEtcd permissions to read files in /etc/kubernetes/*
# Type is defined in https://github.com/rancher/rancher-selinux
type: rke_kubereader_t
nodeSelector:
node-role.kubernetes.io/etcd: "true"
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
rkeIngressNginx:
enabled: false
metricsPort: 10254
component: ingress-nginx
clients:
port: 10015
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
nodeSelector:
node-role.kubernetes.io/worker: "true"
## k3s PushProx Monitoring
## ref: https://github.com/rancher/charts/tree/dev-v2.5-source/packages/rancher-pushprox
##
k3sServer:
enabled: false
metricsPort: 10250
component: k3s-server
clients:
port: 10013
useLocalhost: true
https:
enabled: true
useServiceAccountCredentials: true
insecureSkipVerify: true
rbac:
additionalRules:
- nonResourceURLs: ["/metrics/cadvisor"]
verbs: ["get"]
- apiGroups: [""]
resources: ["nodes/metrics"]
verbs: ["get"]
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
serviceMonitor:
endpoints:
- port: metrics
honorLabels: true
relabelings:
- sourceLabels: [__metrics_path__]
targetLabel: metrics_path
- port: metrics
path: /metrics/cadvisor
honorLabels: true
relabelings:
- sourceLabels: [__metrics_path__]
targetLabel: metrics_path
- port: metrics
path: /metrics/probes
honorLabels: true
relabelings:
- sourceLabels: [__metrics_path__]
targetLabel: metrics_path
## KubeADM PushProx Monitoring
## ref: https://github.com/rancher/charts/tree/dev-v2.5-source/packages/rancher-pushprox
##
kubeAdmControllerManager:
enabled: false
metricsPort: 10257
component: kube-controller-manager
clients:
port: 10011
useLocalhost: true
https:
enabled: true
useServiceAccountCredentials: true
insecureSkipVerify: true
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeAdmScheduler:
enabled: false
metricsPort: 10259
component: kube-scheduler
clients:
port: 10012
useLocalhost: true
https:
enabled: true
useServiceAccountCredentials: true
insecureSkipVerify: true
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeAdmProxy:
enabled: false
metricsPort: 10249
component: kube-proxy
clients:
port: 10013
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeAdmEtcd:
enabled: false
metricsPort: 2381
component: kube-etcd
clients:
port: 10014
useLocalhost: true
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
## rke2 PushProx Monitoring
## ref: https://github.com/rancher/charts/tree/dev-v2.5-source/packages/rancher-pushprox
##
rke2ControllerManager:
enabled: false
metricsPort: 10257 # default to secure port as of k8s >= 1.22
component: kube-controller-manager
clients:
https:
enabled: true
insecureSkipVerify: true
useServiceAccountCredentials: true
port: 10011
useLocalhost: true
nodeSelector:
node-role.kubernetes.io/master: "true"
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeVersionOverrides:
- constraint: "< 1.22"
values:
metricsPort: 10252 # default to insecure port in k8s < 1.22
clients:
https:
enabled: false
insecureSkipVerify: false
useServiceAccountCredentials: false
rke2Scheduler:
enabled: false
metricsPort: 10259 # default to secure port as of k8s >= 1.22
component: kube-scheduler
clients:
https:
enabled: true
insecureSkipVerify: true
useServiceAccountCredentials: true
port: 10012
useLocalhost: true
nodeSelector:
node-role.kubernetes.io/master: "true"
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
kubeVersionOverrides:
- constraint: "< 1.22"
values:
metricsPort: 10251 # default to insecure port in k8s < 1.22
clients:
https:
enabled: false
insecureSkipVerify: false
useServiceAccountCredentials: false
rke2Proxy:
enabled: false
metricsPort: 10249
component: kube-proxy
clients:
port: 10013
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
rke2Etcd:
enabled: false
metricsPort: 2381
component: kube-etcd
clients:
port: 10014
useLocalhost: true
nodeSelector:
node-role.kubernetes.io/etcd: "true"
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
rke2IngressNginx:
enabled: false
metricsPort: 10254
component: ingress-nginx
# in the RKE2 cluster, the ingress-nginx-controller is deployed
# as a non-hostNetwork workload starting at the following versions
# - >= v1.22.12+rke2r1 < 1.23.0-0
# - >= v1.23.9+rke2r1 < 1.24.0-0
# - >= v1.24.3+rke2r1 < 1.25.0-0
# - >= v1.25.0+rke2r1
# As a result we do not need clients and proxies as we can directly create
# a service that targets the workload with the given app name
namespaceOverride: kube-system
clients:
enabled: false
proxy:
enabled: false
service:
selector:
app.kubernetes.io/name: rke2-ingress-nginx
kubeVersionOverrides:
- constraint: "< 1.21.0-0"
values:
namespaceOverride: ""
clients:
enabled: true
port: 10015
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/component"
operator: "In"
values:
- "controller"
topologyKey: "kubernetes.io/hostname"
namespaces:
- "kube-system"
# in the RKE2 cluster, the ingress-nginx-controller is deployed as
# a DaemonSet with 1 pod when RKE2 version is < 1.21.0-0
deployment:
enabled: false
proxy:
enabled: true
service:
selector: false
- constraint: ">= 1.21.0-0 < 1.22.12-0"
values:
namespaceOverride: ""
clients:
enabled: true
port: 10015
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/component"
operator: "In"
values:
- "controller"
topologyKey: "kubernetes.io/hostname"
namespaces:
- "kube-system"
# in the RKE2 cluster, the ingress-nginx-controller is deployed as
# a hostNetwork Deployment with 1 pod when RKE2 version is >= 1.21.0-0
deployment:
enabled: true
replicas: 1
proxy:
enabled: true
service:
selector: false
- constraint: ">= 1.23.0-0 < v1.23.9-0"
values:
namespaceOverride: ""
clients:
enabled: true
port: 10015
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/component"
operator: "In"
values:
- "controller"
topologyKey: "kubernetes.io/hostname"
namespaces:
- "kube-system"
# in the RKE2 cluster, the ingress-nginx-controller is deployed as
# a hostNetwork Deployment with 1 pod when RKE2 version is >= 1.20.0-0
deployment:
enabled: true
replicas: 1
proxy:
enabled: true
service:
selector: false
- constraint: ">= 1.24.0-0 < v1.24.3-0"
values:
namespaceOverride: ""
clients:
enabled: true
port: 10015
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/component"
operator: "In"
values:
- "controller"
topologyKey: "kubernetes.io/hostname"
namespaces:
- "kube-system"
# in the RKE2 cluster, the ingress-nginx-controller is deployed as
# a hostNetwork Deployment with 1 pod when RKE2 version is >= 1.20.0-0
deployment:
enabled: true
replicas: 1
proxy:
enabled: true
service:
selector: false
## Additional PushProx Monitoring
## ref: https://github.com/rancher/charts/tree/dev-v2.5-source/packages/rancher-pushprox
##
# hardenedKubelet can only be deployed if kubelet.enabled=true
# If enabled, it replaces the ServiceMonitor deployed by the default kubelet option with a
# PushProx-based exporter that does not require a host port to be open to scrape metrics.
hardenedKubelet:
enabled: false
metricsPort: 10250
component: kubelet
clients:
port: 10015
useLocalhost: true
https:
enabled: true
useServiceAccountCredentials: true
insecureSkipVerify: true
rbac:
additionalRules:
- nonResourceURLs: ["/metrics/cadvisor"]
verbs: ["get"]
- apiGroups: [""]
resources: ["nodes/metrics"]
verbs: ["get"]
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
serviceMonitor:
endpoints:
- port: metrics
honorLabels: true
relabelings:
- sourceLabels: [__metrics_path__]
targetLabel: metrics_path
- port: metrics
path: /metrics/cadvisor
honorLabels: true
relabelings:
- sourceLabels: [__metrics_path__]
targetLabel: metrics_path
- port: metrics
path: /metrics/probes
honorLabels: true
relabelings:
- sourceLabels: [__metrics_path__]
targetLabel: metrics_path
# hardenedNodeExporter can only be deployed if nodeExporter.enabled=true
# If enabled, it replaces the ServiceMonitor deployed by the default nodeExporter with a
# PushProx-based exporter that does not require a host port to be open to scrape metrics.
hardenedNodeExporter:
enabled: false
metricsPort: 9796
component: node-exporter
clients:
port: 10016
useLocalhost: true
tolerations:
- effect: "NoExecute"
operator: "Exists"
- effect: "NoSchedule"
operator: "Exists"
## Upgrades
upgrade:
## Run upgrade scripts before an upgrade or rollback via a Job hook
enabled: true
## Image to use to run the scripts
image:
repository: rancher/shell
tag: v0.1.19
## Rancher Monitoring
##
rancherMonitoring:
enabled: true
## A namespaceSelector to identify the namespace to find the Rancher deployment
##
namespaceSelector:
matchNames:
- cattle-system
## A selector to identify the Rancher deployment
## If not set, the chart will try to search for the Rancher deployment in the cattle-system namespace and infer the selector values from it
## If the Rancher deployment does not exist, no resources will be deployed.
##
selector: {}
## Component scraping nginx-ingress-controller
##
ingressNginx:
enabled: false
## The namespace to search for your nginx-ingress-controller
##
namespace: ingress-nginx
service:
port: 9913
targetPort: 10254
# selector:
# app: ingress-nginx
serviceMonitor:
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: "30s"
## proxyUrl: URL of a proxy that should be used for scraping.
##
proxyUrl: ""
## metric relabel configs to apply to samples before ingestion.
##
metricRelabelings: []
# - action: keep
# regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
# sourceLabels: [__name__]
# relabel configs to apply to samples before ingestion.
##
relabelings: []
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
# regex: ^(.*)$
# targetLabel: nodename
# replacement: $1
# action: replace
# Prometheus Operator Configuration
## Provide a name in place of kube-prometheus-stack for `app:` labels
## NOTE: If you change this value, you must update the prometheus-adapter.prometheus.url
##
nameOverride: "rancher-monitoring"
## Override the deployment namespace
## NOTE: If you change this value, you must update the prometheus-adapter.prometheus.url
##
namespaceOverride: "cattle-monitoring-system"
## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6
##
kubeTargetVersionOverride: ""
## Allow kubeVersion to be overridden while creating the ingress
##
kubeVersionOverride: ""
## Provide a name to substitute for the full names of resources
##
fullnameOverride: ""
## Labels to apply to all resources
##
commonLabels: {}
# scmhash: abc123
# myLabel: aakkmd
## Create default rules for monitoring the cluster
##
defaultRules:
create: true
rules:
alertmanager: true
etcd: true
configReloaders: true
general: true
k8s: true
kubeApiserverAvailability: true
kubeApiserverBurnrate: true
kubeApiserverHistogram: true
kubeApiserverSlos: true
kubeControllerManager: true
kubelet: true
kubeProxy: true
kubePrometheusGeneral: true
kubePrometheusNodeRecording: true
kubernetesApps: true
kubernetesResources: true
kubernetesStorage: true
kubernetesSystem: true
kubeScheduler: true
kubeStateMetrics: true
network: true
node: true
nodeExporterAlerting: true
nodeExporterRecording: true
prometheus: true
prometheusOperator: true
## Reduce app namespace alert scope
appNamespacesTarget: ".*"
## Labels for default rules
labels: {}
## Annotations for default rules
annotations: {}
## Additional labels for PrometheusRule alerts
additionalRuleLabels: {}
## Additional annotations for PrometheusRule alerts
additionalRuleAnnotations: {}
## Prefix for runbook URLs. Use this to override the first part of the runbookURLs that is common to all rules.
runbookUrl: "https://runbooks.prometheus-operator.dev/runbooks"
## Disabled PrometheusRule alerts
disabled: {}
# KubeAPIDown: true
# NodeRAIDDegraded: true
## Deprecated way to provide custom recording or alerting rules to be deployed into the cluster.
##
# additionalPrometheusRules: []
# - name: my-rule-file
# groups:
# - name: my_group
# rules:
# - record: my_record
# expr: 100 * my_record
## Provide custom recording or alerting rules to be deployed into the cluster.
##
additionalPrometheusRulesMap: {}
# rule-name:
# groups:
# - name: my_group
# rules:
# - record: my_record
# expr: 100 * my_record
##
global:
cattle:
psp:
enabled: false
systemDefaultRegistry: ""
## Windows Monitoring
## ref: https://github.com/rancher/charts/tree/dev-v2.5-source/packages/rancher-windows-exporter
##
## Deploys a DaemonSet of Prometheus exporters based on https://github.com/prometheus-community/windows_exporter.
## Every Windows host must have a wins version of 0.1.0+ to use this chart (default as of Rancher 2.5.8).
## To upgrade wins versions on Windows hosts, see https://github.com/rancher/wins/tree/master/charts/rancher-wins-upgrader.
##
windows:
enabled: false
seLinux:
enabled: false
kubectl:
repository: rancher/kubectl
tag: v1.20.2
pullPolicy: IfNotPresent
rbac:
## Create RBAC resources for ServiceAccounts and users
##
create: true
userRoles:
## Create default user ClusterRoles to allow users to interact with Prometheus CRs, ConfigMaps, and Secrets
create: true
## Aggregate default user ClusterRoles into default k8s ClusterRoles
aggregateToDefaultRoles: true
pspAnnotations: {}
## Specify pod annotations
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
##
# seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
# seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
# apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
## Reference to one or more secrets to be used when pulling images
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
imagePullSecrets: []
# - name: "image-pull-secret"
# or
# - "image-pull-secret"
## Configuration for alertmanager
## ref: https://prometheus.io/docs/alerting/alertmanager/
##
alertmanager:
## Deploy alertmanager
##
enabled: true
## Annotations for Alertmanager
##
annotations: {}
## Api that prometheus will use to communicate with alertmanager. Possible values are v1, v2
##
apiVersion: v2
## Service account for Alertmanager to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
create: true
name: ""
annotations: {}
## Configure pod disruption budgets for Alertmanager
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
## This configuration is immutable once created and will require the PDB to be deleted to be changed
## https://github.com/kubernetes/kubernetes/issues/45398
##
podDisruptionBudget:
enabled: false
minAvailable: 1
maxUnavailable: ""
## Alertmanager configuration directives
## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file
## https://prometheus.io/webtools/alerting/routing-tree-editor/
##
config:
global:
resolve_timeout: 5m
inhibit_rules:
- source_matchers:
- 'severity = critical'
target_matchers:
- 'severity =~ warning|info'
equal:
- 'namespace'
- 'alertname'
- source_matchers:
- 'severity = warning'
target_matchers:
- 'severity = info'
equal:
- 'namespace'
- 'alertname'
- source_matchers:
- 'alertname = InfoInhibitor'
target_matchers:
- 'severity = info'
equal:
- 'namespace'
route:
group_by: ['namespace']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- receiver: 'null'
matchers:
- alertname =~ "InfoInhibitor|Watchdog"
receivers:
- name: 'null'
templates:
- '/etc/alertmanager/config/*.tmpl'
## Pass the Alertmanager configuration directives through Helm's templating
## engine. If the Alertmanager configuration contains Alertmanager templates,
## they'll need to be properly escaped so that they are not interpreted by
## Helm
## ref: https://helm.sh/docs/developing_charts/#using-the-tpl-function
## https://prometheus.io/docs/alerting/configuration/#tmpl_string
## https://prometheus.io/docs/alerting/notifications/
## https://prometheus.io/docs/alerting/notification_examples/
tplConfig: false
## Alertmanager template files to format alerts
## By default, templateFiles are placed in /etc/alertmanager/config/ and if
## they have a .tmpl file suffix will be loaded. See config.templates above
## to change, add other suffixes. If adding other suffixes, be sure to update
## config.templates above to include those suffixes.
## ref: https://prometheus.io/docs/alerting/notifications/
## https://prometheus.io/docs/alerting/notification_examples/
##
templateFiles:
rancher_defaults.tmpl: |-
{{- define "slack.rancher.text" -}}
{{ template "rancher.text_multiple" . }}
{{- end -}}
{{- define "rancher.text_multiple" -}}
*[GROUP - Details]*
One or more alarms in this group have triggered a notification.
{{- if gt (len .GroupLabels.Values) 0 }}
*Group Labels:*
{{- range .GroupLabels.SortedPairs }}
• *{{ .Name }}:* `{{ .Value }}`
{{- end }}
{{- end }}
{{- if .ExternalURL }}
*Link to AlertManager:* {{ .ExternalURL }}
{{- end }}
{{- range .Alerts }}
{{ template "rancher.text_single" . }}
{{- end }}
{{- end -}}
{{- define "rancher.text_single" -}}
{{- if .Labels.alertname }}
*[ALERT - {{ .Labels.alertname }}]*
{{- else }}
*[ALERT]*
{{- end }}
{{- if .Labels.severity }}
*Severity:* `{{ .Labels.severity }}`
{{- end }}
{{- if .Labels.cluster }}
*Cluster:* {{ .Labels.cluster }}
{{- end }}
{{- if .Annotations.summary }}
*Summary:* {{ .Annotations.summary }}
{{- end }}
{{- if .Annotations.message }}
*Message:* {{ .Annotations.message }}
{{- end }}
{{- if .Annotations.description }}
*Description:* {{ .Annotations.description }}
{{- end }}
{{- if .Annotations.runbook_url }}
*Runbook URL:* <{{ .Annotations.runbook_url }}|:spiral_note_pad:>
{{- end }}
{{- with .Labels }}
{{- with .Remove (stringSlice "alertname" "severity" "cluster") }}
{{- if gt (len .) 0 }}
*Additional Labels:*
{{- range .SortedPairs }}
• *{{ .Name }}:* `{{ .Value }}`
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Annotations }}
{{- with .Remove (stringSlice "summary" "message" "description" "runbook_url") }}
{{- if gt (len .) 0 }}
*Additional Annotations:*
{{- range .SortedPairs }}
• *{{ .Name }}:* `{{ .Value }}`
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
ingress:
enabled: false
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
# ingressClassName: nginx
annotations: {}
labels: {}
## Redirect ingress to an additional defined port on the service
# servicePort: 8081
## Hosts must be provided if Ingress is enabled.
##
hosts: []
# - alertmanager.domain.com
## Paths to use for ingress rules - one path should match the alertmanagerSpec.routePrefix
##
paths: []
# - /
## For Kubernetes >= 1.18 you should specify the pathType (determines how Ingress paths should be matched)
## See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#better-path-matching-with-path-types
# pathType: ImplementationSpecific
## TLS configuration for Alertmanager Ingress
## Secret must be manually created in the namespace
##
tls: []
# - secretName: alertmanager-general-tls
# hosts:
# - alertmanager.example.com
## Configuration for Alertmanager secret
##
secret:
annotations: {}
## Configuration for creating an Ingress that will map to each Alertmanager replica service
## alertmanager.servicePerReplica must be enabled
##
ingressPerReplica:
enabled: false
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
# ingressClassName: nginx
annotations: {}
labels: {}
## Final form of the hostname for each per replica ingress is
## {{ ingressPerReplica.hostPrefix }}-{{ $replicaNumber }}.{{ ingressPerReplica.hostDomain }}
##
## Prefix for the per replica ingress that will have `-$replicaNumber`
## appended to the end
hostPrefix: ""
## Domain that will be used for the per replica ingress