Merge pull request #102677 from yuzhiquan/deprecated-warning-for-drain

Deprecated message for ignore-errors flag
This commit is contained in:
Kubernetes Prow Robot 2021-07-06 22:11:03 -07:00 committed by GitHub
commit 99f77725c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ var (
The given node will be marked unschedulable to prevent new pods from arriving. The given node will be marked unschedulable to prevent new pods from arriving.
'drain' evicts the pods if the APIServer supports '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. DELETE to delete the pods.
The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through 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 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 When you are ready to put the node back into service, use kubectl uncordon, which
will make the node schedulable again. will make the node schedulable again.
![Workflow](http://kubernetes.io/images/docs/kubectl_drain.svg)`)) ![Workflow](https://kubernetes.io/images/docs/kubectl_drain.svg)`))
drainExample = templates.Examples(i18n.T(` 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. # 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) fmt.Fprintf(o.ErrOut, "error: unable to drain node %q due to error:%s, continuing command...\n", info.Name, err)
continue 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) fmt.Fprintf(o.ErrOut, "error: unable to drain node %q, aborting command...\n\n", info.Name)
remainingNodes := []string{} remainingNodes := []string{}
fatal = err fatal = err