The config map for container insights was created last, leading to the restart of the fluent-bit pod, which is necessary to obtain containerinsight-based logs in CloudWatch.
[x] ✋ I have searched the open/closed issues and my issue is not listed.
aws_for_fluentbit_cw_log_group = {
create = true
use_name_prefix = true # Set this to true to enable name prefix
name_prefix = "eks-cluster-logs-"
}
aws_for_fluentbit = {
create_role = false
name = "aws-for-fluent-bit"
role_name = var.iam_role_name
set = [{
name = "cloudWatchLogs.autoCreateGroup"
value = true
},
{
name = "hostNetwork"
value = true
},
{
name = "dnsPolicy"
value = "ClusterFirstWithHostNet"
}
]
enable_containerinsights = true
kubelet_monitoring = true
}
enable_aws_for_fluentbit = true
Steps to reproduce the behavior:
While using the above terraform code, config-map container insight was created last, due to that pod restart was required to enable container insight logs.
config-map container insight configuration needs to be created first and then the fluent pod needs to start.
This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days
Description
The config map for container insights was created last, leading to the restart of the fluent-bit pod, which is necessary to obtain containerinsight-based logs in CloudWatch.
Versions
aws v5.50.0... helm v2.13.2... kubernetes v2.30.0... "terraform-aws-modules/eks/aws - 19.15 "aws-ia/eks-blueprints-addons/aws - 1.11
Module version [Required]:
Terraform code:
aws_for_fluentbit_cw_log_group = { create = true use_name_prefix = true # Set this to true to enable name prefix name_prefix = "eks-cluster-logs-"
}
aws_for_fluentbit = {
create_role = false name = "aws-for-fluent-bit" role_name = var.iam_role_name
set = [{ name = "cloudWatchLogs.autoCreateGroup" value = true }, { name = "hostNetwork" value = true }, { name = "dnsPolicy" value = "ClusterFirstWithHostNet" } ] enable_containerinsights = true kubelet_monitoring = true } enable_aws_for_fluentbit = true
Steps to reproduce the behavior:
While using the above terraform code, config-map container insight was created last, due to that pod restart was required to enable container insight logs.
config-map container insight configuration needs to be created first and then the fluent pod needs to start.
Actual behavior
screenshot of terraform plan:![fluent-bit container insight configmap issue](https://github.com/aws-ia/terraform-aws-eks-blueprints-addons/assets/141133365/50d3030d-f843-4337-850a-fd21521581ed)