func kubernetesUpdateNodeEventHandler(o, n interface{}) {
	_, ok := n.(*v1.Node)
	if !ok {
		log.Printf("Error processing Update Event received for node(%s) ", n)
		return
	}
}
kubernetesUpdateNodeEventHandler currently doesn't do anything yet.
TODO: If node shows up with new IP or romana CIDR,
then accommodate it if possible.
package main
import (
	"errors"
	"flag"
	"fmt"
	"log"
	"os"
	"os/signal"
	"regexp"
	"strings"
	"time"
	rcommon "github.com/romana/core/common"
	kcommon "github.com/romana/kube/common"
	config "github.com/spf13/viper"
	"k8s.io/client-go/1.5/kubernetes"
	"k8s.io/client-go/1.5/pkg/api"
	"k8s.io/client-go/1.5/pkg/api/v1"
	"k8s.io/client-go/1.5/pkg/fields"
	"k8s.io/client-go/1.5/tools/cache"
	"k8s.io/client-go/1.5/tools/clientcmd"
)
func main() {
	var kubeConfig = flag.String("kubeconfig", os.Getenv("HOME")+"/.kube/config",
		"Kubernetes config file.")
	var romanaConfig = flag.String("romanaconfig", os.Getenv("HOME")+"/.romana.yaml",
		"Romana config file.")
	version := flag.Bool("version", false, "Build Information.")
	flag.Parse()
	if *version {
		fmt.Println(kcommon.BuildInfo())
		return
	}
	if *kubeConfig == "" {
		log.Println("Error: must have kubernetes config files specified.")
		os.Exit(1)
	}
	if err := initConfig(*romanaConfig); err != nil {
		log.Println("Error reading romana config file: ", err)
		os.Exit(1)
	}
	setRomanaRootURL()
	kConfig, err := clientcmd.BuildConfigFromFlags("", *kubeConfig)
	if err != nil {
		log.Println("Error: ", err.Error())
		os.Exit(1)
	}
	restClientSet, err := kubernetes.NewForConfig(kConfig)
	if err != nil {
		log.Println("Error: ", err.Error())
		os.Exit(1)
	}
	stop := make(chan struct{}, 1)
	nodeWatcher := cache.NewListWatchFromClient(
		restClientSet.CoreClient,
		"nodes",
		api.NamespaceAll,
		fields.Everything())
	_, nodeInformer := cache.NewInformer(
		nodeWatcher,
		&v1.Node{},
		time.Minute,
		cache.ResourceEventHandlerFuncs{
			AddFunc:    kubernetesAddNodeEventHandler,
			UpdateFunc: kubernetesUpdateNodeEventHandler,
			DeleteFunc: kubernetesDeleteNodeEventHandler,
		},
	)
	log.Println("Starting receving node events.")
	go nodeInformer.Run(stop)
	c := make(chan os.Signal, 1)
	signal.Notify(c, os.Interrupt)
	<-c
	close(stop)
	log.Println("Stopped watching node events and quitting watchnodes.")
}
func kubernetesAddNodeEventHandler(n interface{}) {
	node, ok := n.(*v1.Node)
	if !ok {
		log.Printf("Error processing Add Event received for node(%s) ", n)
		return
	}
	log.Printf("Add Event received for node(%s, %s, %d) ",
		node.Name, node.Status.Addresses, len(node.Status.Addresses))
	if err := romanaHostAdd(node); err != nil {
		log.Printf("Error processing Add Event received for node(%s): %s",
			node.Name, err)
		return
	}
	log.Printf("Node (%s) successful added to romana cluster.", node.Name)
}