Skip to content

Commit

Permalink
fix: panic when node has nil annotations
Browse files Browse the repository at this point in the history
(cherry picked from commit 057ade9)
  • Loading branch information
oilbeater committed Aug 5, 2021
1 parent 554cc04 commit 7831f80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ func (c *Controller) handleAddNode(key string) error {
}]`
op := "replace"
if len(node.Annotations) == 0 {
node.Annotations = map[string]string{}
op = "add"
}

Expand Down

0 comments on commit 7831f80

Please sign in to comment.