Terraform-aws-eks: Unable to pass multiple kubelet_extra_args in worker group launch template

Created on 22 Mar 2020  路  1Comment  路  Source: terraform-aws-modules/terraform-aws-eks

I have issues

I'm submitting a...

  • [ ] bug report
  • [ ] feature request
  • [x] support request - read the FAQ first!
  • [ ] kudos, thank you, warm fuzzy

What is the current behavior?

I'm defining a worker group launch template like so:

{
      name                 = "worker-group-1"
      instance_type        = var.instance_type
      asg_min_size         = var.asg_min_size
      asg_max_size         = var.asg_max_size
      asg_desired_capacity = var.asg_desired_size
      kubelet_extra_args   = "--node-labels=mykey=myvalue --register-with-taints=mykey=myvalue" 
}

And I see the extra args are injected to the userData on AWS like so:

--kubelet-extra-args "--node-labels=mykey=myvalue --register-with-taints=mykey=myvalue:NoSchedule"

But yet I'm getting no labels and no taints.

If I drop one of them it will work, but I can't get both of them to work together. Tried wrapping with a single quote, no success.

If this is a bug, how to reproduce? Please include a code sample if relevant.

Shown above.

What's the expected behavior?

The worker group should have the label and taint that I set.

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

  • Affected module version: 10.0.0
  • OS: macOS Catalina 10.15.3
  • Terraform version: 0.12.21

Any other relevant info

If I edit the userData manually on AWS to have single quotes instead of double quotes, everything works as expected.

>All comments

closing this as #474 is now merged.

Was this page helpful?
0 / 5 - 0 ratings