Ensure node.Annotations is non-nil before adding new values
@@ -380,6 +380,9 @@ func (c *Controller) processNode(node *corev1.Node) error {
glog.V(3).Infof("Found machine %s for node %s", machineKey, node.Name)
modNode := node.DeepCopy()
+ if modNode.Annotations == nil {
+ modNode.Annotations = map[string]string{}
+ }
modNode.Annotations[machineAnnotationKey] = fmt.Sprintf("%s/%s", matchingMachine.Namespace, matchingMachine.Name)
if modNode.Labels == nil {
