diff --git a/pkg/templates/partials/manifests.yaml.tmpl b/pkg/templates/partials/manifests.yaml.tmpl index d0eeed9..4aa5476 100644 --- a/pkg/templates/partials/manifests.yaml.tmpl +++ b/pkg/templates/partials/manifests.yaml.tmpl @@ -707,7 +707,14 @@ spec: app: toe control-plane: controller-manager spec: + # TOE mounts the device keys from hostPath /etc/teknoir and signs its MQTT JWT with them, so + # it must run on the k3s server node (the device identity). k3s labels server nodes with + # node-role.kubernetes.io/control-plane=true; joined agent nodes do not carry it. + # Keep nodeSelector on the line right after priorityClassName: playbooks/toe-image.yml in the + # ansible repo recognises the pin only there. priorityClassName: high-priority-toe + nodeSelector: + node-role.kubernetes.io/control-plane: "true" containers: - args: - --health-probe-bind-address=:8081 diff --git a/pkg/templates/testdata/docker_server.golden.sh b/pkg/templates/testdata/docker_server.golden.sh index 134d25e..7b5f2e9 100644 --- a/pkg/templates/testdata/docker_server.golden.sh +++ b/pkg/templates/testdata/docker_server.golden.sh @@ -855,7 +855,14 @@ spec: app: toe control-plane: controller-manager spec: + # TOE mounts the device keys from hostPath /etc/teknoir and signs its MQTT JWT with them, so + # it must run on the k3s server node (the device identity). k3s labels server nodes with + # node-role.kubernetes.io/control-plane=true; joined agent nodes do not carry it. + # Keep nodeSelector on the line right after priorityClassName: playbooks/toe-image.yml in the + # ansible repo recognises the pin only there. priorityClassName: high-priority-toe + nodeSelector: + node-role.kubernetes.io/control-plane: "true" containers: - args: - --health-probe-bind-address=:8081 diff --git a/pkg/templates/testdata/server.golden.sh b/pkg/templates/testdata/server.golden.sh index 4964287..c1a2ed7 100644 --- a/pkg/templates/testdata/server.golden.sh +++ b/pkg/templates/testdata/server.golden.sh @@ -2763,7 +2763,14 @@ spec: app: toe control-plane: controller-manager spec: + # TOE mounts the device keys from hostPath /etc/teknoir and signs its MQTT JWT with them, so + # it must run on the k3s server node (the device identity). k3s labels server nodes with + # node-role.kubernetes.io/control-plane=true; joined agent nodes do not carry it. + # Keep nodeSelector on the line right after priorityClassName: playbooks/toe-image.yml in the + # ansible repo recognises the pin only there. priorityClassName: high-priority-toe + nodeSelector: + node-role.kubernetes.io/control-plane: "true" containers: - args: - --health-probe-bind-address=:8081 diff --git a/pkg/templates/testdata/server.roles.golden.sh b/pkg/templates/testdata/server.roles.golden.sh index 96ad4bf..076a8ec 100644 --- a/pkg/templates/testdata/server.roles.golden.sh +++ b/pkg/templates/testdata/server.roles.golden.sh @@ -2916,7 +2916,14 @@ spec: app: toe control-plane: controller-manager spec: + # TOE mounts the device keys from hostPath /etc/teknoir and signs its MQTT JWT with them, so + # it must run on the k3s server node (the device identity). k3s labels server nodes with + # node-role.kubernetes.io/control-plane=true; joined agent nodes do not carry it. + # Keep nodeSelector on the line right after priorityClassName: playbooks/toe-image.yml in the + # ansible repo recognises the pin only there. priorityClassName: high-priority-toe + nodeSelector: + node-role.kubernetes.io/control-plane: "true" containers: - args: - --health-probe-bind-address=:8081