mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #102677 from yuzhiquan/deprecated-warning-for-drain
Deprecated message for ignore-errors flag
This commit is contained in:
commit
99f77725c8
@ -115,7 +115,7 @@ var (
|
||||
|
||||
The given node will be marked unschedulable to prevent new pods from arriving.
|
||||
'drain' evicts the pods if the APIServer supports
|
||||
[eviction](http://kubernetes.io/docs/admin/disruptions/). Otherwise, it will use normal
|
||||
[eviction](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/). Otherwise, it will use normal
|
||||
DELETE to delete the pods.
|
||||
The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through
|
||||
the API server). If there are DaemonSet-managed pods, drain will not proceed
|
||||
@ -133,7 +133,7 @@ var (
|
||||
When you are ready to put the node back into service, use kubectl uncordon, which
|
||||
will make the node schedulable again.
|
||||
|
||||
`))
|
||||
`))
|
||||
|
||||
drainExample = templates.Examples(i18n.T(`
|
||||
# Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet on it.
|
||||
@ -314,6 +314,9 @@ func (o *DrainCmdOptions) RunDrain() error {
|
||||
fmt.Fprintf(o.ErrOut, "error: unable to drain node %q due to error:%s, continuing command...\n", info.Name, err)
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(o.ErrOut, "DEPRECATED WARNING: Aborting the drain command in a list of nodes will be deprecated in v1.23.\n"+
|
||||
"The new behavior will make the drain command go through all nodes even if one or more nodes failed during the drain.\n"+
|
||||
"For now, users can try such experience via: --ignore-errors\n")
|
||||
fmt.Fprintf(o.ErrOut, "error: unable to drain node %q, aborting command...\n\n", info.Name)
|
||||
remainingNodes := []string{}
|
||||
fatal = err
|
||||
|
Loading…
Reference in New Issue
Block a user