Skip to content

Commit e6c38b1

Browse files
authored
fix: Fargate-serverless pattern (#2021)
1 parent 55ae774 commit e6c38b1

File tree

2 files changed

+9
-38
lines changed

2 files changed

+9
-38
lines changed

patterns/fargate-serverless/README.md

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,46 +45,12 @@ See [here](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started
4545
3. Validate the `aws-logging` configMap for Fargate Fluentbit was created:
4646

4747
```sh
48-
kubectl -n aws-observability get configmap aws-logging -o yaml
48+
kubectl -n aws-observability get configmap aws-logging
4949
```
5050

5151
```yaml
52-
apiVersion: v1
53-
data:
54-
filters.conf: |
55-
[FILTER]
56-
Name parser
57-
Match *
58-
Key_Name log
59-
Parser regex
60-
Preserve_Key True
61-
Reserve_Data True
62-
flb_log_cw: "true"
63-
output.conf: |
64-
[OUTPUT]
65-
Name cloudwatch_logs
66-
Match *
67-
region us-west-2
68-
log_group_name /fargate-serverless/fargate-fluentbit-logs20230509014113352200000006
69-
log_stream_prefix fargate-logs-
70-
auto_create_group true
71-
parsers.conf: |
72-
[PARSER]
73-
Name regex
74-
Format regex
75-
Regex ^(?<time>[^ ]+) (?<stream>[^ ]+) (?<logtag>[^ ]+) (?<message>.+)$
76-
Time_Key time
77-
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
78-
Time_Keep On
79-
Decode_Field_As json message
80-
immutable: false
81-
kind: ConfigMap
82-
metadata:
83-
creationTimestamp: "2023-05-08T21:14:52Z"
84-
name: aws-logging
85-
namespace: aws-observability
86-
resourceVersion: "1795"
87-
uid: d822bcf5-a441-4996-857e-7fb1357bc07e
52+
NAME DATA AGE
53+
aws-logging 4 20m
8854
```
8955

9056
You can also validate if the CloudWatch LogGroup was created accordingly, and LogStreams were populated:

patterns/fargate-serverless/main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module "eks_blueprints_addons" {
143143
kube-proxy = {}
144144
}
145145

146-
# Enable Fargate logging
146+
# Enable Fargate logging this may generate a large ammount of logs, disable it if not explicitly required
147147
enable_fargate_fluentbit = true
148148
fargate_fluentbit = {
149149
flb_log_cw = true
@@ -237,6 +237,11 @@ resource "kubernetes_deployment_v1" "this" {
237237
container_port = 80
238238
}
239239
}
240+
toleration {
241+
effect = "NoSchedule"
242+
key = "eks.amazonaws.com/compute-type"
243+
value = "fargate"
244+
}
240245
}
241246
}
242247
}

0 commit comments

Comments
 (0)