Skip to content

Commit

Permalink
Fix fluent bit terraform tests (#410)
Browse files Browse the repository at this point in the history
* fix fluent bit terraform tests

1. Fix timeout issue in fluent bit tests when destroying cluster
2. Fix CW template yaml with workingDir field

* Change fluentbit integ tests to include fluentbit configuration changes

* Address mitali's comment about file name

* Update CW agent version in fluentbit tests
  • Loading branch information
KlwntSingh authored Jun 3, 2024
1 parent 2561d82 commit 5415992
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
containers:
- name: cloudwatch-agent
image: CW_TEST_IMAGE
workingDir: "%CONTAINER_SANDBOX_MOUNT_POINT%\\Program Files\\Amazon\\AmazonCloudWatchAgent"
volumeMounts:
- name: cwagentconfig
mountPath: C:\Program Files\Amazon\AmazonCloudWatchAgent\cwagentconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,22 @@ data:
Refresh_Interval 10
Read_from_Head ${READ_FROM_HEAD}
[INPUT]
Name winlog
Channels EKS
DB C:\\var\\fluent-bit\\state\\flb_eks_winlog.db
Interval_Sec 60
[FILTER]
Name aws
Match dataplane.*
imds_version v2
[FILTER]
Name aws
Match winlog.*
imds_version v2
[OUTPUT]
Name cloudwatch_logs
Match dataplane.*
Expand All @@ -105,10 +116,19 @@ data:
auto_create_group true
extra_user_agent container-insights
[OUTPUT]
Name cloudwatch_logs
Match winlog.*
region ${AWS_REGION}
log_group_name /aws/containerinsights/${CLUSTER_NAME}/dataplane
log_stream_name ${HOST_NAME}.windows.kubelet.kubeproxy.service
auto_create_group true
extra_user_agent container-insights
host-log.conf: |
[INPUT]
Name winlog
Channels EKS, System
Channels System
DB C:\\var\\fluent-bit\\state\\flb_system_winlog.db
Interval_Sec 60
Expand All @@ -122,7 +142,7 @@ data:
Match winlog.*
region ${AWS_REGION}
log_group_name /aws/containerinsights/${CLUSTER_NAME}/host
log_stream_prefix ${HOST_NAME}.
log_stream_name ${HOST_NAME}.windows.system.events
auto_create_group true
extra_user_agent container-insights
Expand Down
2 changes: 1 addition & 1 deletion terraform/eks/daemon/fluent/common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ resource "kubernetes_daemonset" "agent_daemon" {
spec {
container {
name = "cloudwatch-agent"
image = "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:1.247359.1b252618"
image = "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:1.300040.0b650"
resources {
limits = {
"cpu" : "200m",
Expand Down
Loading

0 comments on commit 5415992

Please sign in to comment.