From 971124af252339d12c78f1017c370149adae9e8e Mon Sep 17 00:00:00 2001 From: sethp-nr <30441101+sethp-nr@users.noreply.github.com> Date: Wed, 8 Jan 2020 16:39:51 -0800 Subject: [PATCH] Add blanket "NoSchedule" toleration to trace pod We have a few nodes that we couldn't `kubectl trace` effectively because they were tainted to prevent arbitrary pods from being scheduled to them. In this case, however, we are specifically requesting for a pod to be scheduled to that node, but the taint was leaving the pod hanging in `Pending` until we manually edited the trace pod to add this toleration. --- pkg/tracejob/job.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/tracejob/job.go b/pkg/tracejob/job.go index 6a9517ec..08cab5df 100644 --- a/pkg/tracejob/job.go +++ b/pkg/tracejob/job.go @@ -337,6 +337,12 @@ func (t *TraceJobClient) CreateJob(nj TraceJob) (*batchv1.Job, error) { }, }, }, + Tolerations: []apiv1.Toleration{ + apiv1.Toleration{ + Effect: apiv1.TaintEffectNoSchedule, + Operator: apiv1.TolerationOpExists, + }, + }, }, }, },