aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2019-09-27 12:33:48 -0700
committerRitu Sood <ritu.sood@intel.com>2019-09-29 06:48:00 -0700
commit53279580afc48c90cbd28ab61799d9e81e41fffa (patch)
tree0d39c0b0531a1d1d0e0387b99f5130bb85406cf3
parenteae13a54dbdc442a450992f6c4811037ab30daab (diff)
Adding gRPC proto and server
gRPC server is required to send updates to nfn-agent running on all the nodes in the cluster, to setup provider networks as defined in the provider network CR. This patch includes proto file and generated code along with gRPC server code Change-Id: I891629d84932ae662ba7545ebfe4d9921448fdc1 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
-rw-r--r--cmd/nfn-operator/nfn-operator.go12
-rw-r--r--go.mod8
-rw-r--r--go.sum61
-rw-r--r--internal/pkg/nfnNotify/proto/nfn.pb.go493
-rw-r--r--internal/pkg/nfnNotify/proto/nfn.proto44
-rw-r--r--internal/pkg/nfnNotify/server.go262
-rw-r--r--pkg/apis/k8s/v1alpha1/providernetwork_types.go9
-rw-r--r--pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go29
8 files changed, 904 insertions, 14 deletions
diff --git a/cmd/nfn-operator/nfn-operator.go b/cmd/nfn-operator/nfn-operator.go
index 4749506..acd5924 100644
--- a/cmd/nfn-operator/nfn-operator.go
+++ b/cmd/nfn-operator/nfn-operator.go
@@ -10,8 +10,9 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"
"github.com/spf13/pflag"
- "ovn4nfv-k8s-plugin/pkg/apis"
+ notif "ovn4nfv-k8s-plugin/internal/pkg/nfnNotify"
"ovn4nfv-k8s-plugin/internal/pkg/ovn"
+ "ovn4nfv-k8s-plugin/pkg/apis"
"ovn4nfv-k8s-plugin/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
@@ -48,8 +49,8 @@ func main() {
printVersion()
// Create an OVN Controller
- _, err := ovn.NewOvnController(nil)
- if err != nil {
+ _, err := ovn.NewOvnController(nil)
+ if err != nil {
log.Error(err, "")
os.Exit(1)
}
@@ -61,6 +62,10 @@ func main() {
log.Error(err, "")
os.Exit(1)
}
+
+ // Start GRPC Notification Server
+ go notif.SetupNotifServer(cfg)
+
// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{})
if err != nil {
@@ -88,4 +93,5 @@ func main() {
log.Error(err, "Manager exited non-zero")
os.Exit(1)
}
+
}
diff --git a/go.mod b/go.mod
index b838d2b..86d4e50 100644
--- a/go.mod
+++ b/go.mod
@@ -7,6 +7,7 @@ require (
github.com/containernetworking/plugins v0.8.1
github.com/coreos/go-iptables v0.4.2 // indirect
github.com/go-logr/logr v0.1.0
+ github.com/golang/protobuf v1.3.2
github.com/google/btree v1.0.0 // indirect
github.com/gophercloud/gophercloud v0.2.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
@@ -24,18 +25,17 @@ require (
github.com/zmb3/gogetdoc v0.0.0-20190228002656-b37376c5da6a // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect
- golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 // indirect
- golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20190802220118-1d1727260058 // indirect
golang.org/x/tools/gopls v0.1.3 // indirect
+ google.golang.org/grpc v1.23.0
gopkg.in/gcfg.v1 v1.2.3
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/api v0.0.0-20190612125737-db0771252981
k8s.io/apimachinery v0.0.0-20190704094733-8f6ac2502e51
//k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
- k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 // indirect
+ k8s.io/code-generator v0.0.0-20190831074504-732c9ca86353 // indirect
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5
sigs.k8s.io/controller-runtime v0.2.0-beta.4
sigs.k8s.io/controller-tools v0.1.10
@@ -47,3 +47,5 @@ replace (
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.2.0-beta.4
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde
)
+
+go 1.13
diff --git a/go.sum b/go.sum
index 9555709..9c170f7 100644
--- a/go.sum
+++ b/go.sum
@@ -31,16 +31,19 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L
github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc=
github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
+github.com/PuerkitoBio/purell v1.0.0 h1:0GoNN3taZV6QI81IXgCbxMyEaJDXMSIjArYBCYzVVvs=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
+github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2 h1:JCHLVE3B+kJde7bIEo5N4J+ZbLhp0J1Fs+ulyRws4gE=
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
@@ -100,11 +103,13 @@ github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
+github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g=
github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ=
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
@@ -132,29 +137,37 @@ github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aA
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
+github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1 h1:wSt/4CYxs70xbATrGXhokKF1i0tZjENLOo1ioIO13zk=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8=
github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
+github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
+github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9 h1:tF+augKRWlWx0J0B7ZyyKSiTyV6E1zZe+7b3qQlcEf8=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk=
github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
+github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
+github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501 h1:C1JKChikHGpXwT5UQDFaryIpDtyyGL/CR6C2kB7F1oc=
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k4=
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
+github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
+github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87 h1:zP3nY8Tk2E6RTkqGYrarZXuzh+ffyLDljLxCy1iJw80=
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8=
github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
+github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
@@ -167,7 +180,10 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
+github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I=
+github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 h1:u4bArs140e9+AfE52mFHOXVFnOSBJBRlzTHrOPLOIhE=
@@ -184,6 +200,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
@@ -260,9 +278,12 @@ github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBv
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo=
+github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -272,12 +293,15 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a h1:TpvdAwDAt1K4ANVOfcihouRdvP+MgAfDWwBuct4l6ZY=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 h1:wL11wNW7dhKIcRCHSm4sHKPWz0tt4mwBsVodG7+Xyqg=
github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs=
github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8=
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0=
@@ -290,6 +314,7 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
@@ -367,6 +392,7 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 h1:0aNv3xC7DmQoy1/x1sMh18g+fihWW68LL13i8ao9kl4=
github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=
@@ -401,6 +427,7 @@ github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518/go.mod h1:CKI4AZ4XmG
github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
@@ -453,16 +480,22 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90Pveol
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE=
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
+golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 h1:QzoH/1pFpZguR8NrRHLcO6jKqfv2zpuSqZLgdm7ZmjI=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -484,9 +517,12 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJV
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68=
+golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -526,6 +562,7 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998=
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -548,15 +585,21 @@ golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181207195948-8634b1ecd393/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190213015956-f7e1b50d2251/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190710153321-831012c29e42/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190802220118-1d1727260058 h1:OsDcfiJHbqcv+S4eovUaiPY2ILzR76hXrjILS4sV4Wg=
golang.org/x/tools v0.0.0-20190802220118-1d1727260058/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
@@ -564,6 +607,9 @@ golang.org/x/tools/gopls v0.1.3 h1:CB5ECiPysqZrwxcyRjN+exyZpY0gODTZvNiqQi3lpeo=
golang.org/x/tools/gopls v0.1.3/go.mod h1:vrCQzOKxvuiZLjCKSmbbov04oeBQQOb4VQqwYK2PWIY=
gomodules.xyz/jsonpatch/v2 v2.0.0 h1:OyHbl+7IOECpPKfVK42oFr6N7+Y2dR+Jsb/IiDV3hOo=
gomodules.xyz/jsonpatch/v2 v2.0.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU=
+gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
+gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
+gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
@@ -592,6 +638,8 @@ google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM=
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -621,6 +669,7 @@ honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.0.0-20190222213804-5cb15d344471 h1:MzQGt8qWQCR+39kbYRd0uQqsvSidpYqJLFeWiJ9l4OE=
k8s.io/api v0.0.0-20190222213804-5cb15d344471/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
@@ -644,10 +693,13 @@ k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4/go.mod h1:7vJpHMYJwNQCWgzmNV
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible h1:U5Bt+dab9K8qaUmXINrkXO135kA11/i5Kg1RUydgaMQ=
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8=
+k8s.io/code-generator v0.0.0-20190831074504-732c9ca86353 h1:5ThSMjYOj3BFKSGhu4ol8ZdkuChW+dc33TyvySWbTTw=
+k8s.io/code-generator v0.0.0-20190831074504-732c9ca86353/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE=
k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/helm v2.13.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
@@ -656,6 +708,8 @@ k8s.io/klog v0.3.0 h1:0VPpR+sizsiivjIfIAQH/rl8tan6jvWkS7lU+0di3lE=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68=
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
+k8s.io/klog v0.4.0 h1:lCJCxf/LIowc2IGS9TPjWDyXY4nOmdGdfcwwDQCOURQ=
+k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU=
k8s.io/kube-aggregator v0.0.0-20181213152105-1e8cd453c474/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU=
k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
@@ -664,6 +718,8 @@ k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH
k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco=
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4=
+k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf h1:EYm5AW/UUDbnmnI+gK0TJDVK9qPLhM+sRHYanNKw0EQ=
+k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
k8s.io/kube-state-metrics v1.6.0 h1:6wkxiTPTZ4j+LoMWuT+rZ+OlUWswktzXs5yHmggmAZ0=
k8s.io/kube-state-metrics v1.6.0/go.mod h1:84+q9aGVQPzXYGgtvyhZr/fSI6BdLsbPWXn37RASc9k=
k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
@@ -672,6 +728,11 @@ k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7 h1:8r+l4bNWjRlsFYlQJnKJ2p7s1YQPj
k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 h1:VBM/0P5TWxwk+Nw6Z+lAw3DKgO76g90ETOiA6rfLV1Y=
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
+modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
+modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
+modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
+modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
+modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
sigs.k8s.io/controller-runtime v0.1.12 h1:ovDq28E64PeY1yR+6H7DthakIC09soiDCrKvfP2tPYo=
sigs.k8s.io/controller-runtime v0.1.12/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8=
sigs.k8s.io/controller-runtime v0.2.0-alpha.0 h1:WM6lu3SNU4SsMlDYvjJyLsG9nW3ffb/4/FpE2ZGrtnc=
diff --git a/internal/pkg/nfnNotify/proto/nfn.pb.go b/internal/pkg/nfnNotify/proto/nfn.pb.go
new file mode 100644
index 0000000..7f9a182
--- /dev/null
+++ b/internal/pkg/nfnNotify/proto/nfn.pb.go
@@ -0,0 +1,493 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: nfn.proto
+
+package nfn
+
+import (
+ context "context"
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type SubscribeContext struct {
+ NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SubscribeContext) Reset() { *m = SubscribeContext{} }
+func (m *SubscribeContext) String() string { return proto.CompactTextString(m) }
+func (*SubscribeContext) ProtoMessage() {}
+func (*SubscribeContext) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{0}
+}
+
+func (m *SubscribeContext) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SubscribeContext.Unmarshal(m, b)
+}
+func (m *SubscribeContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SubscribeContext.Marshal(b, m, deterministic)
+}
+func (m *SubscribeContext) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SubscribeContext.Merge(m, src)
+}
+func (m *SubscribeContext) XXX_Size() int {
+ return xxx_messageInfo_SubscribeContext.Size(m)
+}
+func (m *SubscribeContext) XXX_DiscardUnknown() {
+ xxx_messageInfo_SubscribeContext.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SubscribeContext proto.InternalMessageInfo
+
+func (m *SubscribeContext) GetNodeName() string {
+ if m != nil {
+ return m.NodeName
+ }
+ return ""
+}
+
+type Notification struct {
+ CniType string `protobuf:"bytes,1,opt,name=cni_type,json=cniType,proto3" json:"cni_type,omitempty"`
+ // Types that are valid to be assigned to Payload:
+ // *Notification_InSync
+ // *Notification_ProviderNwCreate
+ // *Notification_ProviderNwRemove
+ Payload isNotification_Payload `protobuf_oneof:"payload"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Notification) Reset() { *m = Notification{} }
+func (m *Notification) String() string { return proto.CompactTextString(m) }
+func (*Notification) ProtoMessage() {}
+func (*Notification) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{1}
+}
+
+func (m *Notification) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Notification.Unmarshal(m, b)
+}
+func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Notification.Marshal(b, m, deterministic)
+}
+func (m *Notification) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Notification.Merge(m, src)
+}
+func (m *Notification) XXX_Size() int {
+ return xxx_messageInfo_Notification.Size(m)
+}
+func (m *Notification) XXX_DiscardUnknown() {
+ xxx_messageInfo_Notification.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Notification proto.InternalMessageInfo
+
+func (m *Notification) GetCniType() string {
+ if m != nil {
+ return m.CniType
+ }
+ return ""
+}
+
+type isNotification_Payload interface {
+ isNotification_Payload()
+}
+
+type Notification_InSync struct {
+ InSync *InSync `protobuf:"bytes,2,opt,name=in_sync,json=inSync,proto3,oneof"`
+}
+
+type Notification_ProviderNwCreate struct {
+ ProviderNwCreate *ProviderNetworkCreate `protobuf:"bytes,3,opt,name=provider_nw_create,json=providerNwCreate,proto3,oneof"`
+}
+
+type Notification_ProviderNwRemove struct {
+ ProviderNwRemove *ProviderNetworkRemove `protobuf:"bytes,4,opt,name=provider_nw_remove,json=providerNwRemove,proto3,oneof"`
+}
+
+func (*Notification_InSync) isNotification_Payload() {}
+
+func (*Notification_ProviderNwCreate) isNotification_Payload() {}
+
+func (*Notification_ProviderNwRemove) isNotification_Payload() {}
+
+func (m *Notification) GetPayload() isNotification_Payload {
+ if m != nil {
+ return m.Payload
+ }
+ return nil
+}
+
+func (m *Notification) GetInSync() *InSync {
+ if x, ok := m.GetPayload().(*Notification_InSync); ok {
+ return x.InSync
+ }
+ return nil
+}
+
+func (m *Notification) GetProviderNwCreate() *ProviderNetworkCreate {
+ if x, ok := m.GetPayload().(*Notification_ProviderNwCreate); ok {
+ return x.ProviderNwCreate
+ }
+ return nil
+}
+
+func (m *Notification) GetProviderNwRemove() *ProviderNetworkRemove {
+ if x, ok := m.GetPayload().(*Notification_ProviderNwRemove); ok {
+ return x.ProviderNwRemove
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Notification) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*Notification_InSync)(nil),
+ (*Notification_ProviderNwCreate)(nil),
+ (*Notification_ProviderNwRemove)(nil),
+ }
+}
+
+type ProviderNetworkCreate struct {
+ ProviderNwName string `protobuf:"bytes,1,opt,name=provider_nw_name,json=providerNwName,proto3" json:"provider_nw_name,omitempty"`
+ Vlan *VlanInfo `protobuf:"bytes,2,opt,name=vlan,proto3" json:"vlan,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ProviderNetworkCreate) Reset() { *m = ProviderNetworkCreate{} }
+func (m *ProviderNetworkCreate) String() string { return proto.CompactTextString(m) }
+func (*ProviderNetworkCreate) ProtoMessage() {}
+func (*ProviderNetworkCreate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{2}
+}
+
+func (m *ProviderNetworkCreate) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ProviderNetworkCreate.Unmarshal(m, b)
+}
+func (m *ProviderNetworkCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ProviderNetworkCreate.Marshal(b, m, deterministic)
+}
+func (m *ProviderNetworkCreate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProviderNetworkCreate.Merge(m, src)
+}
+func (m *ProviderNetworkCreate) XXX_Size() int {
+ return xxx_messageInfo_ProviderNetworkCreate.Size(m)
+}
+func (m *ProviderNetworkCreate) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProviderNetworkCreate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProviderNetworkCreate proto.InternalMessageInfo
+
+func (m *ProviderNetworkCreate) GetProviderNwName() string {
+ if m != nil {
+ return m.ProviderNwName
+ }
+ return ""
+}
+
+func (m *ProviderNetworkCreate) GetVlan() *VlanInfo {
+ if m != nil {
+ return m.Vlan
+ }
+ return nil
+}
+
+type ProviderNetworkRemove struct {
+ ProviderNwName string `protobuf:"bytes,1,opt,name=provider_nw_name,json=providerNwName,proto3" json:"provider_nw_name,omitempty"`
+ VlanLogicalIntf string `protobuf:"bytes,2,opt,name=vlan_logical_intf,json=vlanLogicalIntf,proto3" json:"vlan_logical_intf,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ProviderNetworkRemove) Reset() { *m = ProviderNetworkRemove{} }
+func (m *ProviderNetworkRemove) String() string { return proto.CompactTextString(m) }
+func (*ProviderNetworkRemove) ProtoMessage() {}
+func (*ProviderNetworkRemove) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{3}
+}
+
+func (m *ProviderNetworkRemove) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ProviderNetworkRemove.Unmarshal(m, b)
+}
+func (m *ProviderNetworkRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ProviderNetworkRemove.Marshal(b, m, deterministic)
+}
+func (m *ProviderNetworkRemove) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProviderNetworkRemove.Merge(m, src)
+}
+func (m *ProviderNetworkRemove) XXX_Size() int {
+ return xxx_messageInfo_ProviderNetworkRemove.Size(m)
+}
+func (m *ProviderNetworkRemove) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProviderNetworkRemove.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProviderNetworkRemove proto.InternalMessageInfo
+
+func (m *ProviderNetworkRemove) GetProviderNwName() string {
+ if m != nil {
+ return m.ProviderNwName
+ }
+ return ""
+}
+
+func (m *ProviderNetworkRemove) GetVlanLogicalIntf() string {
+ if m != nil {
+ return m.VlanLogicalIntf
+ }
+ return ""
+}
+
+type VlanInfo struct {
+ VlanId string `protobuf:"bytes,1,opt,name=vlan_id,json=vlanId,proto3" json:"vlan_id,omitempty"`
+ ProviderIntf string `protobuf:"bytes,2,opt,name=provider_intf,json=providerIntf,proto3" json:"provider_intf,omitempty"`
+ LogicalIntf string `protobuf:"bytes,3,opt,name=logical_intf,json=logicalIntf,proto3" json:"logical_intf,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *VlanInfo) Reset() { *m = VlanInfo{} }
+func (m *VlanInfo) String() string { return proto.CompactTextString(m) }
+func (*VlanInfo) ProtoMessage() {}
+func (*VlanInfo) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{4}
+}
+
+func (m *VlanInfo) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_VlanInfo.Unmarshal(m, b)
+}
+func (m *VlanInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_VlanInfo.Marshal(b, m, deterministic)
+}
+func (m *VlanInfo) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_VlanInfo.Merge(m, src)
+}
+func (m *VlanInfo) XXX_Size() int {
+ return xxx_messageInfo_VlanInfo.Size(m)
+}
+func (m *VlanInfo) XXX_DiscardUnknown() {
+ xxx_messageInfo_VlanInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_VlanInfo proto.InternalMessageInfo
+
+func (m *VlanInfo) GetVlanId() string {
+ if m != nil {
+ return m.VlanId
+ }
+ return ""
+}
+
+func (m *VlanInfo) GetProviderIntf() string {
+ if m != nil {
+ return m.ProviderIntf
+ }
+ return ""
+}
+
+func (m *VlanInfo) GetLogicalIntf() string {
+ if m != nil {
+ return m.LogicalIntf
+ }
+ return ""
+}
+
+type InSync struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InSync) Reset() { *m = InSync{} }
+func (m *InSync) String() string { return proto.CompactTextString(m) }
+func (*InSync) ProtoMessage() {}
+func (*InSync) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5b809db4a7814953, []int{5}
+}
+
+func (m *InSync) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InSync.Unmarshal(m, b)
+}
+func (m *InSync) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InSync.Marshal(b, m, deterministic)
+}
+func (m *InSync) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InSync.Merge(m, src)
+}
+func (m *InSync) XXX_Size() int {
+ return xxx_messageInfo_InSync.Size(m)
+}
+func (m *InSync) XXX_DiscardUnknown() {
+ xxx_messageInfo_InSync.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InSync proto.InternalMessageInfo
+
+func init() {
+ proto.RegisterType((*SubscribeContext)(nil), "SubscribeContext")
+ proto.RegisterType((*Notification)(nil), "Notification")
+ proto.RegisterType((*ProviderNetworkCreate)(nil), "ProviderNetworkCreate")
+ proto.RegisterType((*ProviderNetworkRemove)(nil), "ProviderNetworkRemove")
+ proto.RegisterType((*VlanInfo)(nil), "VlanInfo")
+ proto.RegisterType((*InSync)(nil), "InSync")
+}
+
+func init() { proto.RegisterFile("nfn.proto", fileDescriptor_5b809db4a7814953) }
+
+var fileDescriptor_5b809db4a7814953 = []byte{
+ // 380 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0xaf, 0xd2, 0x40,
+ 0x14, 0xc5, 0xa9, 0x90, 0xfe, 0xb9, 0x80, 0xc2, 0x24, 0x6a, 0xd5, 0x98, 0x60, 0xdd, 0x10, 0x17,
+ 0xc5, 0xe0, 0xd6, 0x95, 0x24, 0x86, 0x26, 0xa6, 0x31, 0xc5, 0xb8, 0xad, 0xc3, 0x74, 0x6a, 0x26,
+ 0xb4, 0x77, 0x9a, 0x32, 0x82, 0xfd, 0xc6, 0xef, 0x63, 0xbc, 0x74, 0x4a, 0x79, 0x85, 0xc7, 0xe6,
+ 0xed, 0xda, 0x73, 0xee, 0x9c, 0xdf, 0xf4, 0xf6, 0x80, 0x83, 0x29, 0xfa, 0x45, 0x29, 0x95, 0xf4,
+ 0x16, 0x30, 0xd9, 0xfc, 0xdb, 0xee, 0x59, 0x29, 0xb6, 0x7c, 0x25, 0x51, 0xf1, 0xff, 0x8a, 0xbc,
+ 0x03, 0x07, 0x65, 0xc2, 0x63, 0xa4, 0x39, 0x77, 0x8d, 0x99, 0x31, 0x77, 0x22, 0xbb, 0x16, 0x42,
+ 0x9a, 0x73, 0xef, 0xce, 0x80, 0x51, 0x28, 0x95, 0x48, 0x05, 0xa3, 0x4a, 0x48, 0x24, 0x6f, 0xc0,
+ 0x66, 0x28, 0x62, 0x55, 0x15, 0xed, 0xb0, 0xc5, 0x50, 0xfc, 0xaa, 0x0a, 0x4e, 0x3c, 0xb0, 0x04,
+ 0xc6, 0xfb, 0x0a, 0x99, 0xfb, 0x6c, 0x66, 0xcc, 0x87, 0x4b, 0xcb, 0x0f, 0x70, 0x53, 0x21, 0x5b,
+ 0xf7, 0x22, 0x53, 0xe8, 0x27, 0xf2, 0x1d, 0x48, 0x51, 0xca, 0x83, 0x48, 0x78, 0x19, 0xe3, 0x31,
+ 0x66, 0x25, 0xa7, 0x8a, 0xbb, 0x7d, 0x3d, 0xfe, 0xca, 0xff, 0x79, 0xb2, 0x42, 0xae, 0x8e, 0xb2,
+ 0xdc, 0xad, 0xb4, 0xbb, 0xee, 0x45, 0x93, 0xf6, 0x4c, 0x78, 0x6c, 0xb4, 0xeb, 0x9c, 0x92, 0xe7,
+ 0xf2, 0xc0, 0xdd, 0xc1, 0xed, 0x9c, 0x48, 0xbb, 0x97, 0x39, 0x8d, 0xf6, 0xcd, 0x01, 0xab, 0xa0,
+ 0x55, 0x26, 0x69, 0xe2, 0xfd, 0x81, 0x97, 0x37, 0xf9, 0x64, 0x0e, 0x93, 0x2e, 0xab, 0xb3, 0xa7,
+ 0xe7, 0x0f, 0x79, 0xf5, 0xb6, 0xc8, 0x7b, 0x18, 0x1c, 0x32, 0x8a, 0xa7, 0xcf, 0x77, 0xfc, 0xdf,
+ 0x19, 0xc5, 0x00, 0x53, 0x19, 0x69, 0xd9, 0xcb, 0x1f, 0x11, 0x9a, 0x5b, 0x3c, 0x81, 0xf0, 0x09,
+ 0xa6, 0x75, 0x54, 0x9c, 0xc9, 0xbf, 0x82, 0xd1, 0x2c, 0x16, 0xa8, 0x52, 0x8d, 0x73, 0xa2, 0x17,
+ 0xb5, 0xf1, 0xa3, 0xd1, 0x03, 0x54, 0xa9, 0xb7, 0x03, 0xbb, 0xbd, 0x00, 0x79, 0x0d, 0x96, 0x3e,
+ 0x27, 0x92, 0x53, 0xb0, 0x59, 0xbf, 0x06, 0x09, 0xf9, 0x08, 0xe3, 0x33, 0xba, 0x13, 0x36, 0x6a,
+ 0xc5, 0x3a, 0x89, 0x7c, 0x80, 0xd1, 0x05, 0xb0, 0xaf, 0x67, 0x86, 0x59, 0x07, 0x66, 0x83, 0xd9,
+ 0xfc, 0xec, 0xe5, 0x57, 0x5d, 0x38, 0x5d, 0x9a, 0x8a, 0x2c, 0xc0, 0x39, 0x17, 0x8e, 0x4c, 0xfd,
+ 0xeb, 0xf2, 0xbd, 0x1d, 0xfb, 0xdd, 0x76, 0x7d, 0x36, 0xb6, 0xa6, 0x2e, 0xea, 0x97, 0xfb, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xa6, 0xd9, 0x3e, 0x9e, 0xb5, 0x02, 0x00, 0x00,
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// NfnNotifyClient is the client API for NfnNotify service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type NfnNotifyClient interface {
+ Subscribe(ctx context.Context, in *SubscribeContext, opts ...grpc.CallOption) (NfnNotify_SubscribeClient, error)
+}
+
+type nfnNotifyClient struct {
+ cc *grpc.ClientConn
+}
+
+func NewNfnNotifyClient(cc *grpc.ClientConn) NfnNotifyClient {
+ return &nfnNotifyClient{cc}
+}
+
+func (c *nfnNotifyClient) Subscribe(ctx context.Context, in *SubscribeContext, opts ...grpc.CallOption) (NfnNotify_SubscribeClient, error) {
+ stream, err := c.cc.NewStream(ctx, &_NfnNotify_serviceDesc.Streams[0], "/nfnNotify/Subscribe", opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &nfnNotifySubscribeClient{stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type NfnNotify_SubscribeClient interface {
+ Recv() (*Notification, error)
+ grpc.ClientStream
+}
+
+type nfnNotifySubscribeClient struct {
+ grpc.ClientStream
+}
+
+func (x *nfnNotifySubscribeClient) Recv() (*Notification, error) {
+ m := new(Notification)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// NfnNotifyServer is the server API for NfnNotify service.
+type NfnNotifyServer interface {
+ Subscribe(*SubscribeContext, NfnNotify_SubscribeServer) error
+}
+
+// UnimplementedNfnNotifyServer can be embedded to have forward compatible implementations.
+type UnimplementedNfnNotifyServer struct {
+}
+
+func (*UnimplementedNfnNotifyServer) Subscribe(req *SubscribeContext, srv NfnNotify_SubscribeServer) error {
+ return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
+}
+
+func RegisterNfnNotifyServer(s *grpc.Server, srv NfnNotifyServer) {
+ s.RegisterService(&_NfnNotify_serviceDesc, srv)
+}
+
+func _NfnNotify_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(SubscribeContext)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(NfnNotifyServer).Subscribe(m, &nfnNotifySubscribeServer{stream})
+}
+
+type NfnNotify_SubscribeServer interface {
+ Send(*Notification) error
+ grpc.ServerStream
+}
+
+type nfnNotifySubscribeServer struct {
+ grpc.ServerStream
+}
+
+func (x *nfnNotifySubscribeServer) Send(m *Notification) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+var _NfnNotify_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "nfnNotify",
+ HandlerType: (*NfnNotifyServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "Subscribe",
+ Handler: _NfnNotify_Subscribe_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "nfn.proto",
+}
diff --git a/internal/pkg/nfnNotify/proto/nfn.proto b/internal/pkg/nfnNotify/proto/nfn.proto
new file mode 100644
index 0000000..85e2131
--- /dev/null
+++ b/internal/pkg/nfnNotify/proto/nfn.proto
@@ -0,0 +1,44 @@
+//
+// nfn.proto
+//
+// Example that implements push notification from grpc server to client
+//
+syntax = "proto3";
+
+service nfnNotify {
+ rpc Subscribe (SubscribeContext) returns (stream Notification);
+}
+
+message SubscribeContext {
+ string node_name = 1;
+}
+
+message Notification {
+ string cni_type = 1;
+ oneof payload {
+ InSync in_sync = 2;
+ ProviderNetworkCreate provider_nw_create = 3;
+ ProviderNetworkRemove provider_nw_remove = 4;
+ }
+}
+
+message ProviderNetworkCreate {
+ string provider_nw_name = 1;
+ VlanInfo vlan = 2;
+ // Add other types supported here beyond vlan
+}
+
+message ProviderNetworkRemove {
+ string provider_nw_name = 1;
+ string vlan_logical_intf = 2;
+ // Add other types supported here
+}
+
+message VlanInfo {
+ string vlan_id = 1;
+ string provider_intf = 2;
+ string logical_intf = 3;
+}
+
+message InSync {
+} \ No newline at end of file
diff --git a/internal/pkg/nfnNotify/server.go b/internal/pkg/nfnNotify/server.go
new file mode 100644
index 0000000..6ec4a98
--- /dev/null
+++ b/internal/pkg/nfnNotify/server.go
@@ -0,0 +1,262 @@
+package nfn
+
+import (
+ "fmt"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/reflection"
+ "net"
+ pb "ovn4nfv-k8s-plugin/internal/pkg/nfnNotify/proto"
+ v1alpha1 "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1"
+ logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
+ "strings"
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/kubernetes"
+ "k8s.io/client-go/rest"
+ clientset "ovn4nfv-k8s-plugin/pkg/generated/clientset/versioned"
+)
+
+var log = logf.Log.WithName("rpc-server")
+
+type client struct {
+ context *pb.SubscribeContext
+ stream pb.NfnNotify_SubscribeServer
+}
+
+type serverDB struct {
+ name string
+ clientList map[string]client
+}
+
+var notifServer *serverDB
+var stopChan chan interface{}
+
+var pnClientset *clientset.Clientset
+var kubeClientset *kubernetes.Clientset
+
+func newServer() *serverDB {
+ return &serverDB{name: "nfnNotifServer", clientList: make(map[string]client)}
+}
+
+// Subscribe stores the client information & sends data
+func (s *serverDB) Subscribe(sc *pb.SubscribeContext, ss pb.NfnNotify_SubscribeServer) error {
+ nodeName := sc.GetNodeName()
+ log.Info("Subscribe request from node", "Node Name", nodeName)
+ if nodeName == "" {
+ return fmt.Errorf("Node name can't be empty")
+ }
+ cp := client{
+ context: sc,
+ stream: ss,
+ }
+ s.clientList[nodeName] = cp
+
+ providerNetworklist, err := pnClientset.K8sV1alpha1().ProviderNetworks("default").List(v1.ListOptions{})
+ if err == nil {
+ for _, pn := range providerNetworklist.Items {
+ log.Info("Send message", "Provider Network", pn.GetName())
+ SendNotif(&pn, "create", nodeName)
+ }
+ }
+ inSyncMsg := pb.Notification{
+ CniType: "ovn4nfv",
+ Payload: &pb.Notification_InSync{
+ InSync: &pb.InSync{},
+ },
+ }
+ log.Info("Send Insync")
+ if err = cp.stream.Send(&inSyncMsg); err != nil {
+ log.Error(err, "Unable to send sync", "node name", nodeName)
+ }
+ log.Info("Subscribe Completed")
+ // Keep stream open
+ for {
+ select {
+ case <-stopChan:
+ }
+ }
+}
+
+func (s *serverDB) GetClient(nodeName string) client {
+ if val, ok := s.clientList[nodeName]; ok {
+ return val
+ }
+ return client{}
+}
+
+func updatePnStatus(pn *v1alpha1.ProviderNetwork, status string) error {
+ pnCopy := pn.DeepCopy()
+ pnCopy.Status.State = status
+ _, err := pnClientset.K8sV1alpha1().ProviderNetworks(pn.Namespace).Update(pnCopy)
+ return err
+}
+
+func createMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
+ msg := pb.Notification{
+ CniType: "ovn4nfv",
+ Payload: &pb.Notification_ProviderNwCreate{
+ ProviderNwCreate: &pb.ProviderNetworkCreate{
+ ProviderNwName: pn.Name,
+ Vlan: &pb.VlanInfo{
+ VlanId: pn.Spec.Vlan.VlanId,
+ ProviderIntf: pn.Spec.Vlan.ProviderInterfaceName,
+ LogicalIntf: pn.Spec.Vlan.LogicalInterfaceName,
+ },
+ },
+ },
+ }
+ return msg
+}
+
+func deleteMsg(pn *v1alpha1.ProviderNetwork) pb.Notification {
+ msg := pb.Notification{
+ CniType: "ovn4nfv",
+ Payload: &pb.Notification_ProviderNwRemove{
+ ProviderNwRemove: &pb.ProviderNetworkRemove{
+ ProviderNwName: pn.Name,
+ VlanLogicalIntf: pn.Spec.Vlan.LogicalInterfaceName,
+ },
+ },
+ }
+ return msg
+}
+
+//SendNotif to client
+func SendNotif(pn *v1alpha1.ProviderNetwork, msgType string, nodeReq string) error {
+ var msg pb.Notification
+ var err error
+
+ switch {
+ case pn.Spec.CniType == "ovn4nfv":
+ switch {
+ case pn.Spec.ProviderNetType == "VLAN":
+ if msgType == "create" {
+ msg = createMsg(pn)
+ } else if msgType == "delete" {
+ msg = deleteMsg(pn)
+ }
+ if strings.EqualFold(pn.Spec.Vlan.VlanNodeSelector, "SPECIFIC") {
+ for _, label := range pn.Spec.Vlan.NodeLabelList {
+ l := strings.Split(label, "=")
+ if len(l) == 0 {
+ log.Error(fmt.Errorf("Syntax error label: %v", label), "NodeListIterator")
+ return nil
+ }
+ }
+ labels := strings.Join(pn.Spec.Vlan.NodeLabelList[:], ",")
+ err = sendMsg(msg, labels, "specific", nodeReq)
+ } else if strings.EqualFold(pn.Spec.Vlan.VlanNodeSelector, "ALL") {
+ err = sendMsg(msg, "", "all", nodeReq)
+ } else if strings.EqualFold(pn.Spec.Vlan.VlanNodeSelector, "ANY") {
+ if pn.Status.State != v1alpha1.Created {
+ err = sendMsg(msg, "", "any", nodeReq)
+ if err == nil {
+ updatePnStatus(pn, v1alpha1.Created)
+ }
+ }
+ }
+ default:
+ return fmt.Errorf("Unsupported Provider Network type")
+ }
+ default:
+ return fmt.Errorf("Unsupported CNI type")
+ }
+ return err
+}
+
+// sendMsg send notification to client
+func sendMsg(msg pb.Notification, labels string, option string, nodeReq string) error {
+ if option == "all" {
+ for name, client := range notifServer.clientList {
+ if nodeReq != "" && nodeReq != name {
+ continue
+ }
+ if client.stream != nil {
+ if err := client.stream.Send(&msg); err != nil {
+ log.Error(err, "Msg Send failed", "Node name", name)
+ }
+ }
+ }
+ return nil
+ } else if option == "any" {
+ // Always select the first
+ for _, client := range notifServer.clientList {
+ if client.stream != nil {
+ if err := client.stream.Send(&msg); err != nil {
+ return err
+ }
+ // return after first successful send
+ return nil
+ }
+ }
+ return nil
+ }
+ // This is specific case
+ for name := range nodeListIterator(labels) {
+ if nodeReq != "" && nodeReq != name {
+ continue
+ }
+ client := notifServer.GetClient(name)
+ if client.stream != nil {
+ if err := client.stream.Send(&msg); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func nodeListIterator(labels string) <-chan string {
+ ch := make(chan string)
+
+ lo := v1.ListOptions{LabelSelector: labels}
+ // List the Nodes matching the Labels
+ nodes, err := kubeClientset.CoreV1().Nodes().List(lo)
+ if err != nil {
+ log.Info("No Nodes found with labels", "list:", lo)
+ return nil
+ }
+ go func() {
+ for _, node := range nodes.Items {
+ log.Info("Send message to", " node:", node.ObjectMeta.Name)
+ ch <- node.ObjectMeta.Name
+ }
+ close(ch)
+ }()
+ return ch
+}
+
+//SetupNotifServer initilizes the gRpc nfn notif server
+func SetupNotifServer(kConfig *rest.Config) {
+
+ log.Info("Starting Notif Server")
+ var err error
+
+ // creates the clientset
+ pnClientset, err = clientset.NewForConfig(kConfig)
+ if err != nil {
+ log.Error(err, "Error building clientset")
+ }
+ kubeClientset, err = kubernetes.NewForConfig(kConfig)
+ if err != nil {
+ log.Error(err, "Error building Kuberenetes clientset")
+ }
+
+ stopChan = make(chan interface{})
+
+ // Start GRPC server
+ lis, err := net.Listen("tcp", ":50000")
+ if err != nil {
+ log.Error(err, "failed to listen")
+ }
+
+ s := grpc.NewServer()
+ // Intialize Notify server
+ notifServer = newServer()
+ pb.RegisterNfnNotifyServer(s, notifServer)
+
+ reflection.Register(s)
+ log.Info("Initialization Completed")
+ if err := s.Serve(lis); err != nil {
+ log.Error(err, "failed to serve")
+ }
+}
diff --git a/pkg/apis/k8s/v1alpha1/providernetwork_types.go b/pkg/apis/k8s/v1alpha1/providernetwork_types.go
index b292827..3f8444f 100644
--- a/pkg/apis/k8s/v1alpha1/providernetwork_types.go
+++ b/pkg/apis/k8s/v1alpha1/providernetwork_types.go
@@ -23,10 +23,11 @@ type ProviderNetworkSpec struct {
}
type VlanSpec struct {
- VlanId string `json:"vlanId"`
- Node string `json:"node"`
- ProviderInterfaceName string `json:"providerInterfaceName"`
- LogicalInterfaceName string `json:"logicalInterfaceName,omitempty"`
+ VlanId string `json:"vlanId"`
+ VlanNodeSelector string `json:"vlanNodeSelector"` // "all"/"any"(in which case a node will be randomly selected)/"specific"(see below)
+ NodeLabelList []string `json:"nodeLabelList,omitempty"` // if VlanNodeSelector is value "specific" then this array provides a list of nodes labels
+ ProviderInterfaceName string `json:"providerInterfaceName"`
+ LogicalInterfaceName string `json:"logicalInterfaceName,omitempty"`
}
// ProviderNetworkStatus defines the observed state of ProviderNetwork
diff --git a/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
index b524d40..69f190e 100644
--- a/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/k8s/v1alpha1/zz_generated.deepcopy.go
@@ -1,6 +1,22 @@
// +build !ignore_autogenerated
-// Code generated by operator-sdk. DO NOT EDIT.
+/*
+Copyright The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
@@ -87,7 +103,7 @@ func (in *Network) DeepCopyObject() runtime.Object {
func (in *NetworkList) DeepCopyInto(out *NetworkList) {
*out = *in
out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Network, len(*in))
@@ -196,7 +212,7 @@ func (in *ProviderNetwork) DeepCopyObject() runtime.Object {
func (in *ProviderNetworkList) DeepCopyInto(out *ProviderNetworkList) {
*out = *in
out.TypeMeta = in.TypeMeta
- out.ListMeta = in.ListMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ProviderNetwork, len(*in))
@@ -244,7 +260,7 @@ func (in *ProviderNetworkSpec) DeepCopyInto(out *ProviderNetworkSpec) {
*out = make([]Route, len(*in))
copy(*out, *in)
}
- out.Vlan = in.Vlan
+ in.Vlan.DeepCopyInto(&out.Vlan)
return
}
@@ -293,6 +309,11 @@ func (in *Route) DeepCopy() *Route {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VlanSpec) DeepCopyInto(out *VlanSpec) {
*out = *in
+ if in.NodeLabelList != nil {
+ in, out := &in.NodeLabelList, &out.NodeLabelList
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
return
}