fix(eks): apply eks.amazonaws.com/nodegroup label via k3s node-label drop-in (#534)

The nodegroup label was only written to K3S_NODE_LABEL in agent.env, but
k3s has no such env var, so non-GPU workers never received the label.
waitWorkersReady buckets Ready nodes by that label (added in #511), so
the affected nodegroups never counted toward their ACTIVE transition and
stayed CREATING until timeout.

Ride the label on a real k3s node-label config drop-in
(15-nodegroup-label.yaml), delivered via cloud-init user-data. Drop the
inert K3S_NODE_LABEL from agent.env and the initd export.
This commit is contained in:
Josh Siviour
2026-07-14 12:43:42 +10:00
committed by GitHub
parent 1b0a14909f
commit 4d8a34b545
3 changed files with 27 additions and 10 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ start_pre() {
if [ -f /etc/spinifex-eks/agent.env ]; then
# shellcheck disable=SC1091
. /etc/spinifex-eks/agent.env
export K3S_URL K3S_TOKEN K3S_NODE_NAME K3S_NODE_LABEL
export K3S_URL K3S_TOKEN K3S_NODE_NAME
fi
if [ -z "${K3S_URL:-}" ] || [ -z "${K3S_TOKEN:-}" ]; then
eerror "K3S_URL and K3S_TOKEN must be set in /etc/spinifex-eks/agent.env"