Skip to content

Commit

Permalink
Merge pull request #319 from soltysh/bug1801285
Browse files Browse the repository at this point in the history
Bug 1801285: set nodeName for debug pod only when explicitly set
  • Loading branch information
openshift-merge-robot committed Feb 26, 2020
2 parents f0f5994 + 53a27bb commit 6c8fa40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cli/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,8 @@ func (o *DebugOptions) getLogs(pod *corev1.Pod) error {
}

func setNodeName(template *corev1.PodTemplateSpec, nodeName string) *corev1.PodTemplateSpec {
template.Spec.NodeName = nodeName
if len(nodeName) > 0 {
template.Spec.NodeName = nodeName
}
return template
}

0 comments on commit 6c8fa40

Please sign in to comment.