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

change the to use kubelet_extra_args for bottlerocket #33

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

liyihuang
Copy link
Contributor

this is the PR so we can use kubelet_extra_args for bottlerocket

module "eks" {
  source = "../terraform-aws-eks"

  disable_aws_vpc_cni_plugin = true
  kubernetes_version         = var.kubernetes_version
  manage_aws_auth_configmap  = true
  name                       = local.cluster_name
  region                     = var.region
  tags                       = var.tags
  vpc_id                     = module.vpc.id

  self_managed_node_groups = {
    x86 = {
      platform                 = "bottlerocket"
      ami_name_filter          = var.x86_ami_name_filter
      extra_tags               = {}
      instance_type            = var.x86_worker_instance_type
      kubelet_extra_args       = <<-EOT
        [settings.host-containers.admin]
        enabled = true
        [settings.host-containers.control]
        enabled = true
        [settings.kubernetes.node-taints]
        "node.cilium.io/agent-not-ready" = "true:NoExecute"
      EOT
      max_nodes                = var.worker_max_nodes
      min_nodes                = var.worker_min_nodes
      name                     = "x86"
      post_bootstrap_user_data = ""
      pre_bootstrap_user_data  = ""
      root_volume_id           = "/dev/xvda"
      root_volume_size         = var.worker_root_volume_size
      root_volume_type         = "gp3"
      subnet_ids               = module.vpc.private_subnet_ids
      iam_role_additional_policies = {
        additional = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
      }
    },

Here is what I use.

I think it's better just use it this way so we dont break the exsiting kubelet_extra_args for other non-bottlerocket

Copy link
Contributor

@f1ko f1ko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one clarification comment.

eks.tf Outdated Show resolved Hide resolved
@liyihuang liyihuang merged commit 3bc6fc4 into main Feb 22, 2024
2 checks passed
@liyihuang liyihuang deleted the pr/liyi/bootstrap_extra_args_for_bottlerocket branch February 22, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants