terraform-aws-modules / terraform-aws-eks

Terraform module to create Amazon Elastic Kubernetes (EKS) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/eks/aws
Apache License 2.0
4.24k stars 3.98k forks source link

Log rotation configuration. #3049

Open prakashbalaji opened 1 month ago

prakashbalaji commented 1 month ago

Description

I see 2 options to configure log rotations containerLogMaxSize and containerLogMaxFiles in kubernetes documentation. Could someone clarify what is the rightway to pass these settings to kubelet when we are using eks managed node groups.

Screenshot 2024-05-27 at 7 22 35 PM

If your request is for a new feature, please use the Feature request template.

⚠️ Note

Before you submit an issue, please perform the following first:

Versions

20.8.5

Reproduction Code [Required]

eks_managed_node_groups = {        
    complete = {

      name            = "${local.environment}-managed-node-groups"
      use_name_prefix = true

      subnet_ids = local.private_subnet_ids

      min_size     = 1
      max_size     = 8
      desired_size = 2

      ami_id                     = var.eks_image_id
      enable_bootstrap_user_data = true

      pre_bootstrap_user_data = <<-EOT
        echo "${local.environment} eks cluster pre bootstrap user data"
      EOT

      post_bootstrap_user_data = <<-EOT
        echo "${local.environment} eks cluster post bootstrap user data"
      EOT

      capacity_type        = "ON_DEMAND"
      force_update_version = true
      instance_types       = ["m5.large"]
      labels = {
        Environment = local.environment
      }

      taints = [
      ]

      update_config = {
        max_unavailable_percentage = 33 # or set `max_unavailable`
      }

      description = "${var.environment_name} managed node groups launch template"

      ebs_optimized           = true
      disable_api_termination = false
      enable_monitoring       = true

      block_device_mappings = {}

      metadata_options = {
        http_endpoint               = "enabled"
        http_tokens                 = "required"
        http_put_response_hop_limit = 2
        instance_metadata_tags      = "disabled"
      }

      create_iam_role              = true
      iam_role_name                = "${var.environment_name}ManagedNodeGroupRole"
      iam_role_use_name_prefix     = false
      iam_role_description         = "${var.environment_name} managed node group role"
      iam_role_tags                = {}
      iam_role_additional_policies = {}

      launch_template_tags = {}

      tags = var.tags
    }
  }

This is more a question than bug.

Steps to reproduce the behavior:

Question instead of bug

Expected behavior

Actual behavior

Terminal Output Screenshot(s)

Additional context

github-actions[bot] commented 1 week ago

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