Skip to content

Commit

Permalink
revert to use update for node label update (#1959)
Browse files Browse the repository at this point in the history
Co-authored-by: Jayanth Varavani <[email protected]>
  • Loading branch information
M00nF1sh and jayanthvn authored Apr 11, 2022
1 parent 8e94299 commit c1899b1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/aws-vpc-cni/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch", "get", "update", "patch"]
verbs: ["list", "watch", "get", "update"]
- apiGroups: ["extensions"]
resources:
- '*'
Expand Down
2 changes: 1 addition & 1 deletion config/master/aws-k8s-cni-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch", "get", "update", "patch"]
verbs: ["list", "watch", "get", "update"]
- apiGroups: ["extensions"]
resources:
- '*'
Expand Down
2 changes: 1 addition & 1 deletion config/master/aws-k8s-cni-us-gov-east-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch", "get", "update", "patch"]
verbs: ["list", "watch", "get", "update"]
- apiGroups: ["extensions"]
resources:
- '*'
Expand Down
2 changes: 1 addition & 1 deletion config/master/aws-k8s-cni-us-gov-west-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch", "get", "update", "patch"]
verbs: ["list", "watch", "get", "update"]
- apiGroups: ["extensions"]
resources:
- '*'
Expand Down
2 changes: 1 addition & 1 deletion config/master/aws-k8s-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ rules:
- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch", "get", "update", "patch"]
verbs: ["list", "watch", "get", "update"]
- apiGroups: ["extensions"]
resources:
- '*'
Expand Down
2 changes: 1 addition & 1 deletion pkg/ipamd/ipamd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ func (c *IPAMContext) SetNodeLabel(ctx context.Context, key, value string) error
delete(updateNode.Labels, key)
}

if err = c.cachedK8SClient.Patch(ctx, updateNode, client.StrategicMergeFrom(node)); err != nil {
if err = c.cachedK8SClient.Update(ctx, updateNode); err != nil {
log.Errorf("Failed to patch node %s with label %q: %q, error: %v", c.myNodeName, key, value, err)
return err
}
Expand Down

0 comments on commit c1899b1

Please sign in to comment.