Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Avoid some deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Jul 31, 2020
1 parent c197624 commit 28e482a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prog/weave-npc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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)))
Expand Down

0 comments on commit 28e482a

Please sign in to comment.