From 4159190a46def188b682914531ddf43b802d9884 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Wed, 31 Jan 2024 14:55:17 -0500 Subject: [PATCH] fix(k0s): only include workers in autopilot if there are any --- .../kubernetes/apps/system-upgrade/k0s/app/plan.yaml.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap/templates/kubernetes/apps/system-upgrade/k0s/app/plan.yaml.j2 b/bootstrap/templates/kubernetes/apps/system-upgrade/k0s/app/plan.yaml.j2 index 2b355233..e167bc69 100644 --- a/bootstrap/templates/kubernetes/apps/system-upgrade/k0s/app/plan.yaml.j2 +++ b/bootstrap/templates/kubernetes/apps/system-upgrade/k0s/app/plan.yaml.j2 @@ -18,6 +18,8 @@ spec: controllers: discovery: selector: {} + {% if cluster.nodes.inventory | selectattr('controller', 'equalto', False) | list | length %} workers: discovery: selector: {} + {% endif %}