mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Initial node drain implementation for #3885.
It cordons (marks unschedulable) the given node, and then deletes every pod on it, optionally using a grace period. It will not delete pods managed by neither a ReplicationController nor a DaemonSet without the use of --force. Also add cordon/uncordon, which just toggle node schedulability.
This commit is contained in:
@@ -232,6 +232,7 @@ func NewAPIFactory() (*cmdutil.Factory, *testFactory, runtime.Codec) {
|
||||
fakeClient := t.Client.(*fake.RESTClient)
|
||||
c := client.NewOrDie(t.ClientConfig)
|
||||
c.Client = fakeClient.Client
|
||||
c.ExtensionsClient.Client = fakeClient.Client
|
||||
return c, t.Err
|
||||
},
|
||||
RESTClient: func(*meta.RESTMapping) (resource.RESTClient, error) {
|
||||
|
||||
Reference in New Issue
Block a user