Skip to content

Commit

Permalink
Add blanket "NoSchedule" toleration to trace pod
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sethp-nr authored and fntlnz committed Feb 4, 2020
1 parent 9251eba commit 971124a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/tracejob/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ func (t *TraceJobClient) CreateJob(nj TraceJob) (*batchv1.Job, error) {
},
},
},
Tolerations: []apiv1.Toleration{
apiv1.Toleration{
Effect: apiv1.TaintEffectNoSchedule,
Operator: apiv1.TolerationOpExists,
},
},
},
},
},
Expand Down

0 comments on commit 971124a

Please sign in to comment.