mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #42115 from justinsb/kubectl_expose_drainoptions
Automatic merge from submit-queue (batch tested with PRs 42162, 41973, 42015, 42115, 41923) kubectl drain: make code reusable DrainOptions requires a few fields to be set, and the expectation is that these are set as part of construction of the object. If they are set, then the drain code can be reused in other kubernetes projects. This does not create a contract that DrainOptions should fulfill going forwards, any more than any of the other types that happen to be exposed are part of the contract. Instead, this merely makes use outside the package possible. ```release-note NONE ```
This commit is contained in:
@@ -732,7 +732,7 @@ func TestDeletePods(t *testing.T) {
|
||||
f, _, _, _ := cmdtesting.NewAPIFactory()
|
||||
o := DrainOptions{}
|
||||
o.mapper, _ = f.Object()
|
||||
o.out = os.Stdout
|
||||
o.Out = os.Stdout
|
||||
_, pods := createPods(false)
|
||||
pendingPods, err := o.waitForDelete(pods, test.interval, test.timeout, false, test.getPodFn)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user