File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
staging/src/k8s.io/kubectl/pkg/drain Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ func (d *Helper) EvictPod(pod corev1.Pod, evictionGroupVersion schema.GroupVersi
159
159
},
160
160
DeleteOptions : & delOpts ,
161
161
}
162
- return d .Client .PolicyV1 ().Evictions (eviction .Namespace ).Evict (context . TODO (), eviction )
162
+ return d .Client .PolicyV1 ().Evictions (eviction .Namespace ).Evict (d . getContext (), eviction )
163
163
164
164
default :
165
165
// otherwise, fall back to policy/v1beta1, supported by all servers that support the eviction subresource
@@ -170,7 +170,7 @@ func (d *Helper) EvictPod(pod corev1.Pod, evictionGroupVersion schema.GroupVersi
170
170
},
171
171
DeleteOptions : & delOpts ,
172
172
}
173
- return d .Client .PolicyV1beta1 ().Evictions (eviction .Namespace ).Evict (context . TODO (), eviction )
173
+ return d .Client .PolicyV1beta1 ().Evictions (eviction .Namespace ).Evict (d . getContext (), eviction )
174
174
}
175
175
}
176
176
You can’t perform that action at this time.
0 commit comments