-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvalues.yaml
655 lines (639 loc) · 22.7 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
# Default values for CLOPS-helm.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
domain: your.doma.in
# Kube-Prometheus-Stack Config
kube-prometheus-stack:
# -- Enable the whole component
enabled: true
# -- Override the full names of all resources
fullnameOverride: prometheus-stack
# Disable grafana, so we can deploy it by our conditions
grafana:
enabled: false
# Flag to disable all the kubernetes component scrapers
kubernetesServiceMonitors:
enabled: true
# Create default rules for monitoring the cluster
defaultRules:
# Labels for default rules
labels:
role: alert-rules
# Alertmanager Config
alertmanager:
# -- Enable PDB for the alertmanager
podDisruptionBudget:
enabled: true
# Alertmanager ingress configuration
extraSecret:
# -- If not set, name will be auto generated
name: "alertmanager-basic-auth"
data:
# -- generated with htpasswd (PLEASE CHANGE!)
auth: "alertadmin:$apr1$LN5vrqsG$SUjL9IbnRsUOTjUlrP2LL/" # alertadmin:alertpw
ingress:
# -- Specifies whether an ingress should be created
enabled: true
# -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
ingressClassName: nginx
# -- Annotations for the ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/tls-acme: "true"
# -- Enable Basic Auth
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: alertmanager-basic-auth
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
# -- Hosts configuration for the ingress
hosts:
- "alertmanager.{{ .Values.global.domain }}"
# -- TLS configuration for the ingress
tls:
- secretName: alertmanager-general-tls
hosts:
- "alertmanager.{{ .Values.global.domain }}"
alertmanagerSpec:
# -- Number of alertmanager replicas
replicas: 2
# -- The external URL the Alertmanager instances will be available under
externalUrl: "https://alertmanager.{{ .Values.global.domain }}"
# -- TODO: OAUTH
containers: []
# KubeControllerManager Config
kubeControllerManager:
service:
# -- define port
port: 10257
targetPort: 10257
selector:
component: kube-controller-manager
tier: control-plane
# KubeControllerManager service monitor configuration
serviceMonitor:
https: true
insecureSkipVerify: true
# KubeScheduler Config
kubeScheduler:
service:
# -- define port
port: 10259
targetPort: 10259
# KubeScheduler service monitor configuration
serviceMonitor:
https: true
insecureSkipVerify: true
# KubeProxy Config
kubeProxy:
# -- Specifies whether the kubeProxy scraping should be enabled
enabled: false
# Kube-state-metrics Config
kube-state-metrics:
# -- Override the full names of all resources
fullnameOverride: prometheus-kube-state-metrics
# Prometheus-Node-Exporter Config
prometheus-node-exporter:
# -- Override the full names of all resources
fullnameOverride: prometheus-node-exporter
extraArgs:
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
- --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
- --collector.textfile
- --collector.textfile.directory=/var/lib/node_exporter
extraHostVolumeMounts:
- name: var-lib-node-exporter
hostPath: /var/lib/node_exporter
mountPath: /var/lib/node_exporter
readOnly: true
# PrometheusOperator Config
prometheusOperator:
# -- TLS configuration (do not change: https://github.com/helm/charts/issues/21080#issuecomment-596958610)
tls:
enabled: false
# -- TLS proxy configuration (do not change: https://github.com/helm/charts/issues/21080#issuecomment-596958610)
tlsProxy:
enabled: false
# -- Admission webhooks configuration (do not change: https://github.com/helm/charts/issues/21080#issuecomment-596958610)
admissionWebhooks:
enabled: false
# -- Define failure policy
failurePolicy: Ignore
# -- (do not change: https://github.com/helm/charts/issues/21080#issuecomment-596958610)
patch:
enabled: false
# Prometheus Config
prometheus:
service:
# targetPort: 4180 # used for OauthProxContainer (Keycloak)
targetPort: 9090
# -- Additional ports for the service
additionalPorts:
- name: prometheus
port: 9191
protocol: TCP
targetPort: 9090
# -- Enable PDB for prometheus
podDisruptionBudget:
enabled: true
# -- Set Basic Auth Secret
extraSecret:
# -- If not set, name will be auto generated
name: "prometheus-basic-auth"
data:
# -- generated with htpasswd (PLEASE CHANGE!)
auth: "promadmin:$apr1$e8kSmViA$It4clhTmgAybWtl47J9Ud." # promadmin:prompw
# Prometheus ingress configuration
ingress:
# -- Specifies whether an ingress should be created
enabled: true
# -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
ingressClassName: nginx
# -- Annotations for the ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/tls-acme: "true"
# -- Enable Basic Auth
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: prometheus-basic-auth
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
# -- Hosts configuration for the ingress
hosts:
- "prometheus.{{ .Values.global.domain }}"
# -- TLS configuration for the ingress
tls:
- secretName: prometheus-general-tls
hosts:
- "prometheus.{{ .Values.global.domain }}"
prometheusSpec:
# -- enable --web.enable-remote-write-receiver flag on prometheus-server
enableRemoteWriteReceiver: true
# -- The external URL prometheus will be available under
externalUrl: "https://prometheus.{{ .Values.global.domain }}"
ruleSelectorNilUsesHelmValues: false
# -- PrometheusRules to be selected for target discovery
ruleSelector:
matchLabels:
role: alert-rules
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: false
# -- How long to retain metrics
retention: 7d
## Enable compression of the write-ahead log using Snappy
walCompression: false
# -- Number of prometheus replicas
replicas: 2
# Resource limits & requests
resources:
requests:
memory: 400Mi
# Metrics-Server Config
metrics-server:
# -- Enable the whole component
enabled: true
# -- Override the full names of all resources
fullnameOverride: metrics-server
# -- Number of metrics-server replicas
replicas: 2
# ServiceMonitor configuration
serviceMonitor:
enabled: true
defaultArgs:
- --cert-dir=/tmp
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --metric-resolution=15s
# Needed. See this issue: https://github.com/kubernetes-sigs/metrics-server/issues/1221
- --kubelet-insecure-tls
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- metrics-server
topologyKey: kubernetes.io/hostname
# Grafana Config
grafana:
# -- Enable the whole component
enabled: true
# -- Override the full names of all resources
fullnameOverride: grafana
# Default grafana login credentials
adminUser: grafanaAdmin
adminPassword: superSecretPassword
# ServiceMonitor configuration
serviceMonitor:
enabled: true
# Grafana ingress configuration
ingress:
# -- Specifies whether an ingress should be created
enabled: true
# -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
ingressClassName: nginx
# -- Annotations for the ingress
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/tls-acme: "true"
# -- Hosts configuration for the ingress
hosts:
- grafana.your.doma.in
# -- TLS configuration for the ingress
tls:
- hosts:
- grafana.your.doma.in
secretName: grafana-ingress-tls
# Storage configuration
persistence:
# -- Specifies whether the storage should be enabled
enabled: false
# storageClassName: default
size: 15Gi
# Data source configuration
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: "http://prometheus-stack-prometheus.{{ .Release.Namespace }}.svc:9090"
isDefault: true
- name: Loki
type: loki
url: "http://loki-gateway.{{ .Release.Namespace }}.svc:80"
isDefault: false
basicAuth: true
basicAuthUser: testloki
jsonData:
httpHeaderName1: X-Scope-OrgID
secureJsonData:
basicAuthPassword: testlokipassword
httpHeaderValue1: "1"
withCredentials: true
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: "default"
orgId: 1
folder: ""
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
- name: "prometheus"
orgId: 1
folder: "Prometheus"
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/prometheus
- name: "kubernetes"
orgId: 1
folder: "Kubernetes"
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/kubernetes
dashboards:
default: {} # add custom dashboards once they are public
prometheus:
blackbox-exporter:
gnetId: 13659
revision: 1
datasource: Prometheus
kubernetes:
k8s-system-api-server:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json
token: ""
k8s-system-coredns:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json
token: ""
k8s-views-global:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json
token: ""
k8s-views-namespaces:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json
token: ""
k8s-views-nodes:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json
token: ""
k8s-views-pods:
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json
token: ""
# Loki Config
loki:
# -- Enable the whole component
enabled: true
# -- Override the full names of all resources
fullnameOverride: loki
# Loki Configuration
loki:
# -- Tenants / Users
tenants:
- name: myuser
password: mypassword
# -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config.
storage:
bucketNames:
chunks: loki-clops-chunks
ruler: loki-clops-ruler
admin: loki-clops-admin
type: s3
s3:
s3: null
endpoint: "https://s3.your.doma.in"
region: "region-1"
accessKeyId: "clops-test-key"
secretAccessKey: "SUPERSECRETKEY"
s3ForcePathStyle: true
insecure: false
gcs:
chunkBufferSize: 0
requestTimeout: "0s"
enableHttp2: true
azure:
accountName: null
accountKey: null
useManagedIdentity: false
userAssignedId: null
requestTimeout: null
filesystem:
chunks_directory: /var/loki/chunks
rules_directory: /var/loki/rules
# Configuration for the gateway
gateway:
# -- Specifies whether the gateway should be enabled
enabled: true
# -- Number of replicas for the gateway
replicas: 1
# Gateway ingress configuration
ingress:
# -- Specifies whether an ingress for the gateway should be created
enabled: true
# -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
ingressClassName: nginx
# -- Annotations for the gateway ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
# -- Hosts configuration for the gateway ingress
hosts:
- host: loki.your.doma.in
paths:
- path: /
# -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers
pathType: Prefix
# -- TLS configuration for the gateway ingress
tls:
- secretName: loki-gateway-tls
hosts:
- loki.your.doma.in
# Basic auth configuration
basicAuth:
enabled: true
htpasswd: >-
{{ if .Values.loki.tenants }}
{{- range $t := .Values.loki.tenants }}
{{ htpasswd (required "All tenants must have a 'name' set" $t.name) (required "All tenants must have a 'password' set" $t.password) }}
{{- end }}
{{ else }}
{{ htpasswd (required "'gateway.basicAuth.username' is required" .Values.gateway.basicAuth.username) (required "'gateway.basicAuth.password' is required" .Values.gateway.basicAuth.password) }}
{{ end }}
# disabling self monitoring componets
# breaking grafana etc.
monitoring:
selfMonitoring:
enabled: false
grafanaAgent:
installOperator: false
lokiCanary:
enabled: false
grafana-agent-operator:
# -- Override the full names of all resources
fullnameOverride: loki-grafana-agent-operator
# need to disable helm chart test since we disable the self monitoring
# and the chart tests depends on them
test:
enabled: false
# Promtail Config
promtail:
# -- Enable the whole component
enabled: true
# -- Override the full names of all resources
fullnameOverride: promtail
# -- Resource requests and limits
resources:
limits:
cpu: 200m
memory: 375Mi
requests:
cpu: 100m
memory: 135Mi
# Extra args for the Promtail container.
extraArgs:
- -client.external-labels=environment=clops,hostname=$(HOSTNAME)
# ServiceMonitor configuration
serviceMonitor:
enabled: true
# Promtail config file options
config:
enabled: true
# -- The log level of the Promtail server
logLevel: warn
# -- The config of clients of the Promtail server
clients:
- url: "http://loki-gateway.{{ .Release.Namespace }}.svc/loki/api/v1/push"
file: |
server:
log_level: {{ .Values.config.logLevel }}
http_listen_port: {{ .Values.config.serverPort }}
{{- with .Values.httpPathPrefix }}
http_path_prefix: {{ . }}
{{- end }}
{{- tpl .Values.config.snippets.extraServerConfigs . | nindent 2 }}
clients:
## CARE FOR INDENTATION
{{- tpl (toYaml .Values.config.clients) . | nindent 2 }}
tenant_id: 1
basic_auth:
username: 'testloki'
password: 'testlokipassword'
positions:
filename: /run/promtail/positions.yaml
scrape_configs:
{{- tpl .Values.config.snippets.scrapeConfigs . | nindent 2 }}
{{- tpl .Values.config.snippets.extraScrapeConfigs . | nindent 2 }}
limits_config:
{{- tpl .Values.config.snippets.extraLimitsConfig . | nindent 2 }}
tracing:
enabled: {{ .Values.config.enableTracing }}
# Prometheus Blackbox Exporter Config
prometheus-blackbox-exporter:
# -- Enable the whole component
enabled: true
# -- Override the full names of all resources
fullnameOverride: prometheus-blackbox-exporter
# if the configuration is managed as secret outside the chart, using SealedSecret for example,
# provide the name of the secret here. If secretConfig is set to true, configExistingSecretName will be ignored
# in favor of the config value.
configExistingSecretName: ""
# Store the configuration as a `Secret` instead of a `ConfigMap`, useful in case it contains sensitive data
secretConfig: false
config:
modules:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
follow_redirects: true
preferred_ip_protocol: "ip4"
tls_config:
insecure_skip_verify: true
# client.example
## ENV
# http_2xx_application_name:
# prober: http
# timeout: 5s
# http:
# method: GET
# valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
# no_follow_redirects: false
# preferred_ip_protocol: "ip4"
# tls_config:
# insecure_skip_verify: true
# basic_auth:
# username: "username"
# password: "userpassword"
# GitLab and others when "healthy" do a redirect to the login provider
http_redirect_location_set:
prober: http
timeout: 5s
http:
method: GET
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
no_follow_redirects: true
preferred_ip_protocol: "ip4"
tls_config:
insecure_skip_verify: false
valid_status_codes: [302]
fail_if_header_not_matches:
- header: Location
# We are fine if it isn't empty
regexp: "^.+$"
http_2xx_content_ok:
prober: http
timeout: 8s
http:
method: GET
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
no_follow_redirects: false
preferred_ip_protocol: "ip4"
tls_config:
insecure_skip_verify: true
fail_if_body_not_matches_regexp:
- "OK"
# ServiceMonitor configuration
serviceMonitor:
## If true, a ServiceMonitor CRD is created for a prometheus operator
## https://github.com/coreos/prometheus-operator for each target
##
enabled: true
## If true, a ServiceMonitor CRD is created for a prometheus operator
## https://github.com/coreos/prometheus-operator for blackbox-exporter itself
##
selfMonitor:
enabled: true
additionalMetricsRelabels: {}
additionalRelabeling: []
labels: {}
interval: 30s
scrapeTimeout: 30s
# Default values that will be used for all ServiceMonitors created by `targets`
defaults:
additionalMetricsRelabels: {}
additionalRelabeling: []
labels: {}
interval: 30s
scrapeTimeout: 30s
module: http_2xx
## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS.
scheme: http
## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS.
## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig
tlsConfig: {}
bearerTokenFile:
targets:
# - name: example # Human readable URL that will appear in Prometheus / AlertManager
# url: http://example.com/healthz # The URL that blackbox will scrape
# hostname: example.com # HTTP probes can accept an additional `hostname` parameter that will set `Host` header and TLS SNI
# labels: {} # Map of labels for ServiceMonitor. Overrides value set in `defaults`
# interval: 60s # Scraping interval. Overrides value set in `defaults`
# scrapeTimeout: 60s # Scrape timeout. Overrides value set in `defaults`
# module: http_2xx # Module used for scraping. Overrides value set in `defaults`
# additionalMetricsRelabels: {} # Map of metric labels and values to add
# additionalRelabeling: [] # List of metric relabeling actions to run
- name: loki.your.doma.in
url: https://loki.your.doma.in
module: http_2xx
additionalMetricsRelabels:
customer: "CLOPS"
## Custom PrometheusRules to be defined
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
prometheusRule:
enabled: true
additionalLabels:
prometheus: k8s
role: alert-rules
namespace: ""
rules:
- alert: EndpointDown
expr: probe_success == 0
# If a service is down for 45 seconds and more something **might** be wrong or just a short blip,
# so let's cause a warning first for "documentation purposes".
for: 45s
labels:
severity: "warning"
annotations:
# https://github.com/helm/helm/issues/2798#issuecomment-467319526
summary: "Endpoint {{`{{ $labels.instance }}`}} down (45s)"
- alert: EndpointDown
expr: probe_success == 0
# If a service is down for more 2-3+ minutes something is definitely wrong
# either the service is down / broken, blackbox exporter has some issues,
# the K8S clusters internet access has issues or some other problem (probably
# network related issue).
for: 180s
labels:
severity: "critical"
annotations:
summary: "Endpoint {{`{{ $labels.instance }}`}} down (3 minutes)"
- alert: CertificateExpiry
# 14 Tage Warnung
expr: (probe_ssl_earliest_cert_expiry - (604800 * 2)) <= time()
labels:
severity: "warning"
annotations:
summary: "Certificate {{`{{ $labels.instance }}`}} expires in less than 14 days."
- alert: CertificateExpiry
# 7 Tage Warnung
expr: (probe_ssl_earliest_cert_expiry - 604800) <= time()
labels:
severity: "critical"
annotations:
summary: "Certificate {{`{{ $labels.instance }}`}} expires in less than 7 days."
## dnsPolicy and dnsConfig for Deployments and Daemonsets if you want non-default settings.
## These will be passed directly to the PodSpec of same.
dnsPolicy: "None"
dnsConfig:
nameservers:
- 1.1.1.1
- 1.0.0.1
- 9.9.9.9
searches: []
options: []