generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathoverride_values.tf
911 lines (804 loc) · 24 KB
/
override_values.tf
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
#------------------------------ METRIC SERVER -------------------------------------
resource "local_file" "metrics_server_helm_config" {
count = var.metrics_server && (var.metrics_server_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Particular args to be passed in deployment
extraArgs:
- --kubelet-preferred-address-types=InternalIP
- --v=2
apiService:
create: true
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/metrics_server.yaml"
}
#----------------------------- CLUSTER AUTOSCALER ----------------------------
resource "local_file" "cluster_autoscaler_helm_config" {
count = var.cluster_autoscaler && (var.cluster_autoscaler_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/cluster_autoscaler.yaml"
}
#----------------------- AWS LOAD BALANCER CONTROLLER -------------------------
resource "local_file" "aws_load_balancer_controller_helm_config" {
count = var.aws_load_balancer_controller && (var.aws_load_balancer_controller_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/aws_load_balancer_controller.yaml"
}
#------------------------- AWS NODE TERMINATION HANDLER ------------------------------
resource "local_file" "aws_node_termination_handler_helm_config" {
count = var.aws_node_termination_handler && (var.aws_node_termination_handler_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/aws_node_termination_handler.yaml"
}
#----------------------------- AWS EFS CSI DRIVER --------------------------------
resource "local_file" "aws_efs_csi_driver_helm_config" {
count = var.aws_efs_csi_driver && (var.aws_efs_csi_driver_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/aws_efs_csi_driver.yaml"
}
#----------------------- AWS EBS CSI DRIVER ---------------------------------
resource "local_file" "aws_ebs_csi_driver_helm_config" {
count = var.aws_ebs_csi_driver && (var.aws_ebs_csi_driver_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
controller:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
node:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/aws_ebs_csi_driver.yaml"
}
#----------------------------- KARPENTER ---------------------------------
resource "local_file" "karpenter_helm_config" {
count = var.karpenter && (var.karpenter_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
podAnnotations:
co.elastic.logs/enabled: "true"
EOT
filename = "${path.module}/override_values/karpenter.yaml"
}
#--------------------------- ISTIO INGRESS ----------------------------------
resource "local_file" "istio_ingress_helm_config" {
count = var.istio_ingress && (var.istio_ingress_helm_config == null) ? 1 : 0
content = <<EOT
global:
defaultNodeSelector:
"eks.amazonaws.com/nodegroup" : "critical"
service:
type: NodePort
EOT
filename = "${path.module}/override_values/istio_ingress.yaml"
}
#---------------------------- KAILI DASHBOARD ----------------------------
resource "local_file" "kiali_server_helm_config" {
count = var.kiali_server && (var.kiali_server_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_values/kiali_server.yaml"
}
#--------------------------- CALICO TOGERA --------------------------------
resource "local_file" "calico_tigera_helm_config" {
count = var.calico_tigera && (var.calico_tigera_helm_config == null) ? 1 : 0
content = <<EOT
installation:
kubernetesProvider: "EKS"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_values/calico_tigera.yaml"
}
#------------------------- EXTERNAL SECRETS -----------------------------
resource "local_file" "external_secrets_helm_config" {
count = var.external_secrets && (var.external_secrets_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resourc_helm_configes:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_values/external_secrets.yaml"
}
#-------------INGRESS NGINX-------------------
resource "local_file" "ingress_nginx_helm_config" {
count = var.ingress_nginx && (var.ingress_nginx_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resources:
limits:
cpu: 150m
memory: 150Mi
requests:
cpu: 100m
memory: 90Mi
podAnnotations:
co.elastic.logs/enabled: "true"
## Override values for ingress nginx
controller:
service:
annotations:
kubernetes.io/ingress.class: nginx
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
service.beta.kubernetes.io/aws-load-balancer-type: nlb
service.beta.kubernetes.io/aws-load-balancer-external: "true"
external:
enabled: true
internal:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
service.beta.kubernetes.io/aws-load-balancer-type: nlb
service.beta.kubernetes.io/aws-load-balancer-internal: "true"
EOT
filename = "${path.module}/override_values/ingress_nginx.yaml"
}
#----------------------- KUBECLARITY ------------------------------
resource "local_file" "kubeclarity_helm_config" {
count = var.kubeclarity && (var.kubeclarity_helm_config == null) ? 1 : 0
content = <<EOT
## Using limits and requests
kubeclarity:
resources:
limits:
memory: "500Mi"
cpu: "200m"
requests:
memory: "200Mi"
cpu: "100m"
podAnnotations:
co.elastic.logs/enabled: "true"
# Be careful when using ingress. As there is no authentication on Kubeclarity yet, your instance may be accessible.
# Make sure the ingress remains internal if you decide to enable it.
service:
type: LoadBalancer
port: 80
annotations:
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
service.beta.kubernetes.io/aws-load-balancer-name: "kubeclarity"
EOT
filename = "${path.module}/override_values/kubeclarity.yaml"
}
#-------------------------- FLUENT-BIT -------------------------------
resource "local_file" "fluent_bit_helm_config" {
count = var.fluent_bit && (var.fluent_bit_helm_config == null) ? 1 : 0
content = <<EOT
## -- Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## -- Using limits and requests
resources:
limits:
cpu: 150m
memory: 150Mi
requests:
cpu: 100m
memory: 90Mi
podAnnotations:
co.elastic.logs/enabled: "true"
# -- EKS Cluster Details
eks_configs:
aws_region: "us-east-1"
cluster_name: "helm-addons-cluster"
# -- Configuration to use Amazon CloudWatch LogGroup for logs having word `application` in it.
config:
service: |
[SERVICE]
Flush 5
Grace 30
Log_Level info
Daemon off
Parsers_File parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port {{ .Values.metricsPort }}
storage.path /var/fluent-bit/state/flb-storage/
storage.sync normal
storage.checksum off
storage.backlog.mem_limit 5M
inputs: |
[INPUT]
Name tail
Tag application.*
Path /var/log/containers/*.log
multiline.parser docker, cri
Mem_Buf_Limit 50MB
Skip_Long_Lines On
[INPUT]
Name tail
Tag application.*
Path /var/log/containers/fluent-bit*
multiline.parser docker, cri
Mem_Buf_Limit 5MB
Skip_Long_Lines On
[INPUT]
Name tail
Tag application.*
Path /var/log/containers/cloudwatch-agent*
multiline.parser docker, cri
Mem_Buf_Limit 5MB
Skip_Long_Lines On
filters: |
[FILTER]
Name kubernetes
Match application.*
Merge_Log On
K8S-Logging.Parser On
K8S-Logging.Exclude On
outputs: |
[OUTPUT]
Name cloudwatch_logs
Match application.*
region {{ .Values.eks_configs.region }}
log_group_name /aws/containerinsights/{{ .Values.eks_configs.cluster_name }}/application
auto_create_group true
extra_user_agent container-insights
log_stream_prefix eks-
EOT
filename = "${path.module}/override_values/fluentbit.yaml"
}
#---------------------- NEW RELIC AGENT ---------------------------
resource "local_file" "new_relic_helm_config" {
count = var.new_relic && (var.new_relic_helm_config == null) ? 1 : 0
content = <<EOT
global:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resources:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_vales/new_relic.yaml"
}
#------------------------ VELERO -------------------------------
resource "local_file" "velero_helm_config" {
count = var.velero && (var.velero_helm_config == null) ? 1 : 0
content = <<EOT
# -- Init containers to add to the Velero deployment's pod spec. At least one plugin provider image is required. If the value is a string then it is evaluated as a template.
initContainers:
- name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.7.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
# -- Parameters for the `default` BackupStorageLocation and VolumeSnapshotLocation, and additional server settings.
configuration:
backupStorageLocation:
- name: aws
default: "true"
provider: aws
volumeSnapshotLocation:
- name: aws
provider: aws
config:
region: "us-east-1"
# Info about the secret to be used by the Velero deployment, which
# should contain credentials for the cloud provider IAM account you've
# set up for Velero.
credentials:
useSecret: false
secretContents: {}
# Whether to deploy the node-agent daemonset.
deployNodeAgent: true
nodeAgent:
podVolumePath: /var/lib/kubelet/pods
privileged: true
EOT
filename = "${path.module}/override_values/velero.yaml"
}
#------------------- KUBE STATE METRICS -------------------------
resource "local_file" "kube_state_metrics_helm_config" {
count = var.kube_state_metrics && (var.kube_state_metrics_helm_config == null) ? 1 : 0
content = <<EOT
global:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resources:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_vales/kube_state_metrics.yaml"
}
#-------------------------- KEDA ----------------------------------
resource "local_file" "keda_helm_config" {
count = var.keda && (var.keda_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resources:
operator
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_vales/keda.yaml"
}
#---------------------- CERTIFICATION-MANAGER --------------------------
resource "local_file" "certification_manager_helm_config" {
count = var.certification_manager && (var.certification_manager_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
resources:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
installCRDs: true
EOT
filename = "${path.module}/override_values/certification_manager.yaml"
}
#-------------------------- FILEBEAT --------------------------------------
resource "local_file" "filebeat_helm_config" {
count = var.filebeat && (var.filebeat_helm_config == null) ? 1 : 0
content = <<EOT
daemonset:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resources:
limits:
cpu: "300m"
memory: "200Mi"
requests:
cpu: 100m
memory: 100Mi
deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
## Using limits and requests
resources:
limits:
cpu: "300m"
memory: "200Mi"
requests:
cpu: 100m
memory: 100Mi
EOT
filename = "${path.module}/override_values/filebeat.yaml"
}
#-------------------------- RELOADER --------------------------------------
resource "local_file" "reloader_helm_config" {
count = var.reloader && (var.reloader_helm_config == null) ? 1 : 0
content = <<EOT
reloader:
deployment:
# If you wish to run multiple replicas set reloader.enableHA = true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
resources:
limits:
cpu: "100m"
memory: "512Mi"
requests:
cpu: "10m"
memory: "128Mi"
EOT
filename = "${path.module}/override_vales/reloader.yaml"
}
#---------------------------- EXTERNAL DNS ---------------------------------
resource "local_file" "external_dns_helm_config" {
count = var.external_dns && (var.external_dns_helm_config == null) ? 1 : 0
content = <<EOT
provider: aws
aws:
zoneType: public
txtOwnerId: external-dns
domainFilters:
- test.example.com
policy: sync
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
EOT
filename = "${path.module}/override_vales/external_dns.yaml"
}
#---------------------------- REDIS -----------------------------------------
resource "local_file" "redis_helm_config" {
count = var.redis && (var.redis_helm_config == null) ? 1 : 0
content = <<EOT
global:
storageClass: ""
redis:
password: "redisPassword"
# -- master configuration parameters
master:
count: 1
persistence:
size: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
# -- replicas configuration parameters
replica:
replicaCount: 3
persistence:
size: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
EOT
filename = "${path.module}/override_vales/redis.yaml"
}
#-----------ACTIONS-RUNNER-CONTROLLER--------------------
resource "local_file" "actions_runner_controller_helm_config" {
count = var.actions_runner_controller && (var.actions_runner_controller_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
resources:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_values/actions_runner_controller.yaml"
}
#------------------------- PROMETHEUS -------------------------------
resource "local_file" "prometheus_helm_config" {
count = var.prometheus && (var.prometheus_helm_config == null) ? 1 : 0
content = <<EOT
server:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
persistentVolume:
storageClass: gp2
EOT
filename = "${path.module}/override_vales/prometheus.yaml"
}
#------------------------------- Grafana ------------------------------------
resource "local_file" "grafana_helm_config" {
count = var.grafana && (var.grafana_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
resources:
limits:
cpu: 300m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_vales/grafana.yaml"
}
#-----------PROMETHEUS-CLOUDWATCH-EXPORTER--------------------
resource "local_file" "prometheus_cloudwatch_exporter_helm_config" {
count = var.prometheus_cloudwatch_exporter && (var.prometheus_cloudwatch_exporter_helm_config == null) ? 1 : 0
content = <<EOT
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
resources:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
EOT
filename = "${path.module}/override_values/prometheus_cloudwatch_exporter.yaml"
}