Commit 0e94e943 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49438 from zhangxiaoyu-zidif/delete-err-def-for-drain

Automatic merge from submit-queue (batch tested with PRs 48911, 49475, 49438, 49362, 49274) Delete redundant err definition **What this PR does / why we need it**: Delete redundant err definition line 642 has its definition and initialization, so line 641 is redundant. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # NONE **Special notes for your reviewer**: NONE **Release note**: ```release-note NONE ```
parents 159dcbfb 1b785d09
...@@ -641,7 +641,6 @@ func (o *DrainOptions) RunCordonOrUncordon(desired bool) error { ...@@ -641,7 +641,6 @@ func (o *DrainOptions) RunCordonOrUncordon(desired bool) error {
} else { } else {
helper := resource.NewHelper(o.restClient, o.nodeInfo.Mapping) helper := resource.NewHelper(o.restClient, o.nodeInfo.Mapping)
node.Spec.Unschedulable = desired node.Spec.Unschedulable = desired
var err error
newData, err := json.Marshal(obj) newData, err := json.Marshal(obj)
patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, obj) patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, obj)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment