Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the node name instead of the hostname to build the injector pod #2119

Merged
merged 6 commits into from
Nov 6, 2023
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
Loading