-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Windows node support #139
Windows node support #139
Conversation
@osterman How often are PRs reviewed ooi? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisMcKee looks good, please see comments
/test all |
Just trying to work out why it's stopped working. It all spins up but the nodes don't link to eks.. |
@ChrisMcKee resolved conflicts and merged changes in |
Relies on cloudposse/terraform-aws-eks-cluster#175 |
Probably made git cry but rebased off master and squashed out all the autoformat commits etc. |
@aknysh all good now; I've pushed out a few windows node groups to our internal clusters using this combined with the cluster pr. |
@aknysh sorry for the repeated changes after the fact; I hit an issue randomly after using my fork since the pr went up and, as you do, I assumed I'd missed a commit or messed up. Turned out to be a flipping bug with kube-proxy 🤦 The module as it stands works. The only remaining issue I have with it is the validation in the variables file over release; the regex is obviously setup like that for a reason but the Windows AMI's dont follow the same setup |
I've changed the regex to the original plus an or to cover the windows ami format. |
Add taint example to windows doc
Co-authored-by: Andriy Knysh <aknysh@users.noreply.github.com>
* Add the windows taint by default to windows nodes * Correct ami_kind filter * Alter userdata nt to match current userscript * Guard userdata against errors from userscript stopping node-join. * Remove disk_size * Add windnows_coredns_service_address because EKS Windows networking isn't fab.
…rrect place and remove extraneous params (based on eksctl code base and aws generated script)
@nitrocode @aknysh This will also resolve pr #137 & issue #133 |
/test all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @ChrisMcKee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was already merged, but I made some comments I hope will be addressed in the future.
windows_taint = [{ | ||
key = "OS" | ||
value = "Windows" | ||
effect = "NO_SCHEDULE" | ||
}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A taint like this, with a non-standard key, should at least be optional. I would argue it should be supplied by the user if desired, because they may already be using a different key for tainting by OS or may not want to taint at all and instead rely on node selectors with the "well-known" kubernetes.io/os
label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd use the nodeselector but the taint stops the mass of ingress/nginx/haproxy/grafana helm default installs from pointlessly trying to install on the nodes.
I did leave it out originally and just had it in the docs. 🤷♀️
capacity_type = var.capacity_type | ||
labels = var.kubernetes_labels == null ? {} : var.kubernetes_labels | ||
|
||
taints = local.is_windows ? concat(local.windows_taint, var.kubernetes_taints) : var.kubernetes_taints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This taint should be optional and arguably default to not set. See comment above where the taint is defined.
@@ -4,6 +4,7 @@ Content-Type: multipart/mixed; boundary="/:/+++" | |||
--/:/+++ | |||
Content-Type: text/x-shellscript; charset="us-ascii" | |||
#!/bin/bash | |||
set -ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a fan of this in userdata scripts because the echo can reveal secrets (echoed data gets logged, logs get shipped to a log aggregator, people without any access to the machines get to read the logs via the log aggregator) and given that users can add snippets to this script without the benefit of context, this risks blowing up a whole node group by something as simple as grep
failing to find the pattern in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively the userscript could be surrounded in the same way as the powershell userscript surrounds the pre/post.
-e just ensures that an error raises an error code
-x write to standard error / expand commmand before execution.
Witout it the shipped log would be quite useless / we don't ship userdata but I expect ymmv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave the set -ex
up to the user to set. -x
can expose secrets the script accesses, -e
doesn't just ensure the error raises an error code, is stops the execution of the script if a command returns a non-zero status. Both grep
and diff
routinely return non-zero status in normal operation.
what
why
references
Tested
related