-
Notifications
You must be signed in to change notification settings - Fork 1
/
helmfile.yaml
1200 lines (1145 loc) · 38.1 KB
/
helmfile.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
environments:
amazon-cicd:
secrets:
- secrets/influxdb.yaml
- secrets/sso.yaml
- secrets/alertmanager.yaml
- secrets/actions-runner-controller.yaml
- secrets/ucentral-ap-firmware-logstash.yaml
- secrets/core-dump-handler.yaml
values:
- eks:
clusterName: tip-wlan-main
region: ap-south-1
dnsRegion: us-east-1
accountID: 289708231103
hostedZoneId: cicd
certificateARNCICD: arn:aws:acm:ap-south-1:289708231103:certificate/2cc8c764-11fd-411d-bf7d-a93f488f3f6c
certificateARNLab: arn:aws:acm:ap-south-1:289708231103:certificate/5281be14-c5e6-45c5-8d5c-e8660c76fbcb
- monitoring:
receiver: "slack-notifications"
namespace: monitoring
publicNamespaces: ['openwifi-qa01', 'openwifi-qa02', 'openwifi-dev01', 'openwifi-demo']
clusterName: TIP WLAN CI/CD
- domain: lab.wlan.tip.build
- hostSuffix: ".lab.wlan.tip.build"
- storageClass: gp2
- autoscaler:
#TODO:
#enabled: true
enabled: false
- ingress:
enabled: true
- elastic:
#TODO:
#enabled: true
enabled: false
- kibana:
#TODO:
#enabled: true
enabled: false
- logstash:
#TODO:
#enabled: true
enabled: false
- prometheus:
enabled: true
- k8s-dashboard:
enabled: true
- metrics-server:
enabled: true
- external-dns:
enabled: true
- alb-ingress:
enabled: true
- node-termination-handler:
enabled: true
- influxdb:
#skip this one for now
enabled: false
- actions-runner-controller:
enabled: true
- cert-manager:
enabled: true
- calico:
enabled: true
- core-dump-handler:
#skip this one now
enabled: false
amazon-qa2:
secrets:
- secrets/influxdb.yaml
- secrets/sso.yaml
- secrets/alertmanager.yaml
- secrets/actions-runner-controller.yaml
- secrets/ucentral-ap-firmware-logstash.yaml
- secrets/core-dump-handler.yaml
values:
- eks:
clusterName: tip-wlan-qa
#region: ap-south-1
region: us-east-2
dnsRegion: us-east-1
accountID: 289708231103
hostedZoneId: cicd
# note these are both the same.
# there isn't a lab cert in this region
certificateARNCICD: arn:aws:acm:us-east-2:289708231103:certificate/299d7444-acc4-46c2-ae83-40d2cd5f49be
certificateARNLab: arn:aws:acm:us-east-2:289708231103:certificate/299d7444-acc4-46c2-ae83-40d2cd5f49be
- monitoring:
namespace: monitoring
receiver: "null"
publicNamespaces: ['openwifi-qa03', 'openwifi-dev03']
clusterName: TIP QA
- domain: lab.wlan.tip.build
- hostSuffix: "-qa02.cicd.lab.wlan.tip.build"
- storageClass: gp2
- autoscaler:
#TODO:
#enabled: true
enabled: false
- ingress:
enabled: true
- elastic:
#TODO:
#enabled: true
enabled: false
- kibana:
#TODO:
#enabled: true
enabled: false
- logstash:
#TODO:
#enabled: true
enabled: false
- prometheus:
enabled: true
- k8s-dashboard:
enabled: true
- metrics-server:
enabled: true
- external-dns:
enabled: true
- alb-ingress:
enabled: true
- node-termination-handler:
enabled: false
- influxdb:
#skip this one for now
enabled: false
- actions-runner-controller:
enabled: false
- cert-manager:
enabled: true
- calico:
enabled: false
- core-dump-handler:
#skip this one now
enabled: false
---
repositories:
- name: stable
url: https://charts.helm.sh/stable
- name: kokuwa
url: https://kokuwaio.github.io/helm-charts
- name: nginx
url: https://kubernetes.github.io/ingress-nginx
- name: eks
url: https://aws.github.io/eks-charts
- name: elastic
url: https://helm.elastic.co
- name: kubernetes-dashboard
url: https://kubernetes.github.io/dashboard/
- name: autoscaler
url: https://kubernetes.github.io/autoscaler/
- name: bitnami
url: https://charts.bitnami.com/bitnami
- name: influxdata
url: https://helm.influxdata.com
- name: actions-runner-controller
url: https://actions-runner-controller.github.io/actions-runner-controller
- name: jetstack
url: https://charts.jetstack.io
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: projectcalico
url: https://projectcalico.docs.tigera.io/charts
- name: braedon
url: https://braedon.github.io/helm
- name: core-dump-handler
url: https://ibm.github.io/core-dump-handler
helmDefaults:
force: false
timeout: 300
# dont seem to work
# wait: false
# recreatePods: true
# verify: true
templates:
default: &default
namespace: kube-system
missingFileHandler: Warn
cluster-autoscaler: &cluster-autoscaler
values:
- envs/common/cluster-autoscaler.yaml.gotmpl
external-dns: &external-dns
values:
- envs/common/external-dns.yaml.gotmpl
# core setup
releases:
- name: cluster-autoscaler
condition: autoscaler.enabled
<<: *default
<<: *cluster-autoscaler
chart: autoscaler/cluster-autoscaler
version: 9.11.0
labels:
role: setup
group: system
app: autoscaler
- name: external-dns
condition: external-dns.enabled
<<: *default
<<: *external-dns
chart: bitnami/external-dns
version: 6.12.2
labels:
role: setup
group: system
app: external-dns
- name: nginx-ingress
condition: ingress.enabled
<<: *default
chart: nginx/ingress-nginx
version: 4.8.2
labels:
role: setup
group: system
app: ingress
values:
- controller:
ingressClassResource:
name: nginx-sso
ingressClass: nginx-sso
service:
annotations:
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: {{ .Environment.Values.eks.certificateARNLab }}
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https
service.beta.kubernetes.io/aws-load-balancer-type: elb
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
targetPorts:
http: http
https: http
publishService:
enabled: true
metrics:
enabled: true
serviceMonitor:
enabled: true
additionalLabels:
release: prometheus-operator
- defaultBackend:
enabled: true
# monitoring
- name: prometheus-operator-crds
chart: prometheus-community/prometheus-operator-crds
condition: prometheus.enabled
version: 8.0.1
labels:
role: setup
group: monitoring
app: prometheus-operator
crd: prometheus-operator-crd
- name: prometheus-operator
condition: prometheus.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: prometheus-community/kube-prometheus-stack
version: 55.8.1
labels:
role: setup
group: monitoring
app: prometheus-operator
values:
- nameOverride: prometheus-operator
- prometheus:
enabled: true
prometheusSpec:
retention: 31d
resources:
requests:
memory: 1400Mi
limits:
memory: 3000Mi
storageSpec:
volumeClaimTemplate:
spec:
storageClassName: gp2
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50Gi
ingress:
enabled: true
ingressClassName: nginx-sso
annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: k8s-dashboard-basic-auth
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required'
#nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
#nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"
#kubernetes.io/ingress.class: nginx-sso
hosts:
- prometheus{{ .Environment.Values.hostSuffix }}
- additionalPrometheusRulesMap:
testbed:
groups:
- name: Testbed alerts
rules:
- alert: Waiting pod
expr: sum(kube_pod_container_status_waiting_reason{namespace=~".*nola.*", reason!="ContainerCreating"}) by (namespace, pod) > 0
for: 5m
labels:
severity: warning
area: testbed
namespace: "{{`{{ $labels.namespace }}`}}"
pod: "{{`{{ $labels.pod }}`}}"
annotations:
title: Pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* is in waiting state
description: The pod {{`{{ $labels.namespace }}/{{ $labels.pod }}`}} is in waiting state for at least 5 minutes. Please check for image pull issues.
- alert: Node not ready
expr: sum(kube_node_status_condition{condition="Ready", status!="true"}) by (node) > 0
for: 60m
labels:
severity: error
area: testbed
node: "{{`{{ $labels.node }}`}}"
annotations:
title: Node {{`{{ $labels.node }}`}} not becoming ready
description: The cluster node {{`{{ $labels.node }}`}} is not getting ready since 60 minutes. Please contact the cluster administrators.
- alert: Pod OOM killed
expr: (kube_pod_container_status_restarts_total - kube_pod_container_status_restarts_total offset 10m >= 1) and ignoring (reason) min_over_time(kube_pod_container_status_last_terminated_reason{reason="OOMKilled"}[10m]) == 1
for: 0m
labels:
severity: error
area: testbed
namespace: "{{`{{ $labels.namespace }}`}}"
pod: "{{`{{ $labels.pod }}`}}"
reason: "{{`{{ $labels.reason }}`}}"
annotations:
title: Pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* has been OOM killed
description: The pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* has been killed due to reaching its memory limit. Investigate the memory usage or increase the limit to prevent this.
- alert: Pod exited with a segfault
expr: (kube_pod_container_status_restarts_total - kube_pod_container_status_restarts_total offset 10m >= 1) and min_over_time(kube_pod_container_status_last_terminated_exitcode[10m]) == 139
for: 0m
labels:
severity: error
area: testbed
namespace: "{{`{{ $labels.namespace }}`}}"
pod: "{{`{{ $labels.pod }}`}}"
reason: "{{`{{ $labels.reason }}`}}"
annotations:
title: Pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* exited with a segfault
description: The pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* exited with a segmentation fault, please examine the coredump.
- alert: Node low on memory
expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 5
for: 1m
labels:
severity: warning
area: testbed
annotations:
title: Node {{`{{ $labels.instance }}`}} has very little memory capacity left
description: The cluster node {{`{{ $labels.instance }}`}} has less than 5% memory available.
- alert: Pod stuck in crash loop
expr: increase(kube_pod_container_status_restarts_total[1m]) > 3
for: 2m
labels:
severity: error
area: testbed
namespace: "{{`{{ $labels.namespace }}`}}"
pod: "{{`{{ $labels.pod }}`}}"
annotations:
title: Pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* is crash looping
description: "The pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* is crash looping. Please check its logs to see what is going on."
- alert: Pod restarted many times
expr: (sum(increase(kube_pod_container_status_restarts_total[10m])) by (container)) > 0
labels:
severity: warning
area: testbed
namespace: "{{`{{ $labels.namespace }}`}}"
pod: "{{`{{ $labels.pod }}`}}"
annotations:
title: Pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* was restarted many times
description: "The pod *{{`{{ $labels.namespace }}/{{ $labels.pod }}`}}* was restarted more than 5 times. Please check its logs to see what is going on."
- alert: PVC running out of space
expr: kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes * 100 < 20
labels:
severity: warning
area: testbed
namespace: "{{`{{ $labels.namespace }}`}}"
persistentvolumeclaim: "{{`{{ $labels.persistentvolumeclaim }}`}}"
annotations:
title: PVC *{{`{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }}`}}* has less than 20% free storage
description: "The PVC *{{`{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }}`}}* only has {{`{{ $value }}`}}% capacity left. Please increase its size or clean it up."
# Not doing ES (currently)
# - alert: ElasticSearch new assert_violation errors found
# expr: rate(assert_violation_errors_hits[1m]) > 0
# labels:
# severity: warning
# area: testbed
# service: elasticsearch
# namespace: "{{`{{ $labels.namespace }}`}}"
# annotations:
# title: New ElasticSearch logs found with Assertion violation (WIFI-9824)
# description: New ElasticSearch logs found with Assertion violation (WIFI-9824)
- grafana:
#image:
#repository: grafana/grafana
#tag: 8.5.13
grafana.ini:
users:
viewers_can_edit: true
auth:
disable_login_form: true
disable_signout_menu: true
auth.anonymous:
enabled: true
org_role: Viewer
testFramework:
enabled: false
ingress:
enabled: true
ingressClassName: nginx-sso
annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: k8s-dashboard-basic-auth
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required'
#nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
#nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"
#kubernetes.io/ingress.class: nginx-sso
hosts:
- grafana{{ .Environment.Values.hostSuffix }}
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: imported
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
#dashboards:
# default:
# performance:
# url: https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/master/grafana/performance.json
# qaDebugging:
# url: https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-analytics/main/grafana/qa-debugging.json
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-operated:9090
access: proxy
isDefault: false
# Not doing influx and ES anymore (for now)
# - name: InfluxDB
# type: influxdb
# access: proxy
# url: https://influx.cicd{{ .Environment.Values.hostSuffix }}
# user: tip
# secureJsonData:
# token: {{ .Environment.Values.influxdb.adminUser.token }}
# password: {{ .Environment.Values.influxdb.adminUser.password }}
# jsonData:
# version: Flux
# organization: tip
# defaultBucket: tip-cicd
# - name: ES
# type: elasticsearch
# access: proxy
# url: http://elasticsearch-client.monitoring.svc:9200
# database: logstash-*
# isDefault: false
# jsonData:
# esVersion: 6
# timeField: '@timestamp'
# logMessageField: message
# logLevelField: fields.level
- alertmanager:
config:
global:
resolve_timeout: 1m
slack_api_url: {{ .Environment.Values.alertmanager.slack_api_url }}
route:
receiver: "null"
routes:
- match:
area: testbed
receiver: "{{ .Environment.Values.monitoring.receiver }}"
receivers:
- name: "null"
- name: "slack-notifications"
slack_configs:
- channel: "#open-wifi-testbed-alerts"
send_resolved: true
icon_url: https://avatars3.githubusercontent.com/u/3380462
title: |-
{{- readFile "alertmanager-templates/title.tpl" | nindent 14 }}
text: >-
{{- readFile "alertmanager-templates/text.tpl" | nindent 14 }}
title_link: ""
# - kube-state-metrics:
# image:
# repository: tip-tip-wlan-cloud-ucentral.jfrog.io/kube-state-metrics
# tag: v2.6.0-tip20221103
- name: prometheus-operator-helper
condition: prometheus.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: charts/standalone-monitoring
labels:
role: setup
group: monitoring
app: prometheus-operator
sub: helper
values:
- monitoring:
namespace: {{ .Environment.Values.monitoring.namespace }}
domain: {{ .Environment.Values.domain }}
- proxy:
namespace: kube-system
#- name: prometheus-operator-ingress-auth
# condition: prometheus.enabled
# namespace: kube-system
# chart: charts/sso
# labels:
# role: setup
# group: monitoring
# app: prometheus-operator
# sub: oAuth
# values:
# - monitoring:
# domain: example.com
# namespace: {{ .Environment.Values.monitoring.namespace }}
# - oidc:
# issuerUrl: {{ .Environment.Values.sso.oidc.issuerUrl }}
# clientId: {{ .Environment.Values.sso.oidc.clientId }}
# clientSecret: {{ .Environment.Values.sso.oidc.clientSecret }}
# cookieSecret: {{ .Environment.Values.sso.oidc.cookieSecret }}
- name: fluentd
condition: elastic.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: kokuwa/fluentd-elasticsearch
version: 13.1.0
labels:
role: setup
group: monitoring
app: fluentd
values:
- elasticsearch:
serviceAccount:
create: true
hosts:
- elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local
- resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 500m
memory: 300Mi
- tolerations:
- effect: NoSchedule
operator: Exists
- name: elasticsearch
condition: elastic.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: charts/elasticsearch
labels:
role: setup
group: monitoring
app: elasticsearch
values:
- image:
repository: "docker.elastic.co/elasticsearch/elasticsearch"
tag: "6.8.22"
- client:
resources:
limits:
memory: 3Gi
requests:
memory: 3Gi
heapSize: "1500m"
- master:
resources:
limits:
cpu: 200m
memory: 1000Mi
requests:
cpu: 200m
memory: 800Mi
- data:
persistence:
size: 650Gi
resources:
limits:
cpu: 3
memory: 4Gi
requests:
cpu: 1500m
memory: 4Gi
heapSize: "3000m"
readinessProbe: null
- name: elasticsearch-curator
condition: elastic.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: stable/elasticsearch-curator
labels:
role: setup
group: monitoring
app: elasticsearch
values:
- configMaps:
config_yml: |-
client:
hosts:
- http://elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local:9200
action_file_yml: |-
actions:
1:
action: delete_indices
description: "Delete old indices"
options:
ignore_empty_list: True
continue_if_exception: True
timeout_override: 300
filters:
- filtertype: pattern
kind: prefix
value: 'logstash-'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 30
- name: kibana
condition: kibana.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: charts/kibana
labels:
role: setup
group: monitoring
app: kibana
values:
- testFramework:
enabled: false
- image:
repository: "docker.elastic.co/kibana/kibana"
tag: "6.8.6"
- files:
kibana.yml:
elasticsearch.hosts: http://elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local:9200
- ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"
kubernetes.io/ingress.class: nginx-sso
hosts:
- kibana{{ .Environment.Values.hostSuffix }}
- lifecycle:
postStart:
exec:
command:
- bash
- -c
- |
#!/bin/bash
# Config the index_pattern
TEMPLATE_NAME="logstash"
INDEX_PATTERN="logstash-*"
KIBANA_URL=http://localhost:5601
# Wait until service is ready
while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $KIBANA_URL/app/kibana)" != "200" ]]; do sleep 1; done
# Apply default Index Pattern into Kibana
curl -X POST -v $KIBANA_URL/api/saved_objects/index-pattern/$TEMPLATE_NAME \
-H 'kbn-xsrf: true' -H 'Content-Type: application/json' \
-d '{"attributes": {"title": "'$INDEX_PATTERN'"}}'
- dashboardImport:
enabled: true
timeout: 60
basePath: ""
dashboards:
k8s-container-logs: |
{{- readFile "kibana-dashboards/k8s-container-logs.json" | nindent 10 }}
- name: logstash
condition: logstash.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: elastic/logstash
version: 7.16.2
labels:
role: setup
group: monitoring
app: logstash
values:
- image: docker.elastic.co/logstash/logstash
- replicas: 1
- resources:
limits:
memory: 2Gi
requests:
memory: 2Gi
- logstashConfig:
logstash.yml: |
http.host: 0.0.0.0
log.level: warn
- logstashPipeline:
logstash.conf: "" # override default pipeline
ucentral-kafka.conf: |
input {
kafka {
bootstrap_servers => "kafka-headless.openwifi-dev01.svc.cluster.local:9092"
topics => ["state", "healthcheck", "device_event_queue"]
tags => ["openwifi-kafka"]
#codec => json
decorate_events => true
auto_offset_reset => "latest"
client_id => "openwifi-dev01"
add_field => { "instance" => "openwifi-dev01" }
}
kafka {
bootstrap_servers => "kafka-headless.openwifi-qa01.svc.cluster.local:9092"
topics => ["state", "healthcheck", "device_event_queue"]
tags => ["openwifi-kafka"]
decorate_events => true
auto_offset_reset => "latest"
client_id => "openwifi-qa01"
add_field => { "instance" => "openwifi-qa01" }
}
kafka {
bootstrap_servers => "kafka-headless.openwifi-demo.svc.cluster.local:9092"
topics => ["state", "healthcheck", "device_event_queue"]
tags => ["openwifi-kafka"]
#codec => json
decorate_events => true
auto_offset_reset => "latest"
client_id => "openwifi-demo"
add_field => { "instance" => "openwifi-demo" }
}
}
filter {
if "openwifi-kafka" in [tags] {
mutate { copy => { "[@metadata][kafka]" => "kafka" } }
}
}
filter {
if "openwifi-kafka" in [tags] {
json {
source => "message"
remove_field => [ "message" ]
}
}
}
filter {
if ([payload][state][unit][load]) {
mutate {
add_field => { "[payload][state][unit][load1]" => "%{[payload][state][unit][load][0]}" }
add_field => { "[payload][state][unit][load5]" => "%{[payload][state][unit][load][1]}" }
add_field => { "[payload][state][unit][load15]" => "%{[payload][state][unit][load][2]}" }
remove_field => [ "[payload][state][unit][load]" ]
}
mutate {
convert => {
"[payload][state][unit][load1]" => "integer"
"[payload][state][unit][load5]" => "integer"
"[payload][state][unit][load15]" => "integer"
}
}
}
}
output {
if "openwifi-kafka" in [tags] {
elasticsearch {
hosts => "http://elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local:9200"
index => "logstash-ucentral-%{+YYYY.MM.dd}"
}
}
}
ucentral-ap-firmware.conf: |
input {
s3 {
access_key_id => "{{ .Environment.Values.ucentral_ap_firmware_logstash.access_key_id }}"
secret_access_key => "{{ .Environment.Values.ucentral_ap_firmware_logstash.secret_access_key }}"
bucket => "ucentral-ap-firmware-logs"
delete => true
region => "us-east-1"
tags => ["ucentral-ap-firmware"]
additional_settings => {
force_path_style => true
follow_redirects => false
}
}
}
filter {
if "ucentral-ap-firmware" in [tags] {
grok {
match => { "message" => "%{S3_ACCESS_LOG}" }
remove_field => ["message"]
}
date {
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
remove_field => ["timestamp"]
}
geoip {
source => "clientip"
}
if [operation] == "REST.GET.OBJECT" and [key] =~ /^*\.bin$/ {
grok {
match => { "key" => "%{UPLOAD_DATE:upload_date}-%{AP_MODEL:ap_model}-%{GREEDYDATA:branch_name}-%{GIT_REV:git_rev}-%{WORD:suffix}.%{WORD:file_extension}" }
pattern_definitions => {
"UPLOAD_DATE" => "%{YEAR}%{MONTHNUM}%{MONTHDAY}"
"AP_MODEL" => "[a-z0-9]+_[a-z0-9]+(-|_)?[a-z0-9]+(-|_)?[a-z0-9]+"
"GIT_REV" => "[a-z0-9]{4,8}"
}
add_field => { "timestamp_clientip" => "%{@timestamp} %{clientip}" }
}
}
}
}
output {
if "ucentral-ap-firmware" in [tags] {
elasticsearch {
hosts => "http://elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local:9200"
index => "logstash-ucentral-ap-firmware-%{+YYYY.MM.dd}"
}
}
}
syslog.conf: |
input {
syslog {
tags => ["ucentral-syslog"]
port => 5514
grok_pattern => "(?:<%{POSINT:priority}>%{SYSLOGLINE}|%{MONTH} %{MONTHDAY} %{TIME} %{DATA:docker.container_name}/%{DATA:github.run_number}\[%{INT:undefined_number}\]: %{GREEDYDATA:message})"
}
}
filter {
if ([undefined_number]) {
mutate {
remove_field => [ "undefined_number" ]
}
}
}
output {
if "ucentral-syslog" in [tags] {
elasticsearch {
hosts => "http://elasticsearch-client.{{ .Environment.Values.monitoring.namespace }}.svc.cluster.local:9200"
index => "logstash-%{+YYYY.MM.dd}"
document_type => "_doc"
}
}
}
- service:
type: LoadBalancer
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip"
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
service.beta.kubernetes.io/aws-load-balancer-private-ipv4-addresses: "10.10.10.40,10.10.11.40,10.10.12.40"
ports:
- name: syslog
port: 514
targetPort: 5514
protocol: TCP
- name: simple-auth-roles
condition: ingress.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: charts/k8s-dashboard-roles
labels:
role: setup
group: system
app: ingress
- name: k8s-dashboard
condition: k8s-dashboard.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: kubernetes-dashboard/kubernetes-dashboard
version: 5.0.5
labels:
role: setup
group: monitoring
app: k8s-dashboard
values:
- settings:
defaultNamespace: {{ index .Environment.Values.monitoring.publicNamespaces 0 }}
namespaceFallbackList: {{ .Environment.Values.monitoring.publicNamespaces | toJson }}
itemsPerPage: 25
clusterName: {{ .Environment.Values.monitoring.clusterName }}
- extraArgs:
- --enable-skip-login
- --system-banner=Welcome to the {{ .Environment.Values.monitoring.clusterName}} Kubernetes cluster. If you are missing your namespace in the above select box, please <a href="https://telecominfraproject.atlassian.net/browse/WIFI">create a ticket</a>.
- rbac:
create: false
clusterRoleMetrics: true
clusterReadOnlyRole: false
- service:
type: NodePort
externalPort: 80
- protocolHttp: true
- ingress:
className: nginx-sso
enabled: true
paths:
- /
- /*
annotations:
#nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
#nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: k8s-dashboard-basic-auth
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required'
hosts:
- k8s-dashboard{{ .Environment.Values.hostSuffix }}
- name: metrics-server
condition: metrics-server.enabled
namespace: {{ .Environment.Values.monitoring.namespace }}
chart: bitnami/metrics-server
version: 6.2.4
labels:
role: setup
group: monitoring
app: metrics-server
values:
- apiService:
create: true
- name: aws-load-balancer-controller
<<: *default
condition: alb-ingress.enabled
chart: eks/aws-load-balancer-controller
version: 1.6.2
labels:
role: setup
group: system
app: aws-load-balancer-controller
values:
- serviceAccount:
create: false
name: {{ .Values.eks.clusterName }}-alb-ingress-sa
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::{{ .Values.eks.accountID }}:role/{{ .Values.eks.clusterName }}-alb-ingress
clusterName: {{ .Values.eks.clusterName }}
enableShield: false
enableWaf: false
enableWafv2: false
logLevel: info
- name: aws-node-termination-handler
<<: *default
condition: node-termination-handler.enabled
chart: eks/aws-node-termination-handler
version: 0.21.0
labels:
role: setup
group: system
app: node-termination-handler
values:
- deleteLocalData: true
- ignoreDaemonSets: true
- podTerminationGracePeriod: -1 # use values defined in Pod
- name: influxdb
namespace: test-bss
chart: influxdata/influxdb2