Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-for-fluent-bit does not update cloudwatch retention log. #1084

Open
fonteslucas opened this issue Apr 5, 2024 · 0 comments · May be fixed by #1168
Open

aws-for-fluent-bit does not update cloudwatch retention log. #1084

fonteslucas opened this issue Apr 5, 2024 · 0 comments · May be fixed by #1168
Labels
bug Something isn't working

Comments

@fonteslucas
Copy link

Describe the bug
aws-for-fluent-bit does not update cloudwatch retention log in existing cloudwatch log groups

Steps to reproduce
1 - Deploy helm chart of aws-for-fluent-bit
2 - Deploy an example application
3 - Check the CloudWatch log group retention of application
4 - Change Helm Value cloudWatchLogs.logRetentionDays
5 - Observe the CloudWatch log group retention of application

Expected outcome
Change the retention of CloudWatch Log group created by fluent-bit

Environment
DEV/TEST (For now)

  • Chart name: aws-for-fluent-bit
  • Chart version: 0.1.32
  • Kubernetes version: 1.27
  • Using EKS (yes/no), if so version? Yes, eks.15

Additional Context:

HELM VALUES:

cloudWatchLogs:
 enabled:true
  region: ${aws_region}
  logGroupName: ${log_group_name}
  logRetentionDays: ${log_retention_days}
  logGroupTemplate: /aws/eks/fluentbit-cloudwatch/workload/$kubernetes['namespace_name']
  logFormat: JSON

IAM POLICY USED BY IRSA:

  data "aws_iam_policy_document" "irsa" {
  statement {
    sid       = "PutLogEvents"
    effect    = "Allow"
    resources = ["arn:${var.addon_context.aws_partition_id}:logs:${var.addon_context.aws_region_name}:${var.addon_context.aws_caller_identity_account_id}:log-group:*:log-stream:*"]
    actions   = ["logs:PutLogEvents"]
  }

  statement {
    sid       = "CreateCWLogs"
    effect    = "Allow"
    resources = ["arn:${var.addon_context.aws_partition_id}:logs:${var.addon_context.aws_region_name}:${var.addon_context.aws_caller_identity_account_id}:log-group:*"]
    actions = [
      "logs:CreateLogGroup",
      "logs:CreateLogStream",
      "logs:DescribeLogGroups",
      "logs:DescribeLogStreams",
      "logs:PutRetentionPolicy",
      "logs:DeleteLogGroup",
      "logs:DeleteRetentionPolicy"
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant