mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
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 ```
This commit is contained in:
commit
0e94e9439f
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user