Skip to content

Commit

Permalink
fix: use the node name instead of the hostname to build the injector pod
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed Oct 31, 2023
1 parent 6a6be54 commit 4cd790d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/cluster/injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4cd790d

Please sign in to comment.