From 28e482af1462891a522eab3bf3d1dd9b5af21174 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 11 Oct 2019 11:32:12 +0000 Subject: [PATCH] Avoid some deprecated APIs --- prog/weave-npc/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prog/weave-npc/main.go b/prog/weave-npc/main.go index ab6ffebae2..2942b8857e 100644 --- a/prog/weave-npc/main.go +++ b/prog/weave-npc/main.go @@ -248,7 +248,7 @@ func root(cmd *cobra.Command, args []string) { npc := npc.New(nodeName, ipt, ips, client) - nsController := makeController(client.Core().RESTClient(), "namespaces", &coreapi.Namespace{}, + nsController := makeController(client.CoreV1().RESTClient(), "namespaces", &coreapi.Namespace{}, cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { handleError(npc.AddNamespace(obj.(*coreapi.Namespace))) @@ -268,7 +268,7 @@ func root(cmd *cobra.Command, args []string) { handleError(npc.UpdateNamespace(old.(*coreapi.Namespace), new.(*coreapi.Namespace))) }}) - podController := makeController(client.Core().RESTClient(), "pods", &coreapi.Pod{}, + podController := makeController(client.CoreV1().RESTClient(), "pods", &coreapi.Pod{}, cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { handleError(npc.AddPod(obj.(*coreapi.Pod)))