From 4cd790d891ec7e06683bde4254224fbd82de67d0 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Tue, 31 Oct 2023 17:51:41 -0600 Subject: [PATCH] fix: use the node name instead of the hostname to build the injector pod --- src/internal/cluster/injector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/cluster/injector.go b/src/internal/cluster/injector.go index f89bfbf491..a472b18205 100644 --- a/src/internal/cluster/injector.go +++ b/src/internal/cluster/injector.go @@ -304,7 +304,7 @@ func (c *Cluster) buildInjectionPod(node, image string, payloadConfigmaps []stri pod.Labels[agentLabel] = "ignore" // Bind the pod to the node the image was found on - pod.Spec.NodeSelector = map[string]string{"kubernetes.io/hostname": node} + pod.Spec.NodeName = node // Do not try to restart the pod as it will be deleted/re-created instead pod.Spec.RestartPolicy = corev1.RestartPolicyNever