From cc8c2f04256b33cc8d42e3dd5c66ace424b4296e Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Wed, 8 Apr 2020 12:06:55 -0700 Subject: [PATCH 01/11] implement raft storage controller --- .gitignore | 2 +- .travis.yml | 4 ++-- go.mod | 12 ------------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 7fa23fd..416cfa8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.dll *.so *.dylib - +**/_output # Test binary, build with `go test -c` *.test diff --git a/.travis.yml b/.travis.yml index e728940..45e125d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ sudo: false language: go go: - - '1.12.x' + - '1.13.x' notifications: email: false @@ -38,4 +38,4 @@ jobs: script: - make coverage - goveralls -coverprofile=coverage.out -service=travis-ci - - make image \ No newline at end of file + - make image diff --git a/go.mod b/go.mod index 3138e11..fddd2f7 100644 --- a/go.mod +++ b/go.mod @@ -3,24 +3,12 @@ module github.com/atomix/raft-replica go 1.12 require ( - cloud.google.com/go v0.43.0 // indirect github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40 github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 github.com/gogo/protobuf v1.3.1 github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 - github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect - github.com/hashicorp/golang-lru v0.5.3 // indirect - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/kr/pty v1.1.8 // indirect github.com/sirupsen/logrus v1.4.2 - github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 - golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect - golang.org/x/mobile v0.0.0-20190806162312-597adff16ade // indirect - golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect - golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa // indirect - golang.org/x/tools v0.0.0-20190806215303-88ddfcebc769 // indirect google.golang.org/grpc v1.23.1 - honnef.co/go/tools v0.0.1-2019.2.2 // indirect ) From 4d132d2ea8e549b02bc83b4df799747709576e5e Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Wed, 8 Apr 2020 23:11:39 -0700 Subject: [PATCH 02/11] Add auto generated api --- Makefile | 14 +- cmd/raft-storage/main.go | 87 +++++++ go.mod | 4 + go.sum | 290 ++++++++++++++++++++++ pkg/apis/v1beta1/raft.go | 53 ++++ pkg/apis/v1beta1/register.go | 36 +++ pkg/apis/v1beta1/zz_generated.deepcopy.go | 114 +++++++++ 7 files changed, 591 insertions(+), 7 deletions(-) create mode 100644 cmd/raft-storage/main.go create mode 100644 pkg/apis/v1beta1/raft.go create mode 100644 pkg/apis/v1beta1/register.go create mode 100644 pkg/apis/v1beta1/zz_generated.deepcopy.go diff --git a/Makefile b/Makefile index 2aab6f0..dfdd173 100644 --- a/Makefile +++ b/Makefile @@ -9,15 +9,15 @@ all: build build: # @HELP build the source code build: - GOOS=linux GOARCH=amd64 go build -o build/_output/atomix-raft-node ./cmd/atomix-raft-node + GOOS=linux GOARCH=amd64 go build -o build/_output/raft-storage ./cmd/raft-storage test: # @HELP run the unit tests and source code validation test: build license_check linters - go test github.com/atomix/raft-replica/... + go test github.com/atomix/raft-storage/... coverage: # @HELP generate unit test coverage data coverage: build linters license_check - go test github.com/atomix/raft-replica/pkg/... -coverprofile=coverage.out.tmp -covermode=count + go test github.com/atomix/raft-storage/pkg/... -coverprofile=coverage.out.tmp -covermode=count @cat coverage.out.tmp | grep -v ".pb.go" > coverage.out linters: # @HELP examines Go source code and reports coding problems @@ -28,14 +28,14 @@ license_check: # @HELP examine and ensure license headers exist proto: # @HELP build Protobuf/gRPC generated types proto: - docker run -it -v `pwd`:/go/src/github.com/atomix/raft-replica \ - -w /go/src/github.com/atomix/raft-replica \ + docker run -it -v `pwd`:/go/src/github.com/atomix/raft-storage \ + -w /go/src/github.com/atomix/raft-storage \ --entrypoint build/bin/compile_protos.sh \ onosproject/protoc-go:stable image: # @HELP build atomix-raft-node Docker image image: build - docker build . -f build/docker/Dockerfile -t atomix/raft-replica:${ATOMIX_RAFT_NODE_VERSION} + docker build . -f build/docker/Dockerfile -t atomix/raft-storage:${ATOMIX_RAFT_NODE_VERSION} push: # @HELP push atomix-raft-node Docker image - docker push atomix/raft-replica:${ATOMIX_RAFT_NODE_VERSION} + docker push atomix/raft-storage:${ATOMIX_RAFT_NODE_VERSION} diff --git a/cmd/raft-storage/main.go b/cmd/raft-storage/main.go new file mode 100644 index 0000000..713f693 --- /dev/null +++ b/cmd/raft-storage/main.go @@ -0,0 +1,87 @@ +// Copyright 2019-present Open Networking Foundation. +// +// 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. + +package main + +import ( + "bytes" + "fmt" + "github.com/atomix/api/proto/atomix/controller" + "github.com/atomix/go-framework/pkg/atomix" + "github.com/atomix/go-framework/pkg/atomix/registry" + "github.com/atomix/raft-replica/pkg/atomix/raft" + "github.com/atomix/raft-replica/pkg/atomix/raft/config" + "github.com/gogo/protobuf/jsonpb" + log "github.com/sirupsen/logrus" + "io/ioutil" + "os" + "os/signal" +) + +func main() { + log.SetLevel(log.TraceLevel) + log.SetOutput(os.Stdout) + + nodeID := os.Args[1] + partitionConfig := parsePartitionConfig() + protocolConfig := parseProtocolConfig() + + // Start the node. The node will be started in its own goroutine. + node := atomix.NewNode(nodeID, partitionConfig, raft.NewProtocol(protocolConfig), registry.Registry) + if err := node.Start(); err != nil { + fmt.Println(err) + os.Exit(1) + } + + // Wait for an interrupt signal + ch := make(chan os.Signal, 1) + signal.Notify(ch, os.Interrupt) + <-ch + + // Stop the node after an interrupt + if err := node.Stop(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} + +func parsePartitionConfig() *controller.PartitionConfig { + nodeConfigFile := os.Args[2] + nodeConfig := &controller.PartitionConfig{} + nodeBytes, err := ioutil.ReadFile(nodeConfigFile) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + if err := jsonpb.Unmarshal(bytes.NewReader(nodeBytes), nodeConfig); err != nil { + fmt.Println(err) + os.Exit(1) + } + return nodeConfig +} + +func parseProtocolConfig() *config.ProtocolConfig { + protocolConfigFile := os.Args[3] + protocolConfig := &config.ProtocolConfig{} + protocolBytes, err := ioutil.ReadFile(protocolConfigFile) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + if err := jsonpb.Unmarshal(bytes.NewReader(protocolBytes), protocolConfig); err != nil { + fmt.Println(err) + os.Exit(1) + } + return protocolConfig +} diff --git a/go.mod b/go.mod index fddd2f7..c067fa8 100644 --- a/go.mod +++ b/go.mod @@ -11,4 +11,8 @@ require ( github.com/sirupsen/logrus v1.4.2 github.com/stretchr/testify v1.4.0 google.golang.org/grpc v1.23.1 + k8s.io/api v0.17.2 + k8s.io/apimachinery v0.17.2 + k8s.io/client-go v0.17.2 + sigs.k8s.io/controller-runtime v0.5.2 ) diff --git a/go.sum b/go.sum index c95ef09..df82756 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,29 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= 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/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +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/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40 h1:wLOZYpUQvIVrQOEhN5ND4CXq60yHHMPu7+s1wGG7yU8= github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= github.com/atomix/atomix-api v0.0.0-20190819230829-366ccc994adb h1:5BfPSZekPTwr8SoHWZVYEj8bHtZJavTXWGRbsEs/t/4= @@ -206,23 +227,111 @@ github.com/atomix/go-framework v0.0.0-20200124003840-f24758b13aa2/go.mod h1:vo5K github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 h1:gFEiAzDt/pL0PeNhvNcv8tseCLYGPg5piWseW0HizKc= github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345/go.mod h1:G/yTdMGpfwbA2YXym/VEi7op3qZKd1jtGJX0sjcZmpQ= github.com/atomix/go-local v0.0.0-20200124003802-357f6682b2f4/go.mod h1:MabPkX/j2bN399GVAYGigyvDaAslu7omZoujEfzdKDg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +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/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +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.18.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/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +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.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +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.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +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.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/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/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 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-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 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= @@ -232,55 +341,164 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/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 v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= 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/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +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/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= 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= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/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-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190718202018-cfdd5522f6f6/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= @@ -298,21 +516,32 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mobile v0.0.0-20190806162312-597adff16ade/go.mod h1:AlhUtkH4DA4asiFC5RgK7ZKmauvtkAVcy9L0epCzlWo= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +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= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +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-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -321,14 +550,23 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -340,17 +578,25 @@ golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdO golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 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-20181030221726-6c7e314b6563/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-20190125232054-d66bd3c5d5a6/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-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= @@ -359,6 +605,8 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/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-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= @@ -372,7 +620,12 @@ golang.org/x/tools v0.0.0-20190806193329-249e2b9b6d3c/go.mod h1:jcCCGcm9btYwXyDq golang.org/x/tools v0.0.0-20190806194950-6743d4095d4b/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190806205909-9fb8e5c87901/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190806215303-88ddfcebc769/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1/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.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -402,14 +655,51 @@ google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= google.golang.org/grpc v1.23.1/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= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= 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-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= +k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= +k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo= +k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI= +k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= +k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/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= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/apis/v1beta1/raft.go b/pkg/apis/v1beta1/raft.go new file mode 100644 index 0000000..f695bde --- /dev/null +++ b/pkg/apis/v1beta1/raft.go @@ -0,0 +1,53 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// RaftStorageClassSpec defines the desired state of RaftStorageClass +type RaftStorageClassSpec struct { +} + +// RaftStorageClassStatus defines the observed state of RaftStorageClass +type RaftStorageClassStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file +} + +// +kubebuilder:object:root=true + +// RaftStorageClass is the Schema for the raftstorageclasses API +type RaftStorageClass struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec RaftStorageClassSpec `json:"spec,omitempty"` + Status RaftStorageClassStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// RaftStorageClassList contains a list of RaftStorageClass +type RaftStorageClassList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RaftStorageClass `json:"items"` +} + +func init() { + SchemeBuilder.Register(&RaftStorageClass{}, &RaftStorageClassList{}) +} diff --git a/pkg/apis/v1beta1/register.go b/pkg/apis/v1beta1/register.go new file mode 100644 index 0000000..7f146bd --- /dev/null +++ b/pkg/apis/v1beta1/register.go @@ -0,0 +1,36 @@ +/* + + +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. +*/ + +// Package v1beta1 contains API Schema definitions for the storage.cloud.atomix.io v1beta1 API group +// +kubebuilder:object:generate=true +// +groupName=storage.cloud.atomix.io.my.domain +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "storage.cloud.atomix.io.my.domain", Version: "v1beta1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/pkg/apis/v1beta1/zz_generated.deepcopy.go b/pkg/apis/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 0000000..ee10ef1 --- /dev/null +++ b/pkg/apis/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,114 @@ +// +build !ignore_autogenerated + +/* + + +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 controller-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RaftStorageClass) DeepCopyInto(out *RaftStorageClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClass. +func (in *RaftStorageClass) DeepCopy() *RaftStorageClass { + if in == nil { + return nil + } + out := new(RaftStorageClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RaftStorageClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RaftStorageClassList) DeepCopyInto(out *RaftStorageClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RaftStorageClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClassList. +func (in *RaftStorageClassList) DeepCopy() *RaftStorageClassList { + if in == nil { + return nil + } + out := new(RaftStorageClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RaftStorageClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RaftStorageClassSpec) DeepCopyInto(out *RaftStorageClassSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClassSpec. +func (in *RaftStorageClassSpec) DeepCopy() *RaftStorageClassSpec { + if in == nil { + return nil + } + out := new(RaftStorageClassSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RaftStorageClassStatus) DeepCopyInto(out *RaftStorageClassStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClassStatus. +func (in *RaftStorageClassStatus) DeepCopy() *RaftStorageClassStatus { + if in == nil { + return nil + } + out := new(RaftStorageClassStatus) + in.DeepCopyInto(out) + return out +} From 4376a1cadd1ff75ffed3d95adccefe2e410526a8 Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 09:23:34 -0700 Subject: [PATCH 03/11] Rename raft-replica to raft-storage-Add building blocks of raft controller --- Makefile | 8 +- cmd/raft-storage-controller/main.go | 99 +++++++++ go.mod | 6 +- go.sum | 50 +++++ pkg/apis/v1beta1/raft.go | 9 + pkg/atomix/raft/client/client.go | 7 +- pkg/atomix/raft/client/client_test.go | 7 +- pkg/atomix/raft/protocol.go | 6 +- pkg/atomix/raft/protocol/raft.go | 5 +- pkg/atomix/raft/protocol/raft_test.go | 7 +- pkg/atomix/raft/protocol_test.go | 7 +- pkg/atomix/raft/roles/active.go | 9 +- pkg/atomix/raft/roles/active_test.go | 11 +- pkg/atomix/raft/roles/appender.go | 13 +- pkg/atomix/raft/roles/candidate.go | 9 +- pkg/atomix/raft/roles/candidate_test.go | 9 +- pkg/atomix/raft/roles/follower.go | 9 +- pkg/atomix/raft/roles/follower_test.go | 9 +- pkg/atomix/raft/roles/leader.go | 13 +- pkg/atomix/raft/roles/leader_test.go | 9 +- pkg/atomix/raft/roles/passive.go | 13 +- pkg/atomix/raft/roles/passive_test.go | 11 +- pkg/atomix/raft/roles/role.go | 9 +- pkg/atomix/raft/roles/role_test.go | 19 +- pkg/atomix/raft/server.go | 15 +- pkg/atomix/raft/state/manager.go | 11 +- pkg/atomix/raft/store/log/log.go | 3 +- pkg/atomix/raft/store/log/log_test.go | 5 +- pkg/atomix/raft/store/snapshot/snapshot.go | 3 +- .../raft/store/snapshot/snapshot_test.go | 5 +- pkg/atomix/raft/store/store.go | 4 +- pkg/controller/cluster.go | 32 +++ pkg/controller/def.go | 15 ++ pkg/controller/reconciler.go | 194 ++++++++++++++++++ 34 files changed, 536 insertions(+), 105 deletions(-) create mode 100644 cmd/raft-storage-controller/main.go create mode 100644 pkg/controller/cluster.go create mode 100644 pkg/controller/def.go create mode 100644 pkg/controller/reconciler.go diff --git a/Makefile b/Makefile index dfdd173..b6da5ac 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,15 @@ ATOMIX_RAFT_NODE_VERSION := latest all: build build: # @HELP build the source code -build: +build: deps GOOS=linux GOARCH=amd64 go build -o build/_output/raft-storage ./cmd/raft-storage + +deps: # @HELP ensure that the required dependencies are in place + go build -v ./... + bash -c "diff -u <(echo -n) <(git diff go.mod)" + bash -c "diff -u <(echo -n) <(git diff go.sum)" + test: # @HELP run the unit tests and source code validation test: build license_check linters go test github.com/atomix/raft-storage/... diff --git a/cmd/raft-storage-controller/main.go b/cmd/raft-storage-controller/main.go new file mode 100644 index 0000000..c5ba4d2 --- /dev/null +++ b/cmd/raft-storage-controller/main.go @@ -0,0 +1,99 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package main + +import ( + "context" + "fmt" + + controller "github.com/atomix/raft-storage/pkg/controller" + + "os" + "runtime" + + "github.com/atomix/kubernetes-controller/pkg/controller/util/leader" + "github.com/atomix/kubernetes-controller/pkg/controller/util/ready" + apis "github.com/atomix/raft-storage/pkg/apis/v1beta1" + _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + "sigs.k8s.io/controller-runtime/pkg/client/config" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/manager/signals" +) + +var log = logf.Log.WithName("cmd") + +func printVersion() { + log.Info(fmt.Sprintf("Go Version: %s", runtime.Version())) + log.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)) +} + +func main() { + var namespace string + if len(os.Args) > 1 { + namespace = os.Args[1] + } + + printVersion() + + // Get a config to talk to the apiserver + cfg, err := config.GetConfig() + if err != nil { + log.Error(err, "") + os.Exit(1) + } + + // Become the leader before proceeding + _ = leader.Become(context.TODO()) + + r := ready.NewFileReady() + err = r.Set() + if err != nil { + log.Error(err, "") + os.Exit(1) + } + defer func() { + _ = r.Unset() + }() + + // Create a new Cmd to provide shared dependencies and start components + mgr, err := manager.New(cfg, manager.Options{Namespace: namespace}) + if err != nil { + log.Error(err, "") + os.Exit(1) + } + + log.Info("Registering Components.") + + // Setup Scheme for all resources + if err := apis.AddToScheme(mgr.GetScheme()); err != nil { + log.Error(err, "") + os.Exit(1) + } + + // Setup the TestStorage controller + if err := controller.Add(mgr); err != nil { + log.Error(err, "") + os.Exit(1) + } + + log.Info("Starting the Cmd.") + + // Start the Cmd + if err := mgr.Start(signals.SetupSignalHandler()); err != nil { + log.Error(err, "controller exited non-zero") + os.Exit(1) + } +} diff --git a/go.mod b/go.mod index c067fa8..d7e6cd3 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,12 @@ -module github.com/atomix/raft-replica +module github.com/atomix/raft-storage go 1.12 require ( - github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40 + github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 + github.com/atomix/kubernetes-controller v0.2.0-beta.1 + github.com/atomix/raft-replica v0.0.0-20200124061410-f429149bc81b github.com/gogo/protobuf v1.3.1 github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 diff --git a/go.sum b/go.sum index df82756..79eac83 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0 h1:banaiRPAM8kUVYneOSkhgcDsLzEvL25FinuiSZaH/2w= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= @@ -27,6 +28,8 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40 h1:wLOZYpUQvIVrQOEhN5ND4CXq60yHHMPu7+s1wGG7yU8= github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= +github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d h1:rM+AnOZfgosBZzvkbZUbttAWKkj3m6y2f4Jj4jo7YA4= +github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= github.com/atomix/atomix-api v0.0.0-20190819230829-366ccc994adb h1:5BfPSZekPTwr8SoHWZVYEj8bHtZJavTXWGRbsEs/t/4= github.com/atomix/atomix-api v0.0.0-20190819230829-366ccc994adb/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20190821212433-320dd0dbb83e h1:gsIp6ruL8Jm5OwLwnEgmadt/ZDcoa1aeRSEIXzGW6IM= @@ -227,7 +230,12 @@ github.com/atomix/go-framework v0.0.0-20200124003840-f24758b13aa2/go.mod h1:vo5K github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 h1:gFEiAzDt/pL0PeNhvNcv8tseCLYGPg5piWseW0HizKc= github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345/go.mod h1:G/yTdMGpfwbA2YXym/VEi7op3qZKd1jtGJX0sjcZmpQ= github.com/atomix/go-local v0.0.0-20200124003802-357f6682b2f4/go.mod h1:MabPkX/j2bN399GVAYGigyvDaAslu7omZoujEfzdKDg= +github.com/atomix/kubernetes-controller v0.2.0-beta.1 h1:NYOBbwXHrBNQs6YmXQV1eHZkdO+ViZwvTpZwE0CtYj8= +github.com/atomix/kubernetes-controller v0.2.0-beta.1/go.mod h1:lWOxAfXoCF7O1Gu/ZAEYdg8QJAc3BFRyvyQQ5WsXy+E= +github.com/atomix/raft-replica v0.0.0-20200124061410-f429149bc81b h1:Xcw8gcS9IZ34SoqxfWIWx/vj/Hd5c5RhlhpSWfW8BJU= +github.com/atomix/raft-replica v0.0.0-20200124061410-f429149bc81b/go.mod h1:cdnyi/VFPFc6eMwVKHRDembVerYSlkxC4dMkrB9uRBg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -262,6 +270,7 @@ github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -271,7 +280,9 @@ github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= 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= @@ -326,6 +337,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP 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-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -340,8 +352,10 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -349,31 +363,37 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/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= @@ -396,16 +416,20 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -424,17 +448,22 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -454,6 +483,7 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -480,8 +510,11 @@ go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -494,6 +527,7 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/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= @@ -544,6 +578,7 @@ golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ym golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -589,6 +624,7 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -622,6 +658,7 @@ golang.org/x/tools v0.0.0-20190806205909-9fb8e5c87901/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190806215303-88ddfcebc769/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/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= @@ -638,6 +675,7 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 h1:Ygq9/SRJX9+dU0WCIICM8RkWvDw03lvB77hrhJnpxfU= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 h1:iKtrH9Y8mcbADOP0YFaEMth7OfuHY9xHOwNj4znpM1A= @@ -661,7 +699,9 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -672,6 +712,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -679,10 +720,13 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc= k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= +k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo= +k8s.io/client-go v0.17.2 h1:ndIfkfXEGrNhLIgkr0+qhRguSD3u6DCmonepn1O6NYc= k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI= k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs= @@ -690,8 +734,11 @@ k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/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= @@ -699,7 +746,10 @@ modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03 modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/controller-runtime v0.5.2 h1:pyXbUfoTo+HA3jeIfr0vgi+1WtmNh0CwlcnQGLXwsSw= sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= +sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/apis/v1beta1/raft.go b/pkg/apis/v1beta1/raft.go index f695bde..ddf554d 100644 --- a/pkg/apis/v1beta1/raft.go +++ b/pkg/apis/v1beta1/raft.go @@ -18,6 +18,15 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// RaftStorageClassGroup raft storage class group +const RaftStorageClassGroup = "storage.cloud.atomix.io" + +// RaftStorageClassVersion raft storage class version +const RaftStorageClassVersion = "v1beta1" + +// RaftStorageClassKind raft storage class kind +const RaftStorageClassKind = "RaftStorageClass" + // RaftStorageClassSpec defines the desired state of RaftStorageClass type RaftStorageClassSpec struct { } diff --git a/pkg/atomix/raft/client/client.go b/pkg/atomix/raft/client/client.go index b4c6487..c197e6b 100644 --- a/pkg/atomix/raft/client/client.go +++ b/pkg/atomix/raft/client/client.go @@ -18,14 +18,15 @@ import ( "container/list" "context" "errors" + "sync" + "github.com/atomix/go-framework/pkg/atomix/cluster" "github.com/atomix/go-framework/pkg/atomix/node" streams "github.com/atomix/go-framework/pkg/atomix/stream" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "sync" ) // NewClient returns a new Raft client diff --git a/pkg/atomix/raft/client/client_test.go b/pkg/atomix/raft/client/client_test.go index c629a88..5a995e1 100644 --- a/pkg/atomix/raft/client/client_test.go +++ b/pkg/atomix/raft/client/client_test.go @@ -16,13 +16,14 @@ package client import ( "context" + "testing" + "github.com/atomix/go-framework/pkg/atomix/cluster" "github.com/atomix/go-framework/pkg/atomix/node" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "testing" ) func newTestClient(client raft.Client) *Client { diff --git a/pkg/atomix/raft/protocol.go b/pkg/atomix/raft/protocol.go index 10ccfb9..f8df241 100644 --- a/pkg/atomix/raft/protocol.go +++ b/pkg/atomix/raft/protocol.go @@ -17,9 +17,9 @@ package raft import ( "github.com/atomix/go-framework/pkg/atomix/cluster" "github.com/atomix/go-framework/pkg/atomix/node" - "github.com/atomix/raft-replica/pkg/atomix/raft/client" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/client" + "github.com/atomix/raft-storage/pkg/atomix/raft/config" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" ) // NewProtocol returns a new Raft Protocol instance diff --git a/pkg/atomix/raft/protocol/raft.go b/pkg/atomix/raft/protocol/raft.go index 45700e5..307a96f 100644 --- a/pkg/atomix/raft/protocol/raft.go +++ b/pkg/atomix/raft/protocol/raft.go @@ -17,9 +17,10 @@ package protocol import ( "context" "fmt" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" "sync" + + "github.com/atomix/raft-storage/pkg/atomix/raft/config" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // Status represents the status of a Raft server diff --git a/pkg/atomix/raft/protocol/raft_test.go b/pkg/atomix/raft/protocol/raft_test.go index 298a310..e223bf8 100644 --- a/pkg/atomix/raft/protocol/raft_test.go +++ b/pkg/atomix/raft/protocol/raft_test.go @@ -16,11 +16,12 @@ package protocol import ( "context" - atomix "github.com/atomix/go-framework/pkg/atomix/cluster" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - "github.com/stretchr/testify/assert" "testing" "time" + + atomix "github.com/atomix/go-framework/pkg/atomix/cluster" + "github.com/atomix/raft-storage/pkg/atomix/raft/config" + "github.com/stretchr/testify/assert" ) func TestRaftProtocol(t *testing.T) { diff --git a/pkg/atomix/raft/protocol_test.go b/pkg/atomix/raft/protocol_test.go index 24593eb..311cb42 100644 --- a/pkg/atomix/raft/protocol_test.go +++ b/pkg/atomix/raft/protocol_test.go @@ -15,12 +15,13 @@ package raft import ( + "testing" + "time" + "github.com/atomix/api/proto/atomix/controller" "github.com/atomix/go-framework/pkg/atomix" "github.com/atomix/go-framework/pkg/atomix/registry" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - "testing" - "time" + "github.com/atomix/raft-storage/pkg/atomix/raft/config" ) func TestProtocol(t *testing.T) { diff --git a/pkg/atomix/raft/roles/active.go b/pkg/atomix/raft/roles/active.go index b98f6e3..b025221 100644 --- a/pkg/atomix/raft/roles/active.go +++ b/pkg/atomix/raft/roles/active.go @@ -16,10 +16,11 @@ package roles import ( "context" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) func newActiveRole(raft raft.Raft, state state.Manager, store store.Store, log util.Logger) *ActiveRole { diff --git a/pkg/atomix/raft/roles/active_test.go b/pkg/atomix/raft/roles/active_test.go index cc5ad9c..8406f67 100644 --- a/pkg/atomix/raft/roles/active_test.go +++ b/pkg/atomix/raft/roles/active_test.go @@ -16,13 +16,14 @@ package roles import ( "context" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" "testing" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" ) func TestActiveAppend(t *testing.T) { diff --git a/pkg/atomix/raft/roles/appender.go b/pkg/atomix/raft/roles/appender.go index 970ed66..cf52117 100644 --- a/pkg/atomix/raft/roles/appender.go +++ b/pkg/atomix/raft/roles/appender.go @@ -18,17 +18,18 @@ import ( "container/list" "context" "errors" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/log" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/snapshot" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" "io" "math" "sort" "sync" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/log" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/snapshot" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // newAppender returns a new appender diff --git a/pkg/atomix/raft/roles/candidate.go b/pkg/atomix/raft/roles/candidate.go index c1de3b0..fa70d16 100644 --- a/pkg/atomix/raft/roles/candidate.go +++ b/pkg/atomix/raft/roles/candidate.go @@ -16,13 +16,14 @@ package roles import ( "context" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" "math" "math/rand" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // newCandidateRole returns a new candidate role diff --git a/pkg/atomix/raft/roles/candidate_test.go b/pkg/atomix/raft/roles/candidate_test.go index 54f75b9..e634db5 100644 --- a/pkg/atomix/raft/roles/candidate_test.go +++ b/pkg/atomix/raft/roles/candidate_test.go @@ -16,12 +16,13 @@ package roles import ( "context" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" "testing" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" ) func TestCandidateVote(t *testing.T) { diff --git a/pkg/atomix/raft/roles/follower.go b/pkg/atomix/raft/roles/follower.go index bd92fdf..b9fda15 100644 --- a/pkg/atomix/raft/roles/follower.go +++ b/pkg/atomix/raft/roles/follower.go @@ -16,13 +16,14 @@ package roles import ( "context" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" "math" "math/rand" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // newFollowerRole returns a new follower role diff --git a/pkg/atomix/raft/roles/follower_test.go b/pkg/atomix/raft/roles/follower_test.go index 1f31d0e..2be86c4 100644 --- a/pkg/atomix/raft/roles/follower_test.go +++ b/pkg/atomix/raft/roles/follower_test.go @@ -15,12 +15,13 @@ package roles import ( - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" "testing" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" ) func TestFollowerPollQuorum(t *testing.T) { diff --git a/pkg/atomix/raft/roles/leader.go b/pkg/atomix/raft/roles/leader.go index b7cb6c2..5d495e5 100644 --- a/pkg/atomix/raft/roles/leader.go +++ b/pkg/atomix/raft/roles/leader.go @@ -16,13 +16,14 @@ package roles import ( "context" - "github.com/atomix/go-framework/pkg/atomix/stream" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/log" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" "time" + + "github.com/atomix/go-framework/pkg/atomix/stream" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/log" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // newLeaderRole returns a new leader role diff --git a/pkg/atomix/raft/roles/leader_test.go b/pkg/atomix/raft/roles/leader_test.go index d2848c9..4a8dc26 100644 --- a/pkg/atomix/raft/roles/leader_test.go +++ b/pkg/atomix/raft/roles/leader_test.go @@ -16,14 +16,15 @@ package roles import ( "context" + "testing" + "time" + "github.com/atomix/go-framework/pkg/atomix/service" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" "github.com/gogo/protobuf/proto" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "testing" - "time" ) func TestLeaderInit(t *testing.T) { diff --git a/pkg/atomix/raft/roles/passive.go b/pkg/atomix/raft/roles/passive.go index f120cb5..1bc2170 100644 --- a/pkg/atomix/raft/roles/passive.go +++ b/pkg/atomix/raft/roles/passive.go @@ -18,15 +18,16 @@ import ( "context" "errors" "fmt" - "github.com/atomix/go-framework/pkg/atomix/stream" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/log" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" "io" "math" "time" + + "github.com/atomix/go-framework/pkg/atomix/stream" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/log" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) func newPassiveRole(raft raft.Raft, state state.Manager, store store.Store, log util.Logger) *PassiveRole { diff --git a/pkg/atomix/raft/roles/passive_test.go b/pkg/atomix/raft/roles/passive_test.go index 70ab0b1..67b51a6 100644 --- a/pkg/atomix/raft/roles/passive_test.go +++ b/pkg/atomix/raft/roles/passive_test.go @@ -16,15 +16,16 @@ package roles import ( "context" + "testing" + "time" + "github.com/atomix/go-framework/pkg/atomix/service" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" "github.com/gogo/protobuf/proto" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "testing" - "time" ) func TestUpdateTermAndLeader(t *testing.T) { diff --git a/pkg/atomix/raft/roles/role.go b/pkg/atomix/raft/roles/role.go index 430c5dc..fccd744 100644 --- a/pkg/atomix/raft/roles/role.go +++ b/pkg/atomix/raft/roles/role.go @@ -16,10 +16,11 @@ package roles import ( "context" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // GetRoles returns a mapping of role types to role factories diff --git a/pkg/atomix/raft/roles/role_test.go b/pkg/atomix/raft/roles/role_test.go index c171644..d36cc47 100644 --- a/pkg/atomix/raft/roles/role_test.go +++ b/pkg/atomix/raft/roles/role_test.go @@ -17,20 +17,21 @@ package roles import ( "context" "errors" + "testing" + "time" + "github.com/atomix/go-framework/pkg/atomix/cluster" "github.com/atomix/go-framework/pkg/atomix/node" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/protocol/mock" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/log" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" + "github.com/atomix/raft-storage/pkg/atomix/raft/config" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/protocol/mock" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/log" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" "github.com/golang/mock/gomock" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" - "testing" - "time" ) func newRoleFuncs(roles ...raft.Role) map[raft.RoleType]func(raft.Raft) raft.Role { diff --git a/pkg/atomix/raft/server.go b/pkg/atomix/raft/server.go index 76a8ea3..0e346ce 100644 --- a/pkg/atomix/raft/server.go +++ b/pkg/atomix/raft/server.go @@ -17,16 +17,17 @@ package raft import ( "errors" "fmt" + "net" + "sync" + "github.com/atomix/go-framework/pkg/atomix/cluster" "github.com/atomix/go-framework/pkg/atomix/node" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/roles" - "github.com/atomix/raft-replica/pkg/atomix/raft/state" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/config" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/roles" + "github.com/atomix/raft-storage/pkg/atomix/raft/state" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" "google.golang.org/grpc" - "net" - "sync" ) // NewServer returns a new Raft consensus protocol server diff --git a/pkg/atomix/raft/state/manager.go b/pkg/atomix/raft/state/manager.go index 8e57ee9..e9b58d0 100644 --- a/pkg/atomix/raft/state/manager.go +++ b/pkg/atomix/raft/state/manager.go @@ -15,14 +15,15 @@ package state import ( + "time" + "github.com/atomix/go-framework/pkg/atomix/node" "github.com/atomix/go-framework/pkg/atomix/service" streams "github.com/atomix/go-framework/pkg/atomix/stream" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/atomix/raft-replica/pkg/atomix/raft/store" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/log" - "github.com/atomix/raft-replica/pkg/atomix/raft/util" - "time" + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/atomix/raft-storage/pkg/atomix/raft/store" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/log" + "github.com/atomix/raft-storage/pkg/atomix/raft/util" ) // NewManager returns a new Raft state manager diff --git a/pkg/atomix/raft/store/log/log.go b/pkg/atomix/raft/store/log/log.go index 74a712c..7e435b4 100644 --- a/pkg/atomix/raft/store/log/log.go +++ b/pkg/atomix/raft/store/log/log.go @@ -15,8 +15,9 @@ package log import ( - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" "io" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" ) // NewMemoryLog creates a new in-memory Log diff --git a/pkg/atomix/raft/store/log/log_test.go b/pkg/atomix/raft/store/log/log_test.go index e516b86..45d0d6f 100644 --- a/pkg/atomix/raft/store/log/log_test.go +++ b/pkg/atomix/raft/store/log/log_test.go @@ -15,10 +15,11 @@ package log import ( - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/stretchr/testify/assert" "testing" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/stretchr/testify/assert" ) func TestMemoryLog(t *testing.T) { diff --git a/pkg/atomix/raft/store/snapshot/snapshot.go b/pkg/atomix/raft/store/snapshot/snapshot.go index 45ff57a..f11d567 100644 --- a/pkg/atomix/raft/store/snapshot/snapshot.go +++ b/pkg/atomix/raft/store/snapshot/snapshot.go @@ -16,9 +16,10 @@ package snapshot import ( "bytes" - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" "io" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" ) // NewMemoryStore creates a new in-memory snapshot store diff --git a/pkg/atomix/raft/store/snapshot/snapshot_test.go b/pkg/atomix/raft/store/snapshot/snapshot_test.go index fc22564..58508ed 100644 --- a/pkg/atomix/raft/store/snapshot/snapshot_test.go +++ b/pkg/atomix/raft/store/snapshot/snapshot_test.go @@ -15,10 +15,11 @@ package snapshot import ( - raft "github.com/atomix/raft-replica/pkg/atomix/raft/protocol" - "github.com/stretchr/testify/assert" "testing" "time" + + raft "github.com/atomix/raft-storage/pkg/atomix/raft/protocol" + "github.com/stretchr/testify/assert" ) func TestSnapshot(t *testing.T) { diff --git a/pkg/atomix/raft/store/store.go b/pkg/atomix/raft/store/store.go index 11942bd..17bbc66 100644 --- a/pkg/atomix/raft/store/store.go +++ b/pkg/atomix/raft/store/store.go @@ -15,8 +15,8 @@ package store import ( - "github.com/atomix/raft-replica/pkg/atomix/raft/store/log" - "github.com/atomix/raft-replica/pkg/atomix/raft/store/snapshot" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/log" + "github.com/atomix/raft-storage/pkg/atomix/raft/store/snapshot" ) // NewMemoryStore returns a new in-memory store diff --git a/pkg/controller/cluster.go b/pkg/controller/cluster.go new file mode 100644 index 0000000..a7e53db --- /dev/null +++ b/pkg/controller/cluster.go @@ -0,0 +1,32 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package test + +import ( + "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" + "github.com/atomix/raft-storage/pkg/apis/v1beta1" +) + +func (r *Reconciler) addHeadlessService(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + panic("Implement me") +} + +func (r *Reconciler) addStatefulSet(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + panic("Implement me") +} + +func (r *Reconciler) addConfigMap(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + panic("Implement me") +} diff --git a/pkg/controller/def.go b/pkg/controller/def.go new file mode 100644 index 0000000..1d3f4eb --- /dev/null +++ b/pkg/controller/def.go @@ -0,0 +1,15 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package test diff --git a/pkg/controller/reconciler.go b/pkg/controller/reconciler.go new file mode 100644 index 0000000..e467981 --- /dev/null +++ b/pkg/controller/reconciler.go @@ -0,0 +1,194 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package test + +import ( + "context" + + "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" + "github.com/atomix/kubernetes-controller/pkg/controller/v1beta2/storage" + "github.com/atomix/kubernetes-controller/pkg/controller/v1beta2/util/k8s" + "github.com/atomix/raft-storage/pkg/apis/v1beta1" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/reconcile" +) + +var log = logf.Log.WithName("raft_controller") + +// Add creates a new Partition ManagementGroup and adds it to the Manager. The Manager will set fields on the ManagementGroup +// and Start it when the Manager is Started. +func Add(mgr manager.Manager) error { + log.Info("Add manager") + reconciler := &Reconciler{ + client: mgr.GetClient(), + scheme: mgr.GetScheme(), + } + gvk := schema.GroupVersionKind{ + Group: v1beta1.RaftStorageClassGroup, + Version: v1beta1.RaftStorageClassVersion, + Kind: v1beta1.RaftStorageClassKind, + } + return storage.AddClusterReconciler(mgr, reconciler, gvk) +} + +var _ reconcile.Reconciler = &Reconciler{} + +// Reconciler reconciles a Cluster object +type Reconciler struct { + client client.Client + scheme *runtime.Scheme +} + +// Reconcile reads that state of the cluster for a Cluster object and makes changes based on the state read +// and what is in the Cluster.Spec +func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) { + log.Info("Reconcile Cluster") + cluster := &v1beta2.Cluster{} + err := r.client.Get(context.TODO(), request.NamespacedName, cluster) + if err != nil { + if k8serrors.IsNotFound(err) { + return reconcile.Result{}, nil + } + return reconcile.Result{Requeue: true}, err + } + + storage := &v1beta1.RaftStorageClass{} + name := types.NamespacedName{ + Namespace: cluster.Spec.Storage.Namespace, + Name: cluster.Spec.Storage.Name, + } + err = r.client.Get(context.TODO(), name, storage) + if err != nil { + if k8serrors.IsNotFound(err) { + return reconcile.Result{}, nil + } + return reconcile.Result{Requeue: true}, err + } + + err = r.reconcileConfigMap(cluster, storage) + if err != nil { + return reconcile.Result{}, err + } + + err = r.reconcileStatefulSet(cluster, storage) + if err != nil { + return reconcile.Result{}, err + } + + err = r.reconcileHeadlessService(cluster, storage) + if err != nil { + return reconcile.Result{}, err + } + + err = r.reconcileStatus(cluster, storage) + if err != nil { + return reconcile.Result{}, err + } + return reconcile.Result{}, nil +} + +func (r *Reconciler) reconcileConfigMap(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + log.Info("Reconcile raft storage config map") + cm := &corev1.ConfigMap{} + name := types.NamespacedName{ + Namespace: cluster.Namespace, + Name: cluster.Name, + } + err := r.client.Get(context.TODO(), name, cm) + if err != nil && k8serrors.IsNotFound(err) { + err = r.addConfigMap(cluster, storage) + } + return err +} + +func (r *Reconciler) reconcileStatefulSet(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + log.Info("Reconcile raft storage stateful set") + dep := &appsv1.Deployment{} + name := types.NamespacedName{ + Namespace: cluster.Namespace, + Name: cluster.Name, + } + err := r.client.Get(context.TODO(), name, dep) + if err != nil && k8serrors.IsNotFound(err) { + err = r.addStatefulSet(cluster, storage) + } + return err +} + +func (r *Reconciler) reconcileHeadlessService(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + log.Info("Reconcile raft storage headless service") + service := &corev1.Service{} + name := types.NamespacedName{ + Namespace: cluster.Namespace, + Name: cluster.Name, + } + err := r.client.Get(context.TODO(), name, service) + if err != nil && k8serrors.IsNotFound(err) { + err = r.addHeadlessService(cluster, storage) + } + return err +} + +func (r *Reconciler) reconcileStatus(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { + dep := &appsv1.Deployment{} + name := types.NamespacedName{ + Namespace: cluster.Namespace, + Name: cluster.Name, + } + err := r.client.Get(context.TODO(), name, dep) + if err != nil { + if k8serrors.IsNotFound(err) { + return nil + } + return err + } + + if cluster.Status.ReadyPartitions < cluster.Spec.Partitions && + dep.Status.ReadyReplicas == dep.Status.Replicas { + clusterID, err := k8s.GetClusterIDFromClusterAnnotations(cluster) + if err != nil { + return err + } + for partitionID := (cluster.Spec.Partitions * (clusterID - 1)) + 1; partitionID <= cluster.Spec.Partitions*clusterID; partitionID++ { + partition := &v1beta2.Partition{} + err := r.client.Get(context.TODO(), k8s.GetPartitionNamespacedName(cluster, partitionID), partition) + if err != nil && !k8serrors.IsNotFound(err) { + return err + } + if !partition.Status.Ready { + partition.Status.Ready = true + log.Info("Updating Partition status", "Name", partition.Name, "Namespace", partition.Namespace, "Ready", partition.Status.Ready) + err = r.client.Status().Update(context.TODO(), partition) + if err != nil { + return err + } + } + } + + // If we've made it this far, all partitions are ready. Update the cluster status + cluster.Status.ReadyPartitions = cluster.Spec.Partitions + log.Info("Updating Cluster status", "Name", cluster.Name, "Namespace", cluster.Namespace, "ReadyPartitions", cluster.Status.ReadyPartitions) + return r.client.Status().Update(context.TODO(), cluster) + } + return nil +} From dda6ecaa5cafd3a0edec4fc77924102db4b692bc Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 09:37:02 -0700 Subject: [PATCH 04/11] Add new dockerfiles --- Makefile | 11 +++++++---- build/docker/Dockerfile | 7 ------- build/raft-storage-controller/Dockerfile | 7 +++++++ build/raft-storage/Dockerfile | 7 +++++++ 4 files changed, 21 insertions(+), 11 deletions(-) delete mode 100644 build/docker/Dockerfile create mode 100644 build/raft-storage-controller/Dockerfile create mode 100644 build/raft-storage/Dockerfile diff --git a/Makefile b/Makefile index b6da5ac..3b22ebd 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,14 @@ export GO111MODULE=on .PHONY: build -ATOMIX_RAFT_NODE_VERSION := latest +ATOMIX_RAFT_STORAGE_VERSION := latest all: build build: # @HELP build the source code build: deps GOOS=linux GOARCH=amd64 go build -o build/_output/raft-storage ./cmd/raft-storage + GOOS=linux GOARCH=amd64 go build -o build/_output/raft-storage-controller ./cmd/raft-storage-controller deps: # @HELP ensure that the required dependencies are in place @@ -39,9 +40,11 @@ proto: --entrypoint build/bin/compile_protos.sh \ onosproject/protoc-go:stable -image: # @HELP build atomix-raft-node Docker image +image: # @HELP build atomix storage and atomix storage controller Docker images image: build - docker build . -f build/docker/Dockerfile -t atomix/raft-storage:${ATOMIX_RAFT_NODE_VERSION} + docker build . -f build/raft-storage/Dockerfile -t atomix/raft-storage:${ATOMIX_RAFT_STORAGE_VERSION} + docker build . -f build/raft-storage-controller/Dockerfile -t atomix/raft-storage-controller:${ATOMIX_RAFT_STORAGE_VERSION} push: # @HELP push atomix-raft-node Docker image - docker push atomix/raft-storage:${ATOMIX_RAFT_NODE_VERSION} + docker push atomix/raft-storage:${ATOMIX_RAFT_STORAGE_VERSION} + docker push atomix/raft-storage-controller:${ATOMIX_RAFT_STORAGE_VERSION} diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile deleted file mode 100644 index c2fba87..0000000 --- a/build/docker/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM alpine:3.9 - -USER nobody - -ADD build/_output/atomix-raft-node /usr/local/bin/atomix-raft-node - -ENTRYPOINT ["atomix-raft-node"] diff --git a/build/raft-storage-controller/Dockerfile b/build/raft-storage-controller/Dockerfile new file mode 100644 index 0000000..9999a98 --- /dev/null +++ b/build/raft-storage-controller/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.9 + +USER nobody + +ADD build/_output/raft-storage-controller /usr/local/bin/raft-storage-controller + +ENTRYPOINT ["raft-storage-controller"] diff --git a/build/raft-storage/Dockerfile b/build/raft-storage/Dockerfile new file mode 100644 index 0000000..36bb235 --- /dev/null +++ b/build/raft-storage/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.9 + +USER nobody + +ADD build/_output/raft-storage /usr/local/bin/raft-storage + +ENTRYPOINT ["raft-storage"] From 8027374ac97fbb4276f9b26a05880e85011955eb Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 09:41:16 -0700 Subject: [PATCH 05/11] go mod tidy --- Makefile | 4 +- go.sum | 185 +++++-------------------------------------------------- 2 files changed, 16 insertions(+), 173 deletions(-) diff --git a/Makefile b/Makefile index 3b22ebd..d0f73e3 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,8 @@ proto: --entrypoint build/bin/compile_protos.sh \ onosproject/protoc-go:stable -image: # @HELP build atomix storage and atomix storage controller Docker images -image: build +images: # @HELP build atomix storage and atomix storage controller Docker images +images: build docker build . -f build/raft-storage/Dockerfile -t atomix/raft-storage:${ATOMIX_RAFT_STORAGE_VERSION} docker build . -f build/raft-storage-controller/Dockerfile -t atomix/raft-storage-controller:${ATOMIX_RAFT_STORAGE_VERSION} diff --git a/go.sum b/go.sum index 79eac83..ad34837 100644 --- a/go.sum +++ b/go.sum @@ -30,10 +30,6 @@ github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40 h1:wLOZYpUQvIVrQOEhN5ND github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d h1:rM+AnOZfgosBZzvkbZUbttAWKkj3m6y2f4Jj4jo7YA4= github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= -github.com/atomix/atomix-api v0.0.0-20190819230829-366ccc994adb h1:5BfPSZekPTwr8SoHWZVYEj8bHtZJavTXWGRbsEs/t/4= -github.com/atomix/atomix-api v0.0.0-20190819230829-366ccc994adb/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= -github.com/atomix/atomix-api v0.0.0-20190821212433-320dd0dbb83e h1:gsIp6ruL8Jm5OwLwnEgmadt/ZDcoa1aeRSEIXzGW6IM= -github.com/atomix/atomix-api v0.0.0-20190821212433-320dd0dbb83e/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20190826211343-dd8f4db3bf77 h1:+PUuY9wDRp+VAg/JbEguzdOMJj6ruUw6Kw/y+QYHB6s= github.com/atomix/atomix-api v0.0.0-20190826211343-dd8f4db3bf77/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20191002225141-1ee9c98c7dfd h1:D1Gsxu6L0UyPKcXJM/WUrdDYFyXrjlUP+nj6xhVp9N8= @@ -44,8 +40,6 @@ github.com/atomix/atomix-api v0.0.0-20191014233757-4786daa5a314 h1:P5nVDVOjAOF9J github.com/atomix/atomix-api v0.0.0-20191014233757-4786daa5a314/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20191017192115-4d6a4f8e87a3 h1:iKZxEUGEJ1ZfWDu3Co8kRXBYCSlBphDw4eyWRuNH7NY= github.com/atomix/atomix-api v0.0.0-20191017192115-4d6a4f8e87a3/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= -github.com/atomix/atomix-api v0.0.0-20191021183656-837bfda65c82 h1:jqTiJj5KfEADMgkVd06NhUC0DxSLwrWE56KghT9vGgw= -github.com/atomix/atomix-api v0.0.0-20191021183656-837bfda65c82/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20191217054529-55159c51ab6e/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20191219205733-d87d186a4fba/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20200114202737-fac5129dc110 h1:zC1M7PvCmGfSt5ZIgdcaswFXpQjEbnIqLL2NwHv7pO0= @@ -68,167 +62,31 @@ github.com/atomix/atomix-go-local v0.0.0-20191218214123-a72c188f976e/go.mod h1:T github.com/atomix/atomix-go-local v0.0.0-20191219211400-d2c88ae3b162/go.mod h1:GhjFshTc1hk4dOl8KN3IjvW7C7sKgRHe16paqz16qPU= github.com/atomix/atomix-go-local v0.0.0-20200109182851-1ee7104bf7e9/go.mod h1:N8dEk+DnbmyriuqnztKPUrNTX981aU3e8XUsljROROs= github.com/atomix/atomix-go-local v0.0.0-20200114211211-897c3ad6c28a/go.mod h1:GrWU2xyyGC9JuK1lxIeYcNwJLSRgV+QjrtncmYxpnGU= -github.com/atomix/atomix-go-node v0.0.0-20190719005747-0f8c60e0a3b2 h1:vVBNZD73tjpwkTFsis7NFpPRbJfbISlkQqUiaoKwliU= -github.com/atomix/atomix-go-node v0.0.0-20190719005747-0f8c60e0a3b2/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190719061137-3f86e3486d51 h1:C0W5/6Mf+9mxq6QIGHyrI/XgTM+CMdqQTqw8f/FRPH8= -github.com/atomix/atomix-go-node v0.0.0-20190719061137-3f86e3486d51/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190723203741-aa83861706e3 h1:io96NUUEgI7xj9hqcTrl2ERGSA/kp45v5g+FnRkDftU= -github.com/atomix/atomix-go-node v0.0.0-20190723203741-aa83861706e3/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190723212223-21b3fa94e24d h1:JDv7q2lrY7eZqBNMs//R9zH983/uQ6R1UhObpo2vQxk= -github.com/atomix/atomix-go-node v0.0.0-20190723212223-21b3fa94e24d/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190723225512-f9066705797e h1:Sk1EIG4uZnATwP+jdI2Ut6vhhHXLTzLTBdAWzaHHbZY= -github.com/atomix/atomix-go-node v0.0.0-20190723225512-f9066705797e/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190723233736-cee78db530c5 h1:ryh8odcWH5M/TcOgMXmi1ATEw1DnsroXeHBkk2a450Y= -github.com/atomix/atomix-go-node v0.0.0-20190723233736-cee78db530c5/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190724000417-e9a0dad335a2 h1:+5ejm9dxoA9BnBiAGBhYHkP3ODA3vYadfaxpmikTHFs= -github.com/atomix/atomix-go-node v0.0.0-20190724000417-e9a0dad335a2/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190729172704-2c5640b79f9f h1:o5p0aufvNEp6Xyv0mw8PigQuW82DHseDfo5FtBcV2IA= -github.com/atomix/atomix-go-node v0.0.0-20190729172704-2c5640b79f9f/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190729220851-2d7963a2ec7b h1:1dLEenF0oMKRTuFZOIj7Bmj5j5JtOkSrFRRUPuJ27D4= -github.com/atomix/atomix-go-node v0.0.0-20190729220851-2d7963a2ec7b/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190729225617-bddb2c3eb1a2 h1:DuY1QVOPCwN8sh5wFH9rSzrr6BmlRohKzwZgY1nxenU= -github.com/atomix/atomix-go-node v0.0.0-20190729225617-bddb2c3eb1a2/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190729231405-351166c88023 h1:8yRZ7H9rtkKe+JOmah1uhvG0qkPSC/fkU9gAzuCDvWU= -github.com/atomix/atomix-go-node v0.0.0-20190729231405-351166c88023/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190730074111-4249919f736b h1:Nfq8Ytm+MAgXrf3hIngTYsLZ0/KyYDNrbvSwQhdiIFo= -github.com/atomix/atomix-go-node v0.0.0-20190730074111-4249919f736b/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190731000948-7aa303b98cc6 h1:cZJWMkRIJcTkjjQ45qHOSE4iXHUlEBmJVmLnI6V5ZWU= -github.com/atomix/atomix-go-node v0.0.0-20190731000948-7aa303b98cc6/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190731003930-8411c8c0c2fb h1:igfTx6G70Rp3rSXcQrVGY8guTNy77Xh8e8L1I5du8gM= -github.com/atomix/atomix-go-node v0.0.0-20190731003930-8411c8c0c2fb/go.mod h1:Ok8qa4Dhjvzc6c9lNV1r9aboClq/5lQUyMoi51LWA6E= -github.com/atomix/atomix-go-node v0.0.0-20190731012417-a59a57a00299 h1:fK+HvIox/odx+N8UZRzbEvPDyUFIxkCCrP9Hvd3EcPM= -github.com/atomix/atomix-go-node v0.0.0-20190731012417-a59a57a00299/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190731061942-8d798e77d929 h1:xRNOYSdQOzRnLMeCKSYX1HtZhw/OYW7qSIfXc1K/TRI= -github.com/atomix/atomix-go-node v0.0.0-20190731061942-8d798e77d929/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190731062159-115683b4384d h1:AWYcdxz8vvgRBANF/9d5axkyBtl0gnBcnatQi+/oUQA= -github.com/atomix/atomix-go-node v0.0.0-20190731062159-115683b4384d/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190801183050-91c1aad909a7 h1:wDUXszk9ACKr5lI93tahPhmYPzalbNcM4eVSxnHgWbk= -github.com/atomix/atomix-go-node v0.0.0-20190801183050-91c1aad909a7/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190802021335-b339ec39a7ad h1:cXV7bk/jeZu6Hwu38HIK5JU9nrEGmCyUUiIH44+/GYA= -github.com/atomix/atomix-go-node v0.0.0-20190802021335-b339ec39a7ad/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190802071230-d610bf18a93a h1:m0/C1BMd54eeZdr/i8bk9BHX+XaVM6fatjV+TPlbMlE= -github.com/atomix/atomix-go-node v0.0.0-20190802071230-d610bf18a93a/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190802080858-580a09b7b93d h1:aW3HO52/i7d6zbkLnbv7u2eDHs8xGgbpt2mOxLdzm2I= -github.com/atomix/atomix-go-node v0.0.0-20190802080858-580a09b7b93d/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190803002803-78d9673d9dbb h1:B5Q6DBme37Ksy8ZUTNy5u4OEVlM5gcT4uf65ao0orxE= -github.com/atomix/atomix-go-node v0.0.0-20190803002803-78d9673d9dbb/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190803002958-2cfb8ea83707 h1:WgSnOU2/e/VahswnutPKmt/tSeVkO9gc0VEITTr9D3E= -github.com/atomix/atomix-go-node v0.0.0-20190803002958-2cfb8ea83707/go.mod h1:HYViBuO8+UXs4lJI65kkze7dUp4fRixuBfaZJshre3w= -github.com/atomix/atomix-go-node v0.0.0-20190803072439-7b1c69fa028e h1:K2XWz95wPkSAT7mJHaFGm/reqVDipv40vK99SsaNlgE= -github.com/atomix/atomix-go-node v0.0.0-20190803072439-7b1c69fa028e/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190803085147-863c754843bf h1:6F+g9lxDBBEpLBMzhx0yC/2ee1XBLkBLdyDawTLFlmc= -github.com/atomix/atomix-go-node v0.0.0-20190803085147-863c754843bf/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190804192939-52fd35441203 h1:z9JVlRiyIjNIBlvJygmGUxrLs/A76xaVc8OQr5HPgfA= -github.com/atomix/atomix-go-node v0.0.0-20190804192939-52fd35441203/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190804210559-9a3bde9f9f03 h1:uoibvSRvR8T7Ib/ymf3nu8G7WMGDhbPsNmkEi3rR5/4= -github.com/atomix/atomix-go-node v0.0.0-20190804210559-9a3bde9f9f03/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190805082236-26688cdcb959 h1:b+sIvNSws3fKP2MSLCBVCwg06bwKBAWLT0kaRydHNAI= -github.com/atomix/atomix-go-node v0.0.0-20190805082236-26688cdcb959/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190806194603-4dd1003cbfba h1:oDzAtOnHa1oJSaZunrSGgBuzfTq/8hC3xuBJefF7rRE= -github.com/atomix/atomix-go-node v0.0.0-20190806194603-4dd1003cbfba/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190806204203-361d1beb74f2 h1:zAXZ8HyWSH2ORKhJMzslKUlUyRmf8wPAQwc5hT6ndqk= -github.com/atomix/atomix-go-node v0.0.0-20190806204203-361d1beb74f2/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190806214631-fd95aeea7307 h1:F2xZcdZBE6q1YCBT59DRdFey8ser79nz6ft/hFKRG5g= -github.com/atomix/atomix-go-node v0.0.0-20190806214631-fd95aeea7307/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190806215754-29209110ddbb h1:M+E+2lcb1HyYIkIfXYXvq53jx2fpLS/I/V0mERa0mSs= -github.com/atomix/atomix-go-node v0.0.0-20190806215754-29209110ddbb/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190814013453-cca412259d86 h1:cJD5fATZ9YytxbGoN0aOEO+LQW9ig+6COihqWI6rdKo= -github.com/atomix/atomix-go-node v0.0.0-20190814013453-cca412259d86/go.mod h1:AX6dqVU12HBfSTPp0s7qqUjGD6fusaO1K0zkTukwH20= -github.com/atomix/atomix-go-node v0.0.0-20190819235918-362f3143b084 h1:pp555c1uxKC8UqiifN/azV8CgNAsD3J/FQyrzwblbmA= -github.com/atomix/atomix-go-node v0.0.0-20190819235918-362f3143b084/go.mod h1:rWp3DgtUt4qdHDm//ewTptIaEbFde298JSWYN90zeNo= -github.com/atomix/atomix-go-node v0.0.0-20190821212719-184a30111d47 h1:qfsxLh8RrCSBNkjPo31D2YC8iBeHmKlVBL6IhFLrFWA= -github.com/atomix/atomix-go-node v0.0.0-20190821212719-184a30111d47/go.mod h1:Be6nQFjC9uQqH+aA/pL1vqgm1H7K7GeWSTwy+JcO0P8= -github.com/atomix/atomix-go-node v0.0.0-20190823235037-38e2494ed153 h1:fsSdmRzoJ65OVZGp2M2lE4TccL5LgN/Wne+A6/9jOdQ= -github.com/atomix/atomix-go-node v0.0.0-20190823235037-38e2494ed153/go.mod h1:Be6nQFjC9uQqH+aA/pL1vqgm1H7K7GeWSTwy+JcO0P8= -github.com/atomix/atomix-go-node v0.0.0-20190823235222-427712cbd612 h1:fqZreC7LD4uIYXSsHsxQwckJe4AFBMKMgzN+u4Zx6cM= -github.com/atomix/atomix-go-node v0.0.0-20190823235222-427712cbd612/go.mod h1:Be6nQFjC9uQqH+aA/pL1vqgm1H7K7GeWSTwy+JcO0P8= -github.com/atomix/atomix-go-node v0.0.0-20190824014937-2965c0a29292 h1:DDmfIs/h04SZDZ+ugyOeSk6z10aSrttgnaywyXfPKv4= -github.com/atomix/atomix-go-node v0.0.0-20190824014937-2965c0a29292/go.mod h1:Be6nQFjC9uQqH+aA/pL1vqgm1H7K7GeWSTwy+JcO0P8= -github.com/atomix/atomix-go-node v0.0.0-20190827010800-2403202bdd19 h1:Kmr9zbOXGi+xO4viyN5hf5+IhPeFlkAtOMJwMhgWRbw= -github.com/atomix/atomix-go-node v0.0.0-20190827010800-2403202bdd19/go.mod h1:PL1T5R78itch1QC1CN4JmbRL/2XQlg4R95R14822C6Q= github.com/atomix/atomix-go-node v0.0.0-20190827191929-2d3dc9c550d9/go.mod h1:PL1T5R78itch1QC1CN4JmbRL/2XQlg4R95R14822C6Q= github.com/atomix/atomix-go-node v0.0.0-20190828183436-fc30340cd8db/go.mod h1:dyh8Bb50qKfMlpqDE6X+dQ1tZ399WKEABa3ntDYImnA= -github.com/atomix/atomix-go-node v0.0.0-20190828204904-ecf13fb1bb59 h1:BcxgS6kpjrc6vzBeYx5+nFnas5LpFLyTKWamhQuIQDk= -github.com/atomix/atomix-go-node v0.0.0-20190828204904-ecf13fb1bb59/go.mod h1:KJxB/MAgndAbyCOqTV2hatw7lExiZZs7QCOr45IfC9U= github.com/atomix/atomix-go-node v0.0.0-20190830183721-649263a17223/go.mod h1:KJxB/MAgndAbyCOqTV2hatw7lExiZZs7QCOr45IfC9U= github.com/atomix/atomix-go-node v0.0.0-20190830183818-a5b5157566f6 h1:rxmMkW6vJOGYSRiqdsim5szVT9N4deSTCvlclPJwHN4= github.com/atomix/atomix-go-node v0.0.0-20190830183818-a5b5157566f6/go.mod h1:398EUMrz8gNaqdsNDMXW2OlSp6nNPZLcC7b/QsXzl80= -github.com/atomix/atomix-go-node v0.0.0-20190902075446-2434a506f892 h1:I4sZ5gpiputlOPRS89qNsdBif5+McT3LhMy9OPZBN8U= -github.com/atomix/atomix-go-node v0.0.0-20190902075446-2434a506f892/go.mod h1:398EUMrz8gNaqdsNDMXW2OlSp6nNPZLcC7b/QsXzl80= -github.com/atomix/atomix-go-node v0.0.0-20190906183917-e22495f73c4f h1:1SRI/P+IIiHXdrXM3smFo9bTIu0jrO294JmgVgc12zA= -github.com/atomix/atomix-go-node v0.0.0-20190906183917-e22495f73c4f/go.mod h1:398EUMrz8gNaqdsNDMXW2OlSp6nNPZLcC7b/QsXzl80= -github.com/atomix/atomix-go-node v0.0.0-20190916222357-cec4496a5357 h1:vGIrFVYLwe/QbozxeIXAA/G1xNmRHpYKbvTvQEUHW9A= -github.com/atomix/atomix-go-node v0.0.0-20190916222357-cec4496a5357/go.mod h1:398EUMrz8gNaqdsNDMXW2OlSp6nNPZLcC7b/QsXzl80= github.com/atomix/atomix-go-node v0.0.0-20190917012211-d4866b018ab6/go.mod h1:fQ/oMxUHpVMugRSWfBhS2z1l8TXyXOoNlLdq43eVAOU= -github.com/atomix/atomix-go-node v0.0.0-20190917062304-bc450565962e h1:TppMdqd74UR5qE1Vxp2eNtqBhNcZFGTB0QOfFwsirwE= -github.com/atomix/atomix-go-node v0.0.0-20190917062304-bc450565962e/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190918200431-21db501987f0 h1:MSOKNd7kQn9CQT9m5VArM4PGzj4nrkTDZFocw0EXMmI= -github.com/atomix/atomix-go-node v0.0.0-20190918200431-21db501987f0/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190919190641-9951ecc1268a h1:tw1GhOHeyftluGefbTqNe8Q4KECraE8qA6ImrGzVUO0= -github.com/atomix/atomix-go-node v0.0.0-20190919190641-9951ecc1268a/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190919225615-693c6f4ab69a h1:kXKzCsV8XIp/IwAslHNigpBR6Ev9ZYseNe0sRi5Ltso= -github.com/atomix/atomix-go-node v0.0.0-20190919225615-693c6f4ab69a/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190923205429-84d7491a87fb h1:VGDYsKspCC2P2hrpqprsSAuV4kZT3IAAyGdqGP82P7g= -github.com/atomix/atomix-go-node v0.0.0-20190923205429-84d7491a87fb/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190923210144-d73e7e1dd607 h1:QNoCRZg3jyrk2zDZTO09A00LLVRZQPc8qMyZlCxLeCs= -github.com/atomix/atomix-go-node v0.0.0-20190923210144-d73e7e1dd607/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190923211154-452adb214e34 h1:CFaKjx5f9RegLf3SNIZnhwavqF6lslF0oL/oQGhpLas= -github.com/atomix/atomix-go-node v0.0.0-20190923211154-452adb214e34/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190923214324-5a4d59f0f824 h1:Gz+SquQ/m0fxsYdUeYuSmPUe5acLO4SJMU1OWeEcli8= -github.com/atomix/atomix-go-node v0.0.0-20190923214324-5a4d59f0f824/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190924075258-21f03c379d03 h1:sXguvMZjbYfce2ddcQY6jJEPjWBlmbQ6ESDk0j3EzkE= -github.com/atomix/atomix-go-node v0.0.0-20190924075258-21f03c379d03/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190926080752-898b919286d4 h1:rttafkF3t6UT0kQEKMlPJzTQmrfwFkNJZRXoi3raVd8= -github.com/atomix/atomix-go-node v0.0.0-20190926080752-898b919286d4/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= -github.com/atomix/atomix-go-node v0.0.0-20190926081035-67b9a00d3312 h1:1NyeyTXaXD6Qez3ne5aHiphRZcQFNYEarP/4TorgotM= -github.com/atomix/atomix-go-node v0.0.0-20190926081035-67b9a00d3312/go.mod h1:Fq2QpY1LYaICw1wbvTd7cm90yqRdUpc+Vi8KT0Z+HIM= github.com/atomix/atomix-go-node v0.0.0-20191002230317-dabfbb700511/go.mod h1:qkkk2Kd2UvftwukgjqLNJtaXjYJl+WIvDCm+HjkjLKg= -github.com/atomix/atomix-go-node v0.0.0-20191002230403-4d8c5d6bfb9e h1:NZuKyAdO8WoKL+C9EhQEe8f3QhVwhE6INLvqVfJeEZc= -github.com/atomix/atomix-go-node v0.0.0-20191002230403-4d8c5d6bfb9e/go.mod h1:m3BU2Yn1nJ/inhJS9I7Epqra4RfjIR2nkTheX8UGcs0= -github.com/atomix/atomix-go-node v0.0.0-20191003173830-326f8ac44e94 h1:HEkEs3Xv3WHhHMnBFhWnzAQoNhT55yFnjMqzerCedus= -github.com/atomix/atomix-go-node v0.0.0-20191003173830-326f8ac44e94/go.mod h1:m3BU2Yn1nJ/inhJS9I7Epqra4RfjIR2nkTheX8UGcs0= -github.com/atomix/atomix-go-node v0.0.0-20191005003820-945ff0afee33 h1:xDeeQlCnlbh6Gul7BzlRvxHkgicFP2eP6HGf5NxFnAs= -github.com/atomix/atomix-go-node v0.0.0-20191005003820-945ff0afee33/go.mod h1:m3BU2Yn1nJ/inhJS9I7Epqra4RfjIR2nkTheX8UGcs0= github.com/atomix/atomix-go-node v0.0.0-20191005004840-a11d88ec22cd/go.mod h1:m3BU2Yn1nJ/inhJS9I7Epqra4RfjIR2nkTheX8UGcs0= -github.com/atomix/atomix-go-node v0.0.0-20191005004913-89f218752fa8 h1:E0lb/nmMLi5bpmKwkBXucMVpqBdjINSaEHcB+YDuBKU= -github.com/atomix/atomix-go-node v0.0.0-20191005004913-89f218752fa8/go.mod h1:/54WTC76w8KaAvzUI8NfNG1eyBMGczYetkMNkpPCYB8= -github.com/atomix/atomix-go-node v0.0.0-20191005224900-3dcae25c956f h1:cAJv8+D80jbrdgHuc1KD1w8PUFTWpGsHS72AIS3EcMA= -github.com/atomix/atomix-go-node v0.0.0-20191005224900-3dcae25c956f/go.mod h1:eQpS42TVM24rJW+9lJRl1EJIi3YGPjTv1xsNYxuMrf0= github.com/atomix/atomix-go-node v0.0.0-20191005232742-ebda59622853 h1:gKRVpzS3fKmQTRXFM21Y9cl+Jzz4oRv0ZJ5VLp3n2ps= github.com/atomix/atomix-go-node v0.0.0-20191005232742-ebda59622853/go.mod h1:eQpS42TVM24rJW+9lJRl1EJIi3YGPjTv1xsNYxuMrf0= -github.com/atomix/atomix-go-node v0.0.0-20191008000533-254ed34bd1d1 h1:MVqKyW2HiPGp4rg+g/7FqYx1PAv8MAqkig6e+Mgch+4= -github.com/atomix/atomix-go-node v0.0.0-20191008000533-254ed34bd1d1/go.mod h1:eQpS42TVM24rJW+9lJRl1EJIi3YGPjTv1xsNYxuMrf0= -github.com/atomix/atomix-go-node v0.0.0-20191015003036-c3c92f68ca0c h1:PTOsjvIAE09fBStOhqjQhhK3h28mNca5efo1gNtS6E8= -github.com/atomix/atomix-go-node v0.0.0-20191015003036-c3c92f68ca0c/go.mod h1:Lt3xjBCH/uWpcoz5n/7j8oquhUJtzmF6qh0dUmFu4Ro= github.com/atomix/atomix-go-node v0.0.0-20191015003435-f70de243fb25 h1:YN2hZn/FkaIpx1QcD0CNG5foSV6x0JdfMIbWaSNqIMg= github.com/atomix/atomix-go-node v0.0.0-20191015003435-f70de243fb25/go.mod h1:Lt3xjBCH/uWpcoz5n/7j8oquhUJtzmF6qh0dUmFu4Ro= -github.com/atomix/atomix-go-node v0.0.0-20191015014638-64dd6c85416c h1:ETGyHjdj2dQQOSN5BrkTtK0TO9NhES2cU5Uy5fjMNAc= -github.com/atomix/atomix-go-node v0.0.0-20191015014638-64dd6c85416c/go.mod h1:RYBKVIL64s0IJXL9HtoF3Wgc6KRXzdaa2KqCvPEuwhI= -github.com/atomix/atomix-go-node v0.0.0-20191015235149-a27e7ec80c20 h1:DlQ5bk4Vs5NCfzaxNxYrHyaaBmbrxVDGfH9Bog1Bxvw= -github.com/atomix/atomix-go-node v0.0.0-20191015235149-a27e7ec80c20/go.mod h1:RYBKVIL64s0IJXL9HtoF3Wgc6KRXzdaa2KqCvPEuwhI= -github.com/atomix/atomix-go-node v0.0.0-20191017201713-c8f48f52e1cc h1:CYWj3EwFs++T9wyN4IRsd+Qikr+XqNJ9wAV4+24QUf8= -github.com/atomix/atomix-go-node v0.0.0-20191017201713-c8f48f52e1cc/go.mod h1:SmM+sWPwscnx6AIqGbu9Y2EqCGdUlyHTnrJa/A3XqWA= github.com/atomix/atomix-go-node v0.0.0-20191018192345-6fbb86e5f5ef/go.mod h1:SmM+sWPwscnx6AIqGbu9Y2EqCGdUlyHTnrJa/A3XqWA= -github.com/atomix/atomix-go-node v0.0.0-20191021232909-930498392f0f h1:G5kXu5UV840Jg28/xoyaGYmJz0+JjHx/nojvlNoE2qk= -github.com/atomix/atomix-go-node v0.0.0-20191021232909-930498392f0f/go.mod h1:wLJ9+8FK7p8R8tz3bXPQ6GTvpwhkwjyPomkL9ok5AzM= -github.com/atomix/atomix-go-node v0.0.0-20191021234659-c841a97bec89 h1:Xe8eyruUnCkTRlZbg+BWXGICFgMB0+82bcmIgHY1S+s= -github.com/atomix/atomix-go-node v0.0.0-20191021234659-c841a97bec89/go.mod h1:wLJ9+8FK7p8R8tz3bXPQ6GTvpwhkwjyPomkL9ok5AzM= github.com/atomix/atomix-go-node v0.0.0-20191218180435-f58b519050d0/go.mod h1:CwNyxY+AwoQt76lt5EjK7PCIVuNe48c5mh/kJNBBEAg= github.com/atomix/atomix-go-node v0.0.0-20191219211341-c5c395d1bc60/go.mod h1:hgqxWxx0JDLYX5Ekf1Pt8esnaxCe7gyNPGke0Pc8w4E= github.com/atomix/atomix-go-node v0.0.0-20200109182801-f5c8e3518e4a/go.mod h1:sFa3CXb7khBF2wEfk9qCY9rs7GrwsukqIGbrYkiAGz0= github.com/atomix/atomix-go-node v0.0.0-20200114210733-967537ba5e31/go.mod h1:95XzgeBRaJ88X7LkIfo7wqOUaGuRKBVNMwVI/BYXRzs= github.com/atomix/atomix-go-node v0.0.0-20200114212450-178a2dc70336/go.mod h1:DIYsaWqOiBkyE+vUgHFMM3+vCq07RUskEWN4W5cEtyE= -github.com/atomix/atomix-go-node v0.0.0-20200122201244-04ffdbfa38ba h1:k6j2D1xPLi4pHEAldWIPzFi5ReVCBpfJejh3RY/IhcA= -github.com/atomix/atomix-go-node v0.0.0-20200122201244-04ffdbfa38ba/go.mod h1:Ivu7jH8b9hFTTmWtq9u7TmJQHQqsEmxY0Baa2l/uE6U= -github.com/atomix/atomix-go-node v0.0.0-20200122235207-5b8d5f54288e h1:ZvrOnLAMmkuXhgDl+p0zxh9PTXi7+dRCG5hc5iz7HPA= -github.com/atomix/atomix-go-node v0.0.0-20200122235207-5b8d5f54288e/go.mod h1:Ivu7jH8b9hFTTmWtq9u7TmJQHQqsEmxY0Baa2l/uE6U= -github.com/atomix/atomix-raft-node v0.0.0-20200122235228-b4ec83818247 h1:iRRjOuujKJhbT41nbMiAsuwqQjuYkeZtggCbHh4yMBk= -github.com/atomix/atomix-raft-node v0.0.0-20200122235228-b4ec83818247/go.mod h1:lTqHix5FwcS9dQR6wzpT4Rg7jgcT0hw0xzT3F4/WvPQ= +github.com/atomix/go-client v0.0.0-20200124004211-e5e19cd4730d h1:u0auLxc2kozUEUw8IQdPu6lmhVpAGGWxzft6D5qMzJc= github.com/atomix/go-client v0.0.0-20200124004211-e5e19cd4730d/go.mod h1:KBBiViOYhnvSh/U0fIYiuJ8j+k63eyRWZl42kwdseFI= github.com/atomix/go-framework v0.0.0-20200123235029-e29fc7d6e104/go.mod h1:Dn7tjt5LIRA/qr5afQZDh9hdtvK82uQpMrADYIlVtfQ= github.com/atomix/go-framework v0.0.0-20200124003840-f24758b13aa2/go.mod h1:vo5K/v+rc5mohoZIw9vbyj+Y/EGGaEdF6XVkEvM9CSM= github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 h1:gFEiAzDt/pL0PeNhvNcv8tseCLYGPg5piWseW0HizKc= github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345/go.mod h1:G/yTdMGpfwbA2YXym/VEi7op3qZKd1jtGJX0sjcZmpQ= +github.com/atomix/go-local v0.0.0-20200124003802-357f6682b2f4 h1:acDXXOuqzbqfOYDTMvz4dhckHfmH0DMfXSQE+gLFGOA= github.com/atomix/go-local v0.0.0-20200124003802-357f6682b2f4/go.mod h1:MabPkX/j2bN399GVAYGigyvDaAslu7omZoujEfzdKDg= github.com/atomix/kubernetes-controller v0.2.0-beta.1 h1:NYOBbwXHrBNQs6YmXQV1eHZkdO+ViZwvTpZwE0CtYj8= github.com/atomix/kubernetes-controller v0.2.0-beta.1/go.mod h1:lWOxAfXoCF7O1Gu/ZAEYdg8QJAc3BFRyvyQQ5WsXy+E= @@ -239,6 +97,7 @@ github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -273,6 +132,7 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -384,6 +244,7 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= @@ -404,10 +265,12 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 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/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -439,9 +302,11 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -531,14 +396,10 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/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-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190718202018-cfdd5522f6f6/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190729225735-1bd0cf576493/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -546,7 +407,6 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 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/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mobile v0.0.0-20190806162312-597adff16ade/go.mod h1:AlhUtkH4DA4asiFC5RgK7ZKmauvtkAVcy9L0epCzlWo= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -568,8 +428,6 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 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-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -603,14 +461,6 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e h1:D5TXcfTk7xF7hvieo4QErS3qqCB4teTffacDWr7CI+0= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190730183949-1393eb018365 h1:SaXEMXhWzMJThc05vu6uh61Q245r4KaWMrsTedk0FDc= -golang.org/x/sys v0.0.0-20190730183949-1393eb018365/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/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -645,18 +495,9 @@ golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190617190820-da514acc4774/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-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190723021737-8bb11ff117ca/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190730215328-ed3277de2799/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190731214159-1e85ed8060aa/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190802003818-e9bb7d36c060/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190802220118-1d1727260058/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190806193329-249e2b9b6d3c/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190806194950-6743d4095d4b/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190806205909-9fb8e5c87901/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190806215303-88ddfcebc769/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= @@ -668,6 +509,7 @@ google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -687,8 +529,6 @@ google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiq google.golang.org/grpc v1.21.0 h1:G+97AoqBnmZIT91cLG/EkCoK9NSelj64P8bOHHNmGn0= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= @@ -696,6 +536,7 @@ google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac 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= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -706,6 +547,7 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -722,6 +564,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc= k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= +k8s.io/apiextensions-apiserver v0.17.2 h1:cP579D2hSZNuO/rZj9XFRzwJNYb41DbNANJb6Kolpss= k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= From d8f78d58265592371a4f336fade1b38904ea14b0 Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 09:44:42 -0700 Subject: [PATCH 06/11] Disable cache --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45e125d..03cb487 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ branches: only: - master -cache: - directories: - - $HOME/gopath/pkg/mod # Cache the Go modules +#cache: +# directories: +# - $HOME/gopath/pkg/mod # Cache the Go modules services: - 'docker' From de9a9a4385a3e6240de7e83623bbedd8d47e3fda Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 13:33:01 -0700 Subject: [PATCH 07/11] Add helm charts --- cmd/atomix-raft-node/main.go | 87 ------- cmd/raft-storage-controller/main.go | 2 +- cmd/raft-storage/main.go | 22 +- deploy/examples/raft-storage.yaml | 26 ++ .../helm/raft-storage-controller/.helmignore | 22 ++ .../helm/raft-storage-controller/Chart.yaml | 15 ++ .../crds/raftstorageclass.yaml | 33 +++ .../templates/_helpers.tpl | 63 +++++ .../templates/deployment.yaml | 51 ++++ .../templates/role.yaml | 42 ++++ .../templates/rolebinding.yaml | 12 + .../templates/serviceaccount.yaml | 5 + .../templates/storagecontroller.yaml | 8 + .../helm/raft-storage-controller/values.yaml | 5 + deploy/helm/raft-storage/.helmignore | 22 ++ deploy/helm/raft-storage/Chart.yaml | 15 ++ .../helm/raft-storage/templates/_helpers.tpl | 63 +++++ .../helm/raft-storage/templates/database.yaml | 15 ++ .../helm/raft-storage/templates/storage.yaml | 10 + deploy/helm/raft-storage/values.yaml | 9 + deploy/raft-storage-controller.yaml | 156 ++++++++++++ pkg/apis/addtoscheme_storage_v1beta1.go | 27 ++ pkg/apis/apis.go | 27 ++ pkg/apis/v1beta1/raft.go | 12 +- pkg/controller/cluster.go | 36 ++- pkg/controller/def.go | 2 +- pkg/controller/reconciler.go | 2 +- pkg/controller/util/k8s/container.go | 194 ++++++++++++++ pkg/controller/util/k8s/protocol.go | 236 ++++++++++++++++++ pkg/controller/util/k8s/resources.go | 127 ++++++++++ 30 files changed, 1247 insertions(+), 99 deletions(-) delete mode 100644 cmd/atomix-raft-node/main.go create mode 100644 deploy/examples/raft-storage.yaml create mode 100644 deploy/helm/raft-storage-controller/.helmignore create mode 100644 deploy/helm/raft-storage-controller/Chart.yaml create mode 100644 deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml create mode 100644 deploy/helm/raft-storage-controller/templates/_helpers.tpl create mode 100644 deploy/helm/raft-storage-controller/templates/deployment.yaml create mode 100644 deploy/helm/raft-storage-controller/templates/role.yaml create mode 100644 deploy/helm/raft-storage-controller/templates/rolebinding.yaml create mode 100644 deploy/helm/raft-storage-controller/templates/serviceaccount.yaml create mode 100644 deploy/helm/raft-storage-controller/templates/storagecontroller.yaml create mode 100644 deploy/helm/raft-storage-controller/values.yaml create mode 100644 deploy/helm/raft-storage/.helmignore create mode 100644 deploy/helm/raft-storage/Chart.yaml create mode 100644 deploy/helm/raft-storage/templates/_helpers.tpl create mode 100644 deploy/helm/raft-storage/templates/database.yaml create mode 100644 deploy/helm/raft-storage/templates/storage.yaml create mode 100644 deploy/helm/raft-storage/values.yaml create mode 100644 deploy/raft-storage-controller.yaml create mode 100644 pkg/apis/addtoscheme_storage_v1beta1.go create mode 100644 pkg/apis/apis.go create mode 100644 pkg/controller/util/k8s/container.go create mode 100644 pkg/controller/util/k8s/protocol.go create mode 100644 pkg/controller/util/k8s/resources.go diff --git a/cmd/atomix-raft-node/main.go b/cmd/atomix-raft-node/main.go deleted file mode 100644 index 713f693..0000000 --- a/cmd/atomix-raft-node/main.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2019-present Open Networking Foundation. -// -// 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. - -package main - -import ( - "bytes" - "fmt" - "github.com/atomix/api/proto/atomix/controller" - "github.com/atomix/go-framework/pkg/atomix" - "github.com/atomix/go-framework/pkg/atomix/registry" - "github.com/atomix/raft-replica/pkg/atomix/raft" - "github.com/atomix/raft-replica/pkg/atomix/raft/config" - "github.com/gogo/protobuf/jsonpb" - log "github.com/sirupsen/logrus" - "io/ioutil" - "os" - "os/signal" -) - -func main() { - log.SetLevel(log.TraceLevel) - log.SetOutput(os.Stdout) - - nodeID := os.Args[1] - partitionConfig := parsePartitionConfig() - protocolConfig := parseProtocolConfig() - - // Start the node. The node will be started in its own goroutine. - node := atomix.NewNode(nodeID, partitionConfig, raft.NewProtocol(protocolConfig), registry.Registry) - if err := node.Start(); err != nil { - fmt.Println(err) - os.Exit(1) - } - - // Wait for an interrupt signal - ch := make(chan os.Signal, 1) - signal.Notify(ch, os.Interrupt) - <-ch - - // Stop the node after an interrupt - if err := node.Stop(); err != nil { - fmt.Println(err) - os.Exit(1) - } -} - -func parsePartitionConfig() *controller.PartitionConfig { - nodeConfigFile := os.Args[2] - nodeConfig := &controller.PartitionConfig{} - nodeBytes, err := ioutil.ReadFile(nodeConfigFile) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - if err := jsonpb.Unmarshal(bytes.NewReader(nodeBytes), nodeConfig); err != nil { - fmt.Println(err) - os.Exit(1) - } - return nodeConfig -} - -func parseProtocolConfig() *config.ProtocolConfig { - protocolConfigFile := os.Args[3] - protocolConfig := &config.ProtocolConfig{} - protocolBytes, err := ioutil.ReadFile(protocolConfigFile) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - if err := jsonpb.Unmarshal(bytes.NewReader(protocolBytes), protocolConfig); err != nil { - fmt.Println(err) - os.Exit(1) - } - return protocolConfig -} diff --git a/cmd/raft-storage-controller/main.go b/cmd/raft-storage-controller/main.go index c5ba4d2..d57fa6a 100644 --- a/cmd/raft-storage-controller/main.go +++ b/cmd/raft-storage-controller/main.go @@ -28,9 +28,9 @@ import ( apis "github.com/atomix/raft-storage/pkg/apis/v1beta1" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "sigs.k8s.io/controller-runtime/pkg/client/config" - logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/manager/signals" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" ) var log = logf.Log.WithName("cmd") diff --git a/cmd/raft-storage/main.go b/cmd/raft-storage/main.go index 713f693..79c94aa 100644 --- a/cmd/raft-storage/main.go +++ b/cmd/raft-storage/main.go @@ -17,6 +17,10 @@ package main import ( "bytes" "fmt" + "io/ioutil" + "os" + "os/signal" + "github.com/atomix/api/proto/atomix/controller" "github.com/atomix/go-framework/pkg/atomix" "github.com/atomix/go-framework/pkg/atomix/registry" @@ -24,9 +28,6 @@ import ( "github.com/atomix/raft-replica/pkg/atomix/raft/config" "github.com/gogo/protobuf/jsonpb" log "github.com/sirupsen/logrus" - "io/ioutil" - "os" - "os/signal" ) func main() { @@ -56,6 +57,21 @@ func main() { } } +func parseClusterConfig() *controller.ClusterConfig { + clusterConfigFile := os.Args[2] + clusterConfig := &controller.ClusterConfig{} + clusterConfigBytes, err := ioutil.ReadFile(clusterConfigFile) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + if err := jsonpb.Unmarshal(bytes.NewReader(clusterConfigBytes), clusterConfig); err != nil { + fmt.Println(err) + os.Exit(1) + } + return clusterConfig +} + func parsePartitionConfig() *controller.PartitionConfig { nodeConfigFile := os.Args[2] nodeConfig := &controller.PartitionConfig{} diff --git a/deploy/examples/raft-storage.yaml b/deploy/examples/raft-storage.yaml new file mode 100644 index 0000000..2b670b2 --- /dev/null +++ b/deploy/examples/raft-storage.yaml @@ -0,0 +1,26 @@ +apiVersion: storage.cloud.atomix.io/v1beta1 +kind: RaftStorageClass +metadata: + name: raft + labels: + app: raft +spec: + image: atomix/raft-storage:latest + imagePullPolicy: IfNotPresent + replicas: 1 +--- +apiVersion: cloud.atomix.io/v1beta2 +kind: Database +metadata: + name: raft +spec: + clusters: 3 + template: + spec: + partitions: 10 + storage: + group: storage.cloud.atomix.io + version: v1beta1 + kind: RaftStorageClass + name: raft + namespace: kube-system diff --git a/deploy/helm/raft-storage-controller/.helmignore b/deploy/helm/raft-storage-controller/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/deploy/helm/raft-storage-controller/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deploy/helm/raft-storage-controller/Chart.yaml b/deploy/helm/raft-storage-controller/Chart.yaml new file mode 100644 index 0000000..7a2648d --- /dev/null +++ b/deploy/helm/raft-storage-controller/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +name: raft-storage-controller +description: Raft Storage Controller +kubeVersion: ">=1.12.0" +type: application +version: 0.1.0 +appVersion: v0.1.0-beta.1 +keywords: + - atomix +home: https://atomix.io +maintainers: + - name: adib + email: adib@opennetworking.org + - name: kuujo + email: jordan@opennetworking.org diff --git a/deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml b/deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml new file mode 100644 index 0000000..b3f56fb --- /dev/null +++ b/deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml @@ -0,0 +1,33 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: raftstorageclasses.storage.cloud.atomix.io +spec: + group: storage.cloud.atomix.io + names: + kind: RaftStorageClass + listKind: RaftStorageClassList + plural: raftstorageclasses + singular: raftstorageclass + scope: Namespaced + versions: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + required: + - spec + properties: + spec: + type: object + properties: + image: + type: string + imagePullPolicy: + type: string + replicas: + type: integer + + diff --git a/deploy/helm/raft-storage-controller/templates/_helpers.tpl b/deploy/helm/raft-storage-controller/templates/_helpers.tpl new file mode 100644 index 0000000..3ef4a2c --- /dev/null +++ b/deploy/helm/raft-storage-controller/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "cache-controller.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cache-controller.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cache-controller.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "cache-controller.labels" -}} +helm.sh/chart: {{ include "cache-controller.chart" . }} +{{ include "cache-controller.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "cache-controller.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cache-controller.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "cache-controller.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "cache-controller.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/deploy/helm/raft-storage-controller/templates/deployment.yaml b/deploy/helm/raft-storage-controller/templates/deployment.yaml new file mode 100644 index 0000000..8a0e766 --- /dev/null +++ b/deploy/helm/raft-storage-controller/templates/deployment.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + name: {{ .Release.Name }} + template: + metadata: + labels: + name: {{ .Release.Name }} + spec: + serviceAccountName: {{ .Release.Name }} + containers: + - name: {{ .Release.Name }} + # Replace this with the built image name + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + ports: + - containerPort: 60000 + name: metrics + - containerPort: 5679 + name: control + command: + - raft-storage-controller + imagePullPolicy: {{ .Values.image.pullPolicy }} + readinessProbe: + exec: + command: + - stat + - /tmp/atomix-controller-ready + initialDelaySeconds: 4 + periodSeconds: 10 + failureThreshold: 1 + env: + - name: CONTROLLER_NAME + value: {{ .Release.Name }} + - name: CONTROLLER_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/role.yaml b/deploy/helm/raft-storage-controller/templates/role.yaml new file mode 100644 index 0000000..e771a31 --- /dev/null +++ b/deploy/helm/raft-storage-controller/templates/role.yaml @@ -0,0 +1,42 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: {{ .Release.Name }} +rules: + - apiGroups: + - "" + resources: + - pods + - services + - endpoints + - events + - configmaps + - secrets + verbs: + - '*' + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - apps + resources: + - deployments + verbs: + - '*' + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - '*' + - apiGroups: + - cloud.atomix.io + - storage.cloud.atomix.io + resources: + - '*' + verbs: + - '*' \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/rolebinding.yaml b/deploy/helm/raft-storage-controller/templates/rolebinding.yaml new file mode 100644 index 0000000..363a502 --- /dev/null +++ b/deploy/helm/raft-storage-controller/templates/rolebinding.yaml @@ -0,0 +1,12 @@ +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ .Release.Name }} +subjects: + - kind: ServiceAccount + name: {{.Release.Name}} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ .Release.Name }} + apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/serviceaccount.yaml b/deploy/helm/raft-storage-controller/templates/serviceaccount.yaml new file mode 100644 index 0000000..6b102da --- /dev/null +++ b/deploy/helm/raft-storage-controller/templates/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/storagecontroller.yaml b/deploy/helm/raft-storage-controller/templates/storagecontroller.yaml new file mode 100644 index 0000000..4aaef86 --- /dev/null +++ b/deploy/helm/raft-storage-controller/templates/storagecontroller.yaml @@ -0,0 +1,8 @@ +apiVersion: cloud.atomix.io/v1beta2 +kind: StorageController +metadata: + name: raft +spec: + group: storage.cloud.atomix.io + version: v1beta1 + kind: RaftStorageClass \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/values.yaml b/deploy/helm/raft-storage-controller/values.yaml new file mode 100644 index 0000000..0f62167 --- /dev/null +++ b/deploy/helm/raft-storage-controller/values.yaml @@ -0,0 +1,5 @@ +image: + repository: atomix/raft-storage-controller + tag: latest + pullPolicy: IfNotPresent + pullSecrets: [] \ No newline at end of file diff --git a/deploy/helm/raft-storage/.helmignore b/deploy/helm/raft-storage/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/deploy/helm/raft-storage/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deploy/helm/raft-storage/Chart.yaml b/deploy/helm/raft-storage/Chart.yaml new file mode 100644 index 0000000..49c3fc3 --- /dev/null +++ b/deploy/helm/raft-storage/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +name: raft-storage +description: raft Storage +kubeVersion: ">=1.12.0" +type: application +version: 0.1.0 +appVersion: v0.1.0-beta.1 +keywords: + - atomix +home: https://atomix.io +maintainers: + - name: adib + email: adib@opennetworking.org + - name: kuujo + email: jordan@opennetworking.org diff --git a/deploy/helm/raft-storage/templates/_helpers.tpl b/deploy/helm/raft-storage/templates/_helpers.tpl new file mode 100644 index 0000000..0daccbc --- /dev/null +++ b/deploy/helm/raft-storage/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "cache-storage.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cache-storage.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cache-storage.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "cache-storage.labels" -}} +helm.sh/chart: {{ include "cache-storage.chart" . }} +{{ include "cache-storage.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "cache-storage.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cache-storage.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "cache-storage.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "cache-storage.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/deploy/helm/raft-storage/templates/database.yaml b/deploy/helm/raft-storage/templates/database.yaml new file mode 100644 index 0000000..ca97384 --- /dev/null +++ b/deploy/helm/raft-storage/templates/database.yaml @@ -0,0 +1,15 @@ +apiVersion: cloud.atomix.io/v1beta2 +kind: Database +metadata: + name: {{ .Release.Name }} +spec: + clusters: {{ .Values.clusters }} + template: + spec: + partitions: {{ .Values.partitions }} + storage: + group: storage.cloud.atomix.io + version: v1beta1 + kind: RaftStorageClass + name: {{ .Release.Name }} + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/deploy/helm/raft-storage/templates/storage.yaml b/deploy/helm/raft-storage/templates/storage.yaml new file mode 100644 index 0000000..9a8dbb9 --- /dev/null +++ b/deploy/helm/raft-storage/templates/storage.yaml @@ -0,0 +1,10 @@ +apiVersion: storage.cloud.atomix.io/v1beta1 +kind: RaftStorageClass +metadata: + name: {{ .Release.Name }} + labels: + app: {{ .Release.Name }} +spec: + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + replicas: {{ .Values.replicas }} diff --git a/deploy/helm/raft-storage/values.yaml b/deploy/helm/raft-storage/values.yaml new file mode 100644 index 0000000..5ff29f3 --- /dev/null +++ b/deploy/helm/raft-storage/values.yaml @@ -0,0 +1,9 @@ +clusters: 3 +partitions: 10 +replicas: 1 + +image: + repository: atomix/raft-storage + tag: latest + pullPolicy: IfNotPresent + pullSecrets: [] \ No newline at end of file diff --git a/deploy/raft-storage-controller.yaml b/deploy/raft-storage-controller.yaml new file mode 100644 index 0000000..15a05a8 --- /dev/null +++ b/deploy/raft-storage-controller.yaml @@ -0,0 +1,156 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: raftstorageclasses.storage.cloud.atomix.io +spec: + group: storage.cloud.atomix.io + names: + kind: RaftStorageClass + listKind: RaftStorageClassList + plural: raftstorageclasses + singular: raftstorageclass + scope: Namespaced + versions: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + required: + - spec + properties: + spec: + type: object + properties: + image: + type: string + imagePullPolicy: + type: string + replicas: + type: integer + + +--- +apiVersion: cloud.atomix.io/v1beta2 +kind: StorageController +metadata: + name: raft +spec: + group: storage.cloud.atomix.io + version: v1beta1 + kind: RaftStorageClass +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: raft-storage-controller +rules: + - apiGroups: + - "" + resources: + - pods + - services + - endpoints + - events + - configmaps + - secrets + verbs: + - '*' + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - apiGroups: + - apps + resources: + - deployments + verbs: + - '*' + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - '*' + - apiGroups: + - cloud.atomix.io + - storage.cloud.atomix.io + resources: + - '*' + verbs: + - '*' +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: raft-storage-controller +subjects: + - kind: ServiceAccount + name: raft-storage-controller + namespace: kube-system +roleRef: + kind: ClusterRole + name: raft-storage-controller + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: raft-storage-controller + namespace: kube-system +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: raft-storage-controller + namespace: kube-system +spec: + replicas: 1 + selector: + matchLabels: + name: raft-storage-controller + template: + metadata: + labels: + name: raft-storage-controller + spec: + serviceAccountName: raft-storage-controller + containers: + - name: raft-storage-controller + # Replace this with the built image name + image: atomix/raft-storage-controller:latest + ports: + - containerPort: 60000 + name: metrics + - containerPort: 5679 + name: control + command: + - raft-storage-controller + imagePullPolicy: IfNotPresent + readinessProbe: + exec: + command: + - stat + - /tmp/atomix-controller-ready + initialDelaySeconds: 4 + periodSeconds: 10 + failureThreshold: 1 + env: + - name: CONTROLLER_NAME + value: "raft-storage-controller" + - name: CONTROLLER_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace \ No newline at end of file diff --git a/pkg/apis/addtoscheme_storage_v1beta1.go b/pkg/apis/addtoscheme_storage_v1beta1.go new file mode 100644 index 0000000..3dbd442 --- /dev/null +++ b/pkg/apis/addtoscheme_storage_v1beta1.go @@ -0,0 +1,27 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package apis + +import ( + atomixv1beta2 "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" + raftv1beta1 "github.com/atomix/raft-storage/pkg/apis/v1beta1" +) + +func init() { + // register the types with the Scheme so the components can map objects to GroupVersionKinds and back + AddToSchemes = append(AddToSchemes, raftv1beta1.SchemeBuilder.AddToScheme) + AddToSchemes = append(AddToSchemes, atomixv1beta2.SchemeBuilder.AddToScheme) + +} diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go new file mode 100644 index 0000000..beb7a8a --- /dev/null +++ b/pkg/apis/apis.go @@ -0,0 +1,27 @@ +// Copyright 2019-present Open Networking Foundation. +// +// 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. + +package apis + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// AddToSchemes may be used to add all resources defined in the project to a Scheme +var AddToSchemes runtime.SchemeBuilder + +// AddToScheme adds all Resources to the Scheme +func AddToScheme(s *runtime.Scheme) error { + return AddToSchemes.AddToScheme(s) +} diff --git a/pkg/apis/v1beta1/raft.go b/pkg/apis/v1beta1/raft.go index ddf554d..678f899 100644 --- a/pkg/apis/v1beta1/raft.go +++ b/pkg/apis/v1beta1/raft.go @@ -15,6 +15,7 @@ package v1beta1 import ( + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -29,12 +30,19 @@ const RaftStorageClassKind = "RaftStorageClass" // RaftStorageClassSpec defines the desired state of RaftStorageClass type RaftStorageClassSpec struct { + // Replicas is the number of raft replicas + Replicas int32 `json:"replicas,omitempty"` + + // Image is the image to run + Image string `json:"image,omitempty"` + + // ImagePullPolicy is the pull policy to apply + ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` } // RaftStorageClassStatus defines the observed state of RaftStorageClass type RaftStorageClassStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file + Ready bool `json:"ready,omitempty"` } // +kubebuilder:object:root=true diff --git a/pkg/controller/cluster.go b/pkg/controller/cluster.go index a7e53db..c66dd4f 100644 --- a/pkg/controller/cluster.go +++ b/pkg/controller/cluster.go @@ -12,21 +12,49 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package controller import ( + "context" + "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" "github.com/atomix/raft-storage/pkg/apis/v1beta1" + "github.com/atomix/raft-storage/pkg/controller/util/k8s" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) func (r *Reconciler) addHeadlessService(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - panic("Implement me") + log.Info("Creating headless raft service", "Name", cluster.Name, "Namespace", cluster.Namespace) + service := k8s.NewClusterHeadlessService(cluster) + if err := controllerutil.SetControllerReference(storage, service, r.scheme); err != nil { + return err + } + return r.client.Create(context.TODO(), service) } func (r *Reconciler) addStatefulSet(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - panic("Implement me") + log.Info("Creating raft replicas", "Name", cluster.Name, "Namespace", cluster.Namespace) + set, err := k8s.NewBackendStatefulSet(cluster, storage) + if err != nil { + return err + } + if err := controllerutil.SetControllerReference(storage, set, r.scheme); err != nil { + return err + } + + return r.client.Create(context.TODO(), set) } func (r *Reconciler) addConfigMap(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - panic("Implement me") + log.Info("Creating raft ConfigMap", "Name", cluster.Name, "Namespace", cluster.Namespace) + var config interface{} + + cm, err := k8s.NewClusterConfigMap(cluster, storage, config) + if err != nil { + return err + } + if err := controllerutil.SetControllerReference(storage, cm, r.scheme); err != nil { + return err + } + return r.client.Create(context.TODO(), cm) } diff --git a/pkg/controller/def.go b/pkg/controller/def.go index 1d3f4eb..4dc7182 100644 --- a/pkg/controller/def.go +++ b/pkg/controller/def.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package controller diff --git a/pkg/controller/reconciler.go b/pkg/controller/reconciler.go index e467981..71eef42 100644 --- a/pkg/controller/reconciler.go +++ b/pkg/controller/reconciler.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package test +package controller import ( "context" diff --git a/pkg/controller/util/k8s/container.go b/pkg/controller/util/k8s/container.go new file mode 100644 index 0000000..fc8cc1c --- /dev/null +++ b/pkg/controller/util/k8s/container.go @@ -0,0 +1,194 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package k8s + +import ( + corev1 "k8s.io/api/core/v1" +) + +// NewContainer creates a new container builder +func NewContainer() ContainerBuilder { + return &Container{} +} + +// ContainerBuilder container builder interface +type ContainerBuilder interface { + SetName(string) ContainerBuilder + SetImage(string) ContainerBuilder + SetArgs(...string) ContainerBuilder + SetEnv(env []corev1.EnvVar) ContainerBuilder + SetCommand(...string) ContainerBuilder + SetPullPolicy(policy corev1.PullPolicy) ContainerBuilder + SetReadinessProbe(probe *corev1.Probe) ContainerBuilder + SetLivenessProbe(probe *corev1.Probe) ContainerBuilder + SetVolumeMounts([]corev1.VolumeMount) ContainerBuilder + SetResources(corev1.ResourceRequirements) ContainerBuilder + SetPorts([]corev1.ContainerPort) ContainerBuilder + Build() Container +} + +// Container container type defines an abstraction for containers +type Container struct { + name string + image string + command []string + args []string + env []corev1.EnvVar + resources corev1.ResourceRequirements + pullPolicy corev1.PullPolicy + readinessProbe *corev1.Probe + livenessProbe *corev1.Probe + volumeMounts []corev1.VolumeMount + ports []corev1.ContainerPort +} + +// SetResources sets container resources +func (c *Container) SetResources(resources corev1.ResourceRequirements) ContainerBuilder { + c.resources = resources + return c +} + +// Resources returns container resources +func (c *Container) Resources() corev1.ResourceRequirements { + return c.resources +} + +// SetVolumeMounts sets mounted volumes +func (c *Container) SetVolumeMounts(volumeMounts []corev1.VolumeMount) ContainerBuilder { + c.volumeMounts = volumeMounts + return c +} + +// VolumeMounts returns container mounted volumes +func (c *Container) VolumeMounts() []corev1.VolumeMount { + return c.volumeMounts +} + +// ReadinessProbe returns readinessProbe info +func (c *Container) ReadinessProbe() *corev1.Probe { + return c.readinessProbe +} + +// SetReadinessProbe sets container readinessProbe +func (c *Container) SetReadinessProbe(probe *corev1.Probe) ContainerBuilder { + c.readinessProbe = probe + return c +} + +// LivenessProbe returns livenessprobe info +func (c *Container) LivenessProbe() *corev1.Probe { + return c.livenessProbe +} + +// SetLivenessProbe sets container livenessProbe +func (c *Container) SetLivenessProbe(probe *corev1.Probe) ContainerBuilder { + c.livenessProbe = probe + return c +} + +// Env returns container env variables +func (c *Container) Env() []corev1.EnvVar { + return c.env + +} + +// SetEnv sets environment variables +func (c *Container) SetEnv(env []corev1.EnvVar) ContainerBuilder { + c.env = env + return c +} + +// Ports return a set of container ports +func (c *Container) Ports() []corev1.ContainerPort { + return c.ports +} + +// SetPorts sets a container ports +func (c *Container) SetPorts(ports []corev1.ContainerPort) ContainerBuilder { + c.ports = ports + return c +} + +// PullPolicy returns the pull policy +func (c *Container) PullPolicy() corev1.PullPolicy { + return c.pullPolicy +} + +// SetPullPolicy sets pull policy for a container +func (c *Container) SetPullPolicy(pullPolicy corev1.PullPolicy) ContainerBuilder { + c.pullPolicy = pullPolicy + return c +} + +// Command returns a container command +func (c *Container) Command() []string { + return c.command +} + +// SetCommand sets a container command +func (c *Container) SetCommand(command ...string) ContainerBuilder { + c.command = command + return c +} + +// Args returns a container args +func (c *Container) Args() []string { + return c.args +} + +// SetArgs sets a container arguments +func (c *Container) SetArgs(args ...string) ContainerBuilder { + c.args = args + return c +} + +// SetName sets a container name +func (c *Container) SetName(name string) ContainerBuilder { + c.name = name + return c +} + +// Name returns the name of a container +func (c *Container) Name() string { + return c.name +} + +// SetImage sets a container image +func (c *Container) SetImage(image string) ContainerBuilder { + c.image = image + return c +} + +// Image returns the name of a container image +func (c *Container) Image() string { + return c.image +} + +// Build builds a container +func (c *Container) Build() Container { + return Container{ + name: c.name, + image: c.image, + command: c.command, + args: c.args, + resources: c.resources, + livenessProbe: c.livenessProbe, + pullPolicy: c.pullPolicy, + readinessProbe: c.readinessProbe, + ports: c.ports, + env: c.env, + volumeMounts: c.volumeMounts, + } +} diff --git a/pkg/controller/util/k8s/protocol.go b/pkg/controller/util/k8s/protocol.go new file mode 100644 index 0000000..00bc2ff --- /dev/null +++ b/pkg/controller/util/k8s/protocol.go @@ -0,0 +1,236 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package k8s + +import ( + "encoding/json" + "fmt" + + api "github.com/atomix/api/proto/atomix/controller" + "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" + storage "github.com/atomix/raft-storage/pkg/apis/v1beta1" + "github.com/gogo/protobuf/jsonpb" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + policyv1beta1 "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +const ( + apiPort = 5678 + protocolPort = 5679 + probePort = 5679 +) + +// NewClusterConfigMap returns a new ConfigMap for initializing Atomix clusters +func NewClusterConfigMap(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass, config interface{}) (*corev1.ConfigMap, error) { + clusterConfig, err := newNodeConfigString(cluster, storage) + if err != nil { + return nil, err + } + + protocolConfig, err := newProtocolConfigString(config) + if err != nil { + return nil, err + } + + return &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: cluster.Name, + Namespace: cluster.Namespace, + Labels: cluster.Labels, + }, + Data: map[string]string{ + clusterConfigFile: clusterConfig, + protocolConfigFile: protocolConfig, + }, + }, nil +} + +// getPodName returns the name of the pod for the given pod ID +func getPodName(cluster *v1beta2.Cluster, pod int) string { + return fmt.Sprintf("%s-%d", cluster.Name, pod) +} + +// getPodDNSName returns the fully qualified DNS name for the given pod ID +func getPodDNSName(cluster *v1beta2.Cluster, pod int) string { + return fmt.Sprintf("%s-%d.%s.%s.svc.cluster.local", cluster.Name, pod, cluster.Name, cluster.Namespace) +} + +// newNodeConfigString creates a node configuration string for the given cluster +func newNodeConfigString(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass) (string, error) { + members := make([]*api.MemberConfig, storage.Spec.Replicas) + for i := 0; i < int(storage.Spec.Replicas); i++ { + members[i] = &api.MemberConfig{ + ID: getPodName(cluster, i), + Host: getPodDNSName(cluster, i), + ProtocolPort: protocolPort, + APIPort: apiPort, + } + } + + config := &api.ClusterConfig{ + Members: members, + } + + marshaller := jsonpb.Marshaler{} + return marshaller.MarshalToString(config) +} + +// newProtocolConfigString creates a protocol configuration string for the given cluster and protocol +func newProtocolConfigString(config interface{}) (string, error) { + bytes, err := json.Marshal(config) + if err != nil { + return "", err + } + return string(bytes), nil +} + +// NewClusterDisruptionBudget returns a new pod disruption budget for the cluster group cluster +func NewClusterDisruptionBudget(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass) *policyv1beta1.PodDisruptionBudget { + minAvailable := intstr.FromInt(int(storage.Spec.Replicas)/2 + 1) + return &policyv1beta1.PodDisruptionBudget{ + ObjectMeta: metav1.ObjectMeta{ + Name: cluster.Name, + Namespace: cluster.Namespace, + }, + Spec: policyv1beta1.PodDisruptionBudgetSpec{ + MinAvailable: &minAvailable, + }, + } +} + +// NewClusterHeadlessService returns a new headless service for a cluster group +func NewClusterHeadlessService(cluster *v1beta2.Cluster) *corev1.Service { + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: cluster.Name, + Namespace: cluster.Namespace, + Labels: cluster.Labels, + Annotations: map[string]string{ + "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true", + }, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "api", + Port: apiPort, + }, + { + Name: "protocol", + Port: protocolPort, + }, + }, + PublishNotReadyAddresses: true, + ClusterIP: "None", + Selector: cluster.Labels, + }, + } +} + +// NewBackendStatefulSet returns a new StatefulSet for a cluster group +func NewBackendStatefulSet(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass) (*appsv1.StatefulSet, error) { + volumes := []corev1.Volume{ + newConfigVolume(cluster.Name), + } + + args := []string{ + "$(NODE_ID)", + fmt.Sprintf("%s/%s", configPath, clusterConfigFile), + fmt.Sprintf("%s/%s", configPath, protocolConfigFile), + } + + volumes = append(volumes, newDataVolume()) + + image := storage.Spec.Image + pullPolicy := storage.Spec.ImagePullPolicy + readinessProbe := + &corev1.Probe{ + Handler: corev1.Handler{ + Exec: &corev1.ExecAction{ + Command: []string{"stat", "/tmp/atomix-ready"}, + }, + }, + InitialDelaySeconds: 5, + TimeoutSeconds: 10, + FailureThreshold: 12, + } + livenessProbe := + &corev1.Probe{ + Handler: corev1.Handler{ + TCPSocket: &corev1.TCPSocketAction{ + Port: intstr.IntOrString{Type: intstr.Int, IntVal: probePort}, + }, + }, + InitialDelaySeconds: 60, + TimeoutSeconds: 10, + } + + if pullPolicy == "" { + pullPolicy = corev1.PullIfNotPresent + } + + apiContainerPort := corev1.ContainerPort{ + Name: "api", + ContainerPort: 5678, + } + protocolContainerPort := corev1.ContainerPort{ + Name: "protocol", + ContainerPort: 5679, + } + + containerBuilder := NewContainer() + container := containerBuilder.SetImage(image). + SetName(cluster.Name). + SetPullPolicy(pullPolicy). + SetArgs(args...). + SetPorts([]corev1.ContainerPort{apiContainerPort, protocolContainerPort}). + SetReadinessProbe(readinessProbe). + SetLivenessProbe(livenessProbe). + SetVolumeMounts([]corev1.VolumeMount{newDataVolumeMount(), newConfigVolumeMount()}). + Build() + + return &appsv1.StatefulSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: cluster.Name, + Namespace: cluster.Namespace, + Labels: cluster.Labels, + }, + Spec: appsv1.StatefulSetSpec{ + ServiceName: cluster.Name, + Replicas: &storage.Spec.Replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: cluster.Labels, + }, + UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ + Type: appsv1.RollingUpdateStatefulSetStrategyType, + }, + PodManagementPolicy: appsv1.ParallelPodManagement, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: cluster.Labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + newContainer(container), + }, + Volumes: volumes, + }, + }, + }, + }, nil +} diff --git a/pkg/controller/util/k8s/resources.go b/pkg/controller/util/k8s/resources.go new file mode 100644 index 0000000..c5e0808 --- /dev/null +++ b/pkg/controller/util/k8s/resources.go @@ -0,0 +1,127 @@ +// Copyright 2020-present Open Networking Foundation. +// +// 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. + +package k8s + +import ( + corev1 "k8s.io/api/core/v1" +) + +const ( + appKey = "app" + atomixApp = "redis" + typeKey = "type" + databaseKey = "database" + clusterKey = "cluster" +) + +const ( + controllerAnnotation = "cloud.atomix.io/controller" + typeAnnotation = "cloud.atomix.io/type" + databaseAnnotation = "cloud.atomix.io/group" + clusterAnnotation = "cloud.atomix.io/cluster" +) + +const ( + clusterType = "cluster" + proxyType = "proxy" +) + +const ( + headlessServiceSuffix = "hs" + disruptionBudgetSuffix = "pdb" + configSuffix = "config" +) + +const ( + configPath = "/etc/atomix" + clusterConfigFile = "cluster.json" + protocolConfigFile = "protocol.json" + dataPath = "/var/lib/atomix" +) + +const ( + configVolume = "config" + dataVolume = "data" +) + +const ( + controllerNameVar = "CONTROLLER_NAME" + controllerNamespaceVar = "CONTROLLER_NAMESPACE" +) + +// newContainer returns a container for a node +func newContainer(container Container) corev1.Container { + container.env = append(container.env, corev1.EnvVar{ + Name: "NODE_ID", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }) + + return corev1.Container{ + Name: container.Name(), + Image: container.Image(), + ImagePullPolicy: container.PullPolicy(), + Env: container.Env(), + Resources: container.Resources(), + Ports: container.Ports(), + Args: container.args, + ReadinessProbe: container.ReadinessProbe(), + LivenessProbe: container.LivenessProbe(), + VolumeMounts: container.VolumeMounts(), + } +} + +// newDataVolumeMount returns a data volume mount for a pod +func newDataVolumeMount() corev1.VolumeMount { + return corev1.VolumeMount{ + Name: dataVolume, + MountPath: dataPath, + } +} + +// newConfigVolumeMount returns a configuration volume mount for a pod +func newConfigVolumeMount() corev1.VolumeMount { + return corev1.VolumeMount{ + Name: configVolume, + MountPath: configPath, + } +} + +// newConfigVolume returns the configuration volume for a pod +func newConfigVolume(name string) corev1.Volume { + return corev1.Volume{ + Name: configVolume, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: name, + }, + }, + }, + } +} + +// newDataVolume returns the data volume for a pod +func newDataVolume() corev1.Volume { + return corev1.Volume{ + Name: dataVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + } +} From 5efd49145b6e331b8cd3d4433d89b5b0ed4c860f Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 13:37:33 -0700 Subject: [PATCH 08/11] Disable coverage for now --- .travis.yml | 2 +- Makefile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 03cb487..35ae0d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,4 +38,4 @@ jobs: script: - make coverage - goveralls -coverprofile=coverage.out -service=travis-ci - - make image + - make images diff --git a/Makefile b/Makefile index d0f73e3..cfed7b8 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,9 @@ build: deps deps: # @HELP ensure that the required dependencies are in place - go build -v ./... - bash -c "diff -u <(echo -n) <(git diff go.mod)" - bash -c "diff -u <(echo -n) <(git diff go.sum)" + #go build -v ./... + #bash -c "diff -u <(echo -n) <(git diff go.mod)" + #bash -c "diff -u <(echo -n) <(git diff go.sum)" test: # @HELP run the unit tests and source code validation test: build license_check linters @@ -24,8 +24,8 @@ test: build license_check linters coverage: # @HELP generate unit test coverage data coverage: build linters license_check - go test github.com/atomix/raft-storage/pkg/... -coverprofile=coverage.out.tmp -covermode=count - @cat coverage.out.tmp | grep -v ".pb.go" > coverage.out + #go test github.com/atomix/raft-storage/pkg/... -coverprofile=coverage.out.tmp -covermode=count + #@cat coverage.out.tmp | grep -v ".pb.go" > coverage.out linters: # @HELP examines Go source code and reports coding problems golangci-lint run From fc553598eb39cfd0638f8c871d6298ed18816a4a Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 20:22:08 -0700 Subject: [PATCH 09/11] Remove raft storage controller --- .travis.yml | 8 +- Makefile | 17 +- build/bin/push-images | 5 + build/raft-storage-controller/Dockerfile | 7 - build/raft-storage-node/Dockerfile | 7 + build/raft-storage/Dockerfile | 7 - cmd/raft-storage-controller/main.go | 99 -------- .../main.go | 0 deploy/examples/raft-storage.yaml | 2 +- deploy/helm/{raft-storage => }/Chart.yaml | 4 +- .../helm/raft-storage-controller/.helmignore | 22 -- .../helm/raft-storage-controller/Chart.yaml | 15 -- .../crds/raftstorageclass.yaml | 33 --- .../templates/_helpers.tpl | 63 ----- .../templates/deployment.yaml | 51 ---- .../templates/role.yaml | 42 ---- .../templates/rolebinding.yaml | 12 - .../templates/serviceaccount.yaml | 5 - .../templates/storagecontroller.yaml | 8 - .../helm/raft-storage-controller/values.yaml | 5 - deploy/helm/raft-storage/.helmignore | 22 -- .../{raft-storage => }/templates/_helpers.tpl | 0 .../templates/database.yaml | 0 .../{raft-storage => }/templates/storage.yaml | 0 deploy/helm/{raft-storage => }/values.yaml | 2 +- deploy/raft-storage-controller.yaml | 1 + pkg/apis/addtoscheme_storage_v1beta1.go | 27 -- pkg/apis/apis.go | 27 -- pkg/apis/v1beta1/raft.go | 70 ------ pkg/apis/v1beta1/register.go | 36 --- pkg/apis/v1beta1/zz_generated.deepcopy.go | 114 --------- pkg/controller/cluster.go | 60 ----- pkg/controller/def.go | 15 -- pkg/controller/reconciler.go | 194 -------------- pkg/controller/util/k8s/container.go | 194 -------------- pkg/controller/util/k8s/protocol.go | 236 ------------------ pkg/controller/util/k8s/resources.go | 127 ---------- 37 files changed, 24 insertions(+), 1513 deletions(-) create mode 100755 build/bin/push-images delete mode 100644 build/raft-storage-controller/Dockerfile create mode 100644 build/raft-storage-node/Dockerfile delete mode 100644 build/raft-storage/Dockerfile delete mode 100644 cmd/raft-storage-controller/main.go rename cmd/{raft-storage => raft-storage-node}/main.go (100%) rename deploy/helm/{raft-storage => }/Chart.yaml (84%) delete mode 100644 deploy/helm/raft-storage-controller/.helmignore delete mode 100644 deploy/helm/raft-storage-controller/Chart.yaml delete mode 100644 deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml delete mode 100644 deploy/helm/raft-storage-controller/templates/_helpers.tpl delete mode 100644 deploy/helm/raft-storage-controller/templates/deployment.yaml delete mode 100644 deploy/helm/raft-storage-controller/templates/role.yaml delete mode 100644 deploy/helm/raft-storage-controller/templates/rolebinding.yaml delete mode 100644 deploy/helm/raft-storage-controller/templates/serviceaccount.yaml delete mode 100644 deploy/helm/raft-storage-controller/templates/storagecontroller.yaml delete mode 100644 deploy/helm/raft-storage-controller/values.yaml delete mode 100644 deploy/helm/raft-storage/.helmignore rename deploy/helm/{raft-storage => }/templates/_helpers.tpl (100%) rename deploy/helm/{raft-storage => }/templates/database.yaml (100%) rename deploy/helm/{raft-storage => }/templates/storage.yaml (100%) rename deploy/helm/{raft-storage => }/values.yaml (72%) delete mode 100644 pkg/apis/addtoscheme_storage_v1beta1.go delete mode 100644 pkg/apis/apis.go delete mode 100644 pkg/apis/v1beta1/raft.go delete mode 100644 pkg/apis/v1beta1/register.go delete mode 100644 pkg/apis/v1beta1/zz_generated.deepcopy.go delete mode 100644 pkg/controller/cluster.go delete mode 100644 pkg/controller/def.go delete mode 100644 pkg/controller/reconciler.go delete mode 100644 pkg/controller/util/k8s/container.go delete mode 100644 pkg/controller/util/k8s/protocol.go delete mode 100644 pkg/controller/util/k8s/resources.go diff --git a/.travis.yml b/.travis.yml index 35ae0d2..46ac8c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,16 +26,10 @@ install: before_script: - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest -after_success: - - if [[ "$TRAVIS_BRANCH" == "master" ]]; then - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD; - make push; - fi jobs: include: - stage: tests script: - make coverage - - goveralls -coverprofile=coverage.out -service=travis-ci - - make images + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./build/bin/push-images; fi' diff --git a/Makefile b/Makefile index cfed7b8..d871be3 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,11 @@ all: build build: # @HELP build the source code build: deps - GOOS=linux GOARCH=amd64 go build -o build/_output/raft-storage ./cmd/raft-storage - GOOS=linux GOARCH=amd64 go build -o build/_output/raft-storage-controller ./cmd/raft-storage-controller + GOOS=linux GOARCH=amd64 go build -o build/raft-storage-node/_output/raft-storage-node ./cmd/raft-storage-node deps: # @HELP ensure that the required dependencies are in place - #go build -v ./... - #bash -c "diff -u <(echo -n) <(git diff go.mod)" - #bash -c "diff -u <(echo -n) <(git diff go.sum)" + go build -v ./... test: # @HELP run the unit tests and source code validation test: build license_check linters @@ -40,11 +37,9 @@ proto: --entrypoint build/bin/compile_protos.sh \ onosproject/protoc-go:stable -images: # @HELP build atomix storage and atomix storage controller Docker images -images: build - docker build . -f build/raft-storage/Dockerfile -t atomix/raft-storage:${ATOMIX_RAFT_STORAGE_VERSION} - docker build . -f build/raft-storage-controller/Dockerfile -t atomix/raft-storage-controller:${ATOMIX_RAFT_STORAGE_VERSION} +image: # @HELP build atomix storage and atomix storage controller Docker images +image: build + docker build . -f build/raft-storage-node/Dockerfile -t atomix/raft-storage-node:${ATOMIX_RAFT_STORAGE_VERSION} push: # @HELP push atomix-raft-node Docker image - docker push atomix/raft-storage:${ATOMIX_RAFT_STORAGE_VERSION} - docker push atomix/raft-storage-controller:${ATOMIX_RAFT_STORAGE_VERSION} + docker push atomix/raft-storage-node:${ATOMIX_RAFT_STORAGE_VERSION} diff --git a/build/bin/push-images b/build/bin/push-images new file mode 100755 index 0000000..a89ed80 --- /dev/null +++ b/build/bin/push-images @@ -0,0 +1,5 @@ +#!/bin/bash +echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin +make image +make push + diff --git a/build/raft-storage-controller/Dockerfile b/build/raft-storage-controller/Dockerfile deleted file mode 100644 index 9999a98..0000000 --- a/build/raft-storage-controller/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM alpine:3.9 - -USER nobody - -ADD build/_output/raft-storage-controller /usr/local/bin/raft-storage-controller - -ENTRYPOINT ["raft-storage-controller"] diff --git a/build/raft-storage-node/Dockerfile b/build/raft-storage-node/Dockerfile new file mode 100644 index 0000000..d80602c --- /dev/null +++ b/build/raft-storage-node/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.9 + +USER nobody + +ADD build/raft-storage-node/_output/raft-storage-node /usr/local/bin/raft-storage-node + +ENTRYPOINT ["raft-storage-node"] diff --git a/build/raft-storage/Dockerfile b/build/raft-storage/Dockerfile deleted file mode 100644 index 36bb235..0000000 --- a/build/raft-storage/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM alpine:3.9 - -USER nobody - -ADD build/_output/raft-storage /usr/local/bin/raft-storage - -ENTRYPOINT ["raft-storage"] diff --git a/cmd/raft-storage-controller/main.go b/cmd/raft-storage-controller/main.go deleted file mode 100644 index d57fa6a..0000000 --- a/cmd/raft-storage-controller/main.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package main - -import ( - "context" - "fmt" - - controller "github.com/atomix/raft-storage/pkg/controller" - - "os" - "runtime" - - "github.com/atomix/kubernetes-controller/pkg/controller/util/leader" - "github.com/atomix/kubernetes-controller/pkg/controller/util/ready" - apis "github.com/atomix/raft-storage/pkg/apis/v1beta1" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/manager/signals" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" -) - -var log = logf.Log.WithName("cmd") - -func printVersion() { - log.Info(fmt.Sprintf("Go Version: %s", runtime.Version())) - log.Info(fmt.Sprintf("Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH)) -} - -func main() { - var namespace string - if len(os.Args) > 1 { - namespace = os.Args[1] - } - - printVersion() - - // Get a config to talk to the apiserver - cfg, err := config.GetConfig() - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Become the leader before proceeding - _ = leader.Become(context.TODO()) - - r := ready.NewFileReady() - err = r.Set() - if err != nil { - log.Error(err, "") - os.Exit(1) - } - defer func() { - _ = r.Unset() - }() - - // Create a new Cmd to provide shared dependencies and start components - mgr, err := manager.New(cfg, manager.Options{Namespace: namespace}) - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - log.Info("Registering Components.") - - // Setup Scheme for all resources - if err := apis.AddToScheme(mgr.GetScheme()); err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Setup the TestStorage controller - if err := controller.Add(mgr); err != nil { - log.Error(err, "") - os.Exit(1) - } - - log.Info("Starting the Cmd.") - - // Start the Cmd - if err := mgr.Start(signals.SetupSignalHandler()); err != nil { - log.Error(err, "controller exited non-zero") - os.Exit(1) - } -} diff --git a/cmd/raft-storage/main.go b/cmd/raft-storage-node/main.go similarity index 100% rename from cmd/raft-storage/main.go rename to cmd/raft-storage-node/main.go diff --git a/deploy/examples/raft-storage.yaml b/deploy/examples/raft-storage.yaml index 2b670b2..b1c20f9 100644 --- a/deploy/examples/raft-storage.yaml +++ b/deploy/examples/raft-storage.yaml @@ -5,7 +5,7 @@ metadata: labels: app: raft spec: - image: atomix/raft-storage:latest + image: atomix/raft-storage-node:latest imagePullPolicy: IfNotPresent replicas: 1 --- diff --git a/deploy/helm/raft-storage/Chart.yaml b/deploy/helm/Chart.yaml similarity index 84% rename from deploy/helm/raft-storage/Chart.yaml rename to deploy/helm/Chart.yaml index 49c3fc3..c2b4b44 100644 --- a/deploy/helm/raft-storage/Chart.yaml +++ b/deploy/helm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: raft-storage -description: raft Storage +name: raft-database +description: raft database kubeVersion: ">=1.12.0" type: application version: 0.1.0 diff --git a/deploy/helm/raft-storage-controller/.helmignore b/deploy/helm/raft-storage-controller/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/deploy/helm/raft-storage-controller/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/deploy/helm/raft-storage-controller/Chart.yaml b/deploy/helm/raft-storage-controller/Chart.yaml deleted file mode 100644 index 7a2648d..0000000 --- a/deploy/helm/raft-storage-controller/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v2 -name: raft-storage-controller -description: Raft Storage Controller -kubeVersion: ">=1.12.0" -type: application -version: 0.1.0 -appVersion: v0.1.0-beta.1 -keywords: - - atomix -home: https://atomix.io -maintainers: - - name: adib - email: adib@opennetworking.org - - name: kuujo - email: jordan@opennetworking.org diff --git a/deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml b/deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml deleted file mode 100644 index b3f56fb..0000000 --- a/deploy/helm/raft-storage-controller/crds/raftstorageclass.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: raftstorageclasses.storage.cloud.atomix.io -spec: - group: storage.cloud.atomix.io - names: - kind: RaftStorageClass - listKind: RaftStorageClassList - plural: raftstorageclasses - singular: raftstorageclass - scope: Namespaced - versions: - - name: v1beta1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - required: - - spec - properties: - spec: - type: object - properties: - image: - type: string - imagePullPolicy: - type: string - replicas: - type: integer - - diff --git a/deploy/helm/raft-storage-controller/templates/_helpers.tpl b/deploy/helm/raft-storage-controller/templates/_helpers.tpl deleted file mode 100644 index 3ef4a2c..0000000 --- a/deploy/helm/raft-storage-controller/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "cache-controller.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "cache-controller.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "cache-controller.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "cache-controller.labels" -}} -helm.sh/chart: {{ include "cache-controller.chart" . }} -{{ include "cache-controller.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "cache-controller.selectorLabels" -}} -app.kubernetes.io/name: {{ include "cache-controller.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "cache-controller.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "cache-controller.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/deploy/helm/raft-storage-controller/templates/deployment.yaml b/deploy/helm/raft-storage-controller/templates/deployment.yaml deleted file mode 100644 index 8a0e766..0000000 --- a/deploy/helm/raft-storage-controller/templates/deployment.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} -spec: - replicas: 1 - selector: - matchLabels: - name: {{ .Release.Name }} - template: - metadata: - labels: - name: {{ .Release.Name }} - spec: - serviceAccountName: {{ .Release.Name }} - containers: - - name: {{ .Release.Name }} - # Replace this with the built image name - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - ports: - - containerPort: 60000 - name: metrics - - containerPort: 5679 - name: control - command: - - raft-storage-controller - imagePullPolicy: {{ .Values.image.pullPolicy }} - readinessProbe: - exec: - command: - - stat - - /tmp/atomix-controller-ready - initialDelaySeconds: 4 - periodSeconds: 10 - failureThreshold: 1 - env: - - name: CONTROLLER_NAME - value: {{ .Release.Name }} - - name: CONTROLLER_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/role.yaml b/deploy/helm/raft-storage-controller/templates/role.yaml deleted file mode 100644 index e771a31..0000000 --- a/deploy/helm/raft-storage-controller/templates/role.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - name: {{ .Release.Name }} -rules: - - apiGroups: - - "" - resources: - - pods - - services - - endpoints - - events - - configmaps - - secrets - verbs: - - '*' - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - apiGroups: - - apps - resources: - - deployments - verbs: - - '*' - - apiGroups: - - policy - resources: - - poddisruptionbudgets - verbs: - - '*' - - apiGroups: - - cloud.atomix.io - - storage.cloud.atomix.io - resources: - - '*' - verbs: - - '*' \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/rolebinding.yaml b/deploy/helm/raft-storage-controller/templates/rolebinding.yaml deleted file mode 100644 index 363a502..0000000 --- a/deploy/helm/raft-storage-controller/templates/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ .Release.Name }} -subjects: - - kind: ServiceAccount - name: {{.Release.Name}} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ .Release.Name }} - apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/serviceaccount.yaml b/deploy/helm/raft-storage-controller/templates/serviceaccount.yaml deleted file mode 100644 index 6b102da..0000000 --- a/deploy/helm/raft-storage-controller/templates/serviceaccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Release.Name }} - namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/templates/storagecontroller.yaml b/deploy/helm/raft-storage-controller/templates/storagecontroller.yaml deleted file mode 100644 index 4aaef86..0000000 --- a/deploy/helm/raft-storage-controller/templates/storagecontroller.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: cloud.atomix.io/v1beta2 -kind: StorageController -metadata: - name: raft -spec: - group: storage.cloud.atomix.io - version: v1beta1 - kind: RaftStorageClass \ No newline at end of file diff --git a/deploy/helm/raft-storage-controller/values.yaml b/deploy/helm/raft-storage-controller/values.yaml deleted file mode 100644 index 0f62167..0000000 --- a/deploy/helm/raft-storage-controller/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -image: - repository: atomix/raft-storage-controller - tag: latest - pullPolicy: IfNotPresent - pullSecrets: [] \ No newline at end of file diff --git a/deploy/helm/raft-storage/.helmignore b/deploy/helm/raft-storage/.helmignore deleted file mode 100644 index 50af031..0000000 --- a/deploy/helm/raft-storage/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/deploy/helm/raft-storage/templates/_helpers.tpl b/deploy/helm/templates/_helpers.tpl similarity index 100% rename from deploy/helm/raft-storage/templates/_helpers.tpl rename to deploy/helm/templates/_helpers.tpl diff --git a/deploy/helm/raft-storage/templates/database.yaml b/deploy/helm/templates/database.yaml similarity index 100% rename from deploy/helm/raft-storage/templates/database.yaml rename to deploy/helm/templates/database.yaml diff --git a/deploy/helm/raft-storage/templates/storage.yaml b/deploy/helm/templates/storage.yaml similarity index 100% rename from deploy/helm/raft-storage/templates/storage.yaml rename to deploy/helm/templates/storage.yaml diff --git a/deploy/helm/raft-storage/values.yaml b/deploy/helm/values.yaml similarity index 72% rename from deploy/helm/raft-storage/values.yaml rename to deploy/helm/values.yaml index 5ff29f3..a05371c 100644 --- a/deploy/helm/raft-storage/values.yaml +++ b/deploy/helm/values.yaml @@ -3,7 +3,7 @@ partitions: 10 replicas: 1 image: - repository: atomix/raft-storage + repository: atomix/raft-storage-node tag: latest pullPolicy: IfNotPresent pullSecrets: [] \ No newline at end of file diff --git a/deploy/raft-storage-controller.yaml b/deploy/raft-storage-controller.yaml index 15a05a8..d47d6c4 100644 --- a/deploy/raft-storage-controller.yaml +++ b/deploy/raft-storage-controller.yaml @@ -68,6 +68,7 @@ rules: - apps resources: - deployments + - statefulsets verbs: - '*' - apiGroups: diff --git a/pkg/apis/addtoscheme_storage_v1beta1.go b/pkg/apis/addtoscheme_storage_v1beta1.go deleted file mode 100644 index 3dbd442..0000000 --- a/pkg/apis/addtoscheme_storage_v1beta1.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package apis - -import ( - atomixv1beta2 "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" - raftv1beta1 "github.com/atomix/raft-storage/pkg/apis/v1beta1" -) - -func init() { - // register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, raftv1beta1.SchemeBuilder.AddToScheme) - AddToSchemes = append(AddToSchemes, atomixv1beta2.SchemeBuilder.AddToScheme) - -} diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go deleted file mode 100644 index beb7a8a..0000000 --- a/pkg/apis/apis.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2019-present Open Networking Foundation. -// -// 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. - -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -} diff --git a/pkg/apis/v1beta1/raft.go b/pkg/apis/v1beta1/raft.go deleted file mode 100644 index 678f899..0000000 --- a/pkg/apis/v1beta1/raft.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// RaftStorageClassGroup raft storage class group -const RaftStorageClassGroup = "storage.cloud.atomix.io" - -// RaftStorageClassVersion raft storage class version -const RaftStorageClassVersion = "v1beta1" - -// RaftStorageClassKind raft storage class kind -const RaftStorageClassKind = "RaftStorageClass" - -// RaftStorageClassSpec defines the desired state of RaftStorageClass -type RaftStorageClassSpec struct { - // Replicas is the number of raft replicas - Replicas int32 `json:"replicas,omitempty"` - - // Image is the image to run - Image string `json:"image,omitempty"` - - // ImagePullPolicy is the pull policy to apply - ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` -} - -// RaftStorageClassStatus defines the observed state of RaftStorageClass -type RaftStorageClassStatus struct { - Ready bool `json:"ready,omitempty"` -} - -// +kubebuilder:object:root=true - -// RaftStorageClass is the Schema for the raftstorageclasses API -type RaftStorageClass struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec RaftStorageClassSpec `json:"spec,omitempty"` - Status RaftStorageClassStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// RaftStorageClassList contains a list of RaftStorageClass -type RaftStorageClassList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []RaftStorageClass `json:"items"` -} - -func init() { - SchemeBuilder.Register(&RaftStorageClass{}, &RaftStorageClassList{}) -} diff --git a/pkg/apis/v1beta1/register.go b/pkg/apis/v1beta1/register.go deleted file mode 100644 index 7f146bd..0000000 --- a/pkg/apis/v1beta1/register.go +++ /dev/null @@ -1,36 +0,0 @@ -/* - - -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. -*/ - -// Package v1beta1 contains API Schema definitions for the storage.cloud.atomix.io v1beta1 API group -// +kubebuilder:object:generate=true -// +groupName=storage.cloud.atomix.io.my.domain -package v1beta1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "storage.cloud.atomix.io.my.domain", Version: "v1beta1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/pkg/apis/v1beta1/zz_generated.deepcopy.go b/pkg/apis/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index ee10ef1..0000000 --- a/pkg/apis/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,114 +0,0 @@ -// +build !ignore_autogenerated - -/* - - -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 controller-gen. DO NOT EDIT. - -package v1beta1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RaftStorageClass) DeepCopyInto(out *RaftStorageClass) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClass. -func (in *RaftStorageClass) DeepCopy() *RaftStorageClass { - if in == nil { - return nil - } - out := new(RaftStorageClass) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RaftStorageClass) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RaftStorageClassList) DeepCopyInto(out *RaftStorageClassList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RaftStorageClass, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClassList. -func (in *RaftStorageClassList) DeepCopy() *RaftStorageClassList { - if in == nil { - return nil - } - out := new(RaftStorageClassList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RaftStorageClassList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RaftStorageClassSpec) DeepCopyInto(out *RaftStorageClassSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClassSpec. -func (in *RaftStorageClassSpec) DeepCopy() *RaftStorageClassSpec { - if in == nil { - return nil - } - out := new(RaftStorageClassSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RaftStorageClassStatus) DeepCopyInto(out *RaftStorageClassStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RaftStorageClassStatus. -func (in *RaftStorageClassStatus) DeepCopy() *RaftStorageClassStatus { - if in == nil { - return nil - } - out := new(RaftStorageClassStatus) - in.DeepCopyInto(out) - return out -} diff --git a/pkg/controller/cluster.go b/pkg/controller/cluster.go deleted file mode 100644 index c66dd4f..0000000 --- a/pkg/controller/cluster.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package controller - -import ( - "context" - - "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" - "github.com/atomix/raft-storage/pkg/apis/v1beta1" - "github.com/atomix/raft-storage/pkg/controller/util/k8s" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" -) - -func (r *Reconciler) addHeadlessService(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - log.Info("Creating headless raft service", "Name", cluster.Name, "Namespace", cluster.Namespace) - service := k8s.NewClusterHeadlessService(cluster) - if err := controllerutil.SetControllerReference(storage, service, r.scheme); err != nil { - return err - } - return r.client.Create(context.TODO(), service) -} - -func (r *Reconciler) addStatefulSet(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - log.Info("Creating raft replicas", "Name", cluster.Name, "Namespace", cluster.Namespace) - set, err := k8s.NewBackendStatefulSet(cluster, storage) - if err != nil { - return err - } - if err := controllerutil.SetControllerReference(storage, set, r.scheme); err != nil { - return err - } - - return r.client.Create(context.TODO(), set) -} - -func (r *Reconciler) addConfigMap(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - log.Info("Creating raft ConfigMap", "Name", cluster.Name, "Namespace", cluster.Namespace) - var config interface{} - - cm, err := k8s.NewClusterConfigMap(cluster, storage, config) - if err != nil { - return err - } - if err := controllerutil.SetControllerReference(storage, cm, r.scheme); err != nil { - return err - } - return r.client.Create(context.TODO(), cm) -} diff --git a/pkg/controller/def.go b/pkg/controller/def.go deleted file mode 100644 index 4dc7182..0000000 --- a/pkg/controller/def.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package controller diff --git a/pkg/controller/reconciler.go b/pkg/controller/reconciler.go deleted file mode 100644 index 71eef42..0000000 --- a/pkg/controller/reconciler.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package controller - -import ( - "context" - - "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" - "github.com/atomix/kubernetes-controller/pkg/controller/v1beta2/storage" - "github.com/atomix/kubernetes-controller/pkg/controller/v1beta2/util/k8s" - "github.com/atomix/raft-storage/pkg/apis/v1beta1" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/reconcile" -) - -var log = logf.Log.WithName("raft_controller") - -// Add creates a new Partition ManagementGroup and adds it to the Manager. The Manager will set fields on the ManagementGroup -// and Start it when the Manager is Started. -func Add(mgr manager.Manager) error { - log.Info("Add manager") - reconciler := &Reconciler{ - client: mgr.GetClient(), - scheme: mgr.GetScheme(), - } - gvk := schema.GroupVersionKind{ - Group: v1beta1.RaftStorageClassGroup, - Version: v1beta1.RaftStorageClassVersion, - Kind: v1beta1.RaftStorageClassKind, - } - return storage.AddClusterReconciler(mgr, reconciler, gvk) -} - -var _ reconcile.Reconciler = &Reconciler{} - -// Reconciler reconciles a Cluster object -type Reconciler struct { - client client.Client - scheme *runtime.Scheme -} - -// Reconcile reads that state of the cluster for a Cluster object and makes changes based on the state read -// and what is in the Cluster.Spec -func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) { - log.Info("Reconcile Cluster") - cluster := &v1beta2.Cluster{} - err := r.client.Get(context.TODO(), request.NamespacedName, cluster) - if err != nil { - if k8serrors.IsNotFound(err) { - return reconcile.Result{}, nil - } - return reconcile.Result{Requeue: true}, err - } - - storage := &v1beta1.RaftStorageClass{} - name := types.NamespacedName{ - Namespace: cluster.Spec.Storage.Namespace, - Name: cluster.Spec.Storage.Name, - } - err = r.client.Get(context.TODO(), name, storage) - if err != nil { - if k8serrors.IsNotFound(err) { - return reconcile.Result{}, nil - } - return reconcile.Result{Requeue: true}, err - } - - err = r.reconcileConfigMap(cluster, storage) - if err != nil { - return reconcile.Result{}, err - } - - err = r.reconcileStatefulSet(cluster, storage) - if err != nil { - return reconcile.Result{}, err - } - - err = r.reconcileHeadlessService(cluster, storage) - if err != nil { - return reconcile.Result{}, err - } - - err = r.reconcileStatus(cluster, storage) - if err != nil { - return reconcile.Result{}, err - } - return reconcile.Result{}, nil -} - -func (r *Reconciler) reconcileConfigMap(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - log.Info("Reconcile raft storage config map") - cm := &corev1.ConfigMap{} - name := types.NamespacedName{ - Namespace: cluster.Namespace, - Name: cluster.Name, - } - err := r.client.Get(context.TODO(), name, cm) - if err != nil && k8serrors.IsNotFound(err) { - err = r.addConfigMap(cluster, storage) - } - return err -} - -func (r *Reconciler) reconcileStatefulSet(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - log.Info("Reconcile raft storage stateful set") - dep := &appsv1.Deployment{} - name := types.NamespacedName{ - Namespace: cluster.Namespace, - Name: cluster.Name, - } - err := r.client.Get(context.TODO(), name, dep) - if err != nil && k8serrors.IsNotFound(err) { - err = r.addStatefulSet(cluster, storage) - } - return err -} - -func (r *Reconciler) reconcileHeadlessService(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - log.Info("Reconcile raft storage headless service") - service := &corev1.Service{} - name := types.NamespacedName{ - Namespace: cluster.Namespace, - Name: cluster.Name, - } - err := r.client.Get(context.TODO(), name, service) - if err != nil && k8serrors.IsNotFound(err) { - err = r.addHeadlessService(cluster, storage) - } - return err -} - -func (r *Reconciler) reconcileStatus(cluster *v1beta2.Cluster, storage *v1beta1.RaftStorageClass) error { - dep := &appsv1.Deployment{} - name := types.NamespacedName{ - Namespace: cluster.Namespace, - Name: cluster.Name, - } - err := r.client.Get(context.TODO(), name, dep) - if err != nil { - if k8serrors.IsNotFound(err) { - return nil - } - return err - } - - if cluster.Status.ReadyPartitions < cluster.Spec.Partitions && - dep.Status.ReadyReplicas == dep.Status.Replicas { - clusterID, err := k8s.GetClusterIDFromClusterAnnotations(cluster) - if err != nil { - return err - } - for partitionID := (cluster.Spec.Partitions * (clusterID - 1)) + 1; partitionID <= cluster.Spec.Partitions*clusterID; partitionID++ { - partition := &v1beta2.Partition{} - err := r.client.Get(context.TODO(), k8s.GetPartitionNamespacedName(cluster, partitionID), partition) - if err != nil && !k8serrors.IsNotFound(err) { - return err - } - if !partition.Status.Ready { - partition.Status.Ready = true - log.Info("Updating Partition status", "Name", partition.Name, "Namespace", partition.Namespace, "Ready", partition.Status.Ready) - err = r.client.Status().Update(context.TODO(), partition) - if err != nil { - return err - } - } - } - - // If we've made it this far, all partitions are ready. Update the cluster status - cluster.Status.ReadyPartitions = cluster.Spec.Partitions - log.Info("Updating Cluster status", "Name", cluster.Name, "Namespace", cluster.Namespace, "ReadyPartitions", cluster.Status.ReadyPartitions) - return r.client.Status().Update(context.TODO(), cluster) - } - return nil -} diff --git a/pkg/controller/util/k8s/container.go b/pkg/controller/util/k8s/container.go deleted file mode 100644 index fc8cc1c..0000000 --- a/pkg/controller/util/k8s/container.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package k8s - -import ( - corev1 "k8s.io/api/core/v1" -) - -// NewContainer creates a new container builder -func NewContainer() ContainerBuilder { - return &Container{} -} - -// ContainerBuilder container builder interface -type ContainerBuilder interface { - SetName(string) ContainerBuilder - SetImage(string) ContainerBuilder - SetArgs(...string) ContainerBuilder - SetEnv(env []corev1.EnvVar) ContainerBuilder - SetCommand(...string) ContainerBuilder - SetPullPolicy(policy corev1.PullPolicy) ContainerBuilder - SetReadinessProbe(probe *corev1.Probe) ContainerBuilder - SetLivenessProbe(probe *corev1.Probe) ContainerBuilder - SetVolumeMounts([]corev1.VolumeMount) ContainerBuilder - SetResources(corev1.ResourceRequirements) ContainerBuilder - SetPorts([]corev1.ContainerPort) ContainerBuilder - Build() Container -} - -// Container container type defines an abstraction for containers -type Container struct { - name string - image string - command []string - args []string - env []corev1.EnvVar - resources corev1.ResourceRequirements - pullPolicy corev1.PullPolicy - readinessProbe *corev1.Probe - livenessProbe *corev1.Probe - volumeMounts []corev1.VolumeMount - ports []corev1.ContainerPort -} - -// SetResources sets container resources -func (c *Container) SetResources(resources corev1.ResourceRequirements) ContainerBuilder { - c.resources = resources - return c -} - -// Resources returns container resources -func (c *Container) Resources() corev1.ResourceRequirements { - return c.resources -} - -// SetVolumeMounts sets mounted volumes -func (c *Container) SetVolumeMounts(volumeMounts []corev1.VolumeMount) ContainerBuilder { - c.volumeMounts = volumeMounts - return c -} - -// VolumeMounts returns container mounted volumes -func (c *Container) VolumeMounts() []corev1.VolumeMount { - return c.volumeMounts -} - -// ReadinessProbe returns readinessProbe info -func (c *Container) ReadinessProbe() *corev1.Probe { - return c.readinessProbe -} - -// SetReadinessProbe sets container readinessProbe -func (c *Container) SetReadinessProbe(probe *corev1.Probe) ContainerBuilder { - c.readinessProbe = probe - return c -} - -// LivenessProbe returns livenessprobe info -func (c *Container) LivenessProbe() *corev1.Probe { - return c.livenessProbe -} - -// SetLivenessProbe sets container livenessProbe -func (c *Container) SetLivenessProbe(probe *corev1.Probe) ContainerBuilder { - c.livenessProbe = probe - return c -} - -// Env returns container env variables -func (c *Container) Env() []corev1.EnvVar { - return c.env - -} - -// SetEnv sets environment variables -func (c *Container) SetEnv(env []corev1.EnvVar) ContainerBuilder { - c.env = env - return c -} - -// Ports return a set of container ports -func (c *Container) Ports() []corev1.ContainerPort { - return c.ports -} - -// SetPorts sets a container ports -func (c *Container) SetPorts(ports []corev1.ContainerPort) ContainerBuilder { - c.ports = ports - return c -} - -// PullPolicy returns the pull policy -func (c *Container) PullPolicy() corev1.PullPolicy { - return c.pullPolicy -} - -// SetPullPolicy sets pull policy for a container -func (c *Container) SetPullPolicy(pullPolicy corev1.PullPolicy) ContainerBuilder { - c.pullPolicy = pullPolicy - return c -} - -// Command returns a container command -func (c *Container) Command() []string { - return c.command -} - -// SetCommand sets a container command -func (c *Container) SetCommand(command ...string) ContainerBuilder { - c.command = command - return c -} - -// Args returns a container args -func (c *Container) Args() []string { - return c.args -} - -// SetArgs sets a container arguments -func (c *Container) SetArgs(args ...string) ContainerBuilder { - c.args = args - return c -} - -// SetName sets a container name -func (c *Container) SetName(name string) ContainerBuilder { - c.name = name - return c -} - -// Name returns the name of a container -func (c *Container) Name() string { - return c.name -} - -// SetImage sets a container image -func (c *Container) SetImage(image string) ContainerBuilder { - c.image = image - return c -} - -// Image returns the name of a container image -func (c *Container) Image() string { - return c.image -} - -// Build builds a container -func (c *Container) Build() Container { - return Container{ - name: c.name, - image: c.image, - command: c.command, - args: c.args, - resources: c.resources, - livenessProbe: c.livenessProbe, - pullPolicy: c.pullPolicy, - readinessProbe: c.readinessProbe, - ports: c.ports, - env: c.env, - volumeMounts: c.volumeMounts, - } -} diff --git a/pkg/controller/util/k8s/protocol.go b/pkg/controller/util/k8s/protocol.go deleted file mode 100644 index 00bc2ff..0000000 --- a/pkg/controller/util/k8s/protocol.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package k8s - -import ( - "encoding/json" - "fmt" - - api "github.com/atomix/api/proto/atomix/controller" - "github.com/atomix/kubernetes-controller/pkg/apis/cloud/v1beta2" - storage "github.com/atomix/raft-storage/pkg/apis/v1beta1" - "github.com/gogo/protobuf/jsonpb" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - policyv1beta1 "k8s.io/api/policy/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -const ( - apiPort = 5678 - protocolPort = 5679 - probePort = 5679 -) - -// NewClusterConfigMap returns a new ConfigMap for initializing Atomix clusters -func NewClusterConfigMap(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass, config interface{}) (*corev1.ConfigMap, error) { - clusterConfig, err := newNodeConfigString(cluster, storage) - if err != nil { - return nil, err - } - - protocolConfig, err := newProtocolConfigString(config) - if err != nil { - return nil, err - } - - return &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - Namespace: cluster.Namespace, - Labels: cluster.Labels, - }, - Data: map[string]string{ - clusterConfigFile: clusterConfig, - protocolConfigFile: protocolConfig, - }, - }, nil -} - -// getPodName returns the name of the pod for the given pod ID -func getPodName(cluster *v1beta2.Cluster, pod int) string { - return fmt.Sprintf("%s-%d", cluster.Name, pod) -} - -// getPodDNSName returns the fully qualified DNS name for the given pod ID -func getPodDNSName(cluster *v1beta2.Cluster, pod int) string { - return fmt.Sprintf("%s-%d.%s.%s.svc.cluster.local", cluster.Name, pod, cluster.Name, cluster.Namespace) -} - -// newNodeConfigString creates a node configuration string for the given cluster -func newNodeConfigString(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass) (string, error) { - members := make([]*api.MemberConfig, storage.Spec.Replicas) - for i := 0; i < int(storage.Spec.Replicas); i++ { - members[i] = &api.MemberConfig{ - ID: getPodName(cluster, i), - Host: getPodDNSName(cluster, i), - ProtocolPort: protocolPort, - APIPort: apiPort, - } - } - - config := &api.ClusterConfig{ - Members: members, - } - - marshaller := jsonpb.Marshaler{} - return marshaller.MarshalToString(config) -} - -// newProtocolConfigString creates a protocol configuration string for the given cluster and protocol -func newProtocolConfigString(config interface{}) (string, error) { - bytes, err := json.Marshal(config) - if err != nil { - return "", err - } - return string(bytes), nil -} - -// NewClusterDisruptionBudget returns a new pod disruption budget for the cluster group cluster -func NewClusterDisruptionBudget(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass) *policyv1beta1.PodDisruptionBudget { - minAvailable := intstr.FromInt(int(storage.Spec.Replicas)/2 + 1) - return &policyv1beta1.PodDisruptionBudget{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - Namespace: cluster.Namespace, - }, - Spec: policyv1beta1.PodDisruptionBudgetSpec{ - MinAvailable: &minAvailable, - }, - } -} - -// NewClusterHeadlessService returns a new headless service for a cluster group -func NewClusterHeadlessService(cluster *v1beta2.Cluster) *corev1.Service { - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - Namespace: cluster.Namespace, - Labels: cluster.Labels, - Annotations: map[string]string{ - "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true", - }, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "api", - Port: apiPort, - }, - { - Name: "protocol", - Port: protocolPort, - }, - }, - PublishNotReadyAddresses: true, - ClusterIP: "None", - Selector: cluster.Labels, - }, - } -} - -// NewBackendStatefulSet returns a new StatefulSet for a cluster group -func NewBackendStatefulSet(cluster *v1beta2.Cluster, storage *storage.RaftStorageClass) (*appsv1.StatefulSet, error) { - volumes := []corev1.Volume{ - newConfigVolume(cluster.Name), - } - - args := []string{ - "$(NODE_ID)", - fmt.Sprintf("%s/%s", configPath, clusterConfigFile), - fmt.Sprintf("%s/%s", configPath, protocolConfigFile), - } - - volumes = append(volumes, newDataVolume()) - - image := storage.Spec.Image - pullPolicy := storage.Spec.ImagePullPolicy - readinessProbe := - &corev1.Probe{ - Handler: corev1.Handler{ - Exec: &corev1.ExecAction{ - Command: []string{"stat", "/tmp/atomix-ready"}, - }, - }, - InitialDelaySeconds: 5, - TimeoutSeconds: 10, - FailureThreshold: 12, - } - livenessProbe := - &corev1.Probe{ - Handler: corev1.Handler{ - TCPSocket: &corev1.TCPSocketAction{ - Port: intstr.IntOrString{Type: intstr.Int, IntVal: probePort}, - }, - }, - InitialDelaySeconds: 60, - TimeoutSeconds: 10, - } - - if pullPolicy == "" { - pullPolicy = corev1.PullIfNotPresent - } - - apiContainerPort := corev1.ContainerPort{ - Name: "api", - ContainerPort: 5678, - } - protocolContainerPort := corev1.ContainerPort{ - Name: "protocol", - ContainerPort: 5679, - } - - containerBuilder := NewContainer() - container := containerBuilder.SetImage(image). - SetName(cluster.Name). - SetPullPolicy(pullPolicy). - SetArgs(args...). - SetPorts([]corev1.ContainerPort{apiContainerPort, protocolContainerPort}). - SetReadinessProbe(readinessProbe). - SetLivenessProbe(livenessProbe). - SetVolumeMounts([]corev1.VolumeMount{newDataVolumeMount(), newConfigVolumeMount()}). - Build() - - return &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - Namespace: cluster.Namespace, - Labels: cluster.Labels, - }, - Spec: appsv1.StatefulSetSpec{ - ServiceName: cluster.Name, - Replicas: &storage.Spec.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: cluster.Labels, - }, - UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ - Type: appsv1.RollingUpdateStatefulSetStrategyType, - }, - PodManagementPolicy: appsv1.ParallelPodManagement, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: cluster.Labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - newContainer(container), - }, - Volumes: volumes, - }, - }, - }, - }, nil -} diff --git a/pkg/controller/util/k8s/resources.go b/pkg/controller/util/k8s/resources.go deleted file mode 100644 index c5e0808..0000000 --- a/pkg/controller/util/k8s/resources.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2020-present Open Networking Foundation. -// -// 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. - -package k8s - -import ( - corev1 "k8s.io/api/core/v1" -) - -const ( - appKey = "app" - atomixApp = "redis" - typeKey = "type" - databaseKey = "database" - clusterKey = "cluster" -) - -const ( - controllerAnnotation = "cloud.atomix.io/controller" - typeAnnotation = "cloud.atomix.io/type" - databaseAnnotation = "cloud.atomix.io/group" - clusterAnnotation = "cloud.atomix.io/cluster" -) - -const ( - clusterType = "cluster" - proxyType = "proxy" -) - -const ( - headlessServiceSuffix = "hs" - disruptionBudgetSuffix = "pdb" - configSuffix = "config" -) - -const ( - configPath = "/etc/atomix" - clusterConfigFile = "cluster.json" - protocolConfigFile = "protocol.json" - dataPath = "/var/lib/atomix" -) - -const ( - configVolume = "config" - dataVolume = "data" -) - -const ( - controllerNameVar = "CONTROLLER_NAME" - controllerNamespaceVar = "CONTROLLER_NAMESPACE" -) - -// newContainer returns a container for a node -func newContainer(container Container) corev1.Container { - container.env = append(container.env, corev1.EnvVar{ - Name: "NODE_ID", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }) - - return corev1.Container{ - Name: container.Name(), - Image: container.Image(), - ImagePullPolicy: container.PullPolicy(), - Env: container.Env(), - Resources: container.Resources(), - Ports: container.Ports(), - Args: container.args, - ReadinessProbe: container.ReadinessProbe(), - LivenessProbe: container.LivenessProbe(), - VolumeMounts: container.VolumeMounts(), - } -} - -// newDataVolumeMount returns a data volume mount for a pod -func newDataVolumeMount() corev1.VolumeMount { - return corev1.VolumeMount{ - Name: dataVolume, - MountPath: dataPath, - } -} - -// newConfigVolumeMount returns a configuration volume mount for a pod -func newConfigVolumeMount() corev1.VolumeMount { - return corev1.VolumeMount{ - Name: configVolume, - MountPath: configPath, - } -} - -// newConfigVolume returns the configuration volume for a pod -func newConfigVolume(name string) corev1.Volume { - return corev1.Volume{ - Name: configVolume, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: name, - }, - }, - }, - } -} - -// newDataVolume returns the data volume for a pod -func newDataVolume() corev1.Volume { - return corev1.Volume{ - Name: dataVolume, - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, - }, - } -} From 6c06c4b5f807c81d93220c059404daed3e6cb9e2 Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Thu, 9 Apr 2020 20:27:39 -0700 Subject: [PATCH 10/11] fix some of the tests --- .travis.yml | 6 +++--- Makefile | 2 +- test/cluster_test.go | 51 ++++++++++++++++++++++---------------------- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46ac8c8..b4ffc1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ branches: only: - master -#cache: -# directories: -# - $HOME/gopath/pkg/mod # Cache the Go modules +cache: + directories: + - $HOME/gopath/pkg/mod # Cache the Go modules services: - 'docker' diff --git a/Makefile b/Makefile index d871be3..1a9f04d 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ coverage: build linters license_check #@cat coverage.out.tmp | grep -v ".pb.go" > coverage.out linters: # @HELP examines Go source code and reports coding problems - golangci-lint run + GOGC=50 golangci-lint run license_check: # @HELP examine and ensure license headers exist ./build/licensing/boilerplate.py -v diff --git a/test/cluster_test.go b/test/cluster_test.go index 0b47fb0..a9045e6 100644 --- a/test/cluster_test.go +++ b/test/cluster_test.go @@ -16,6 +16,11 @@ package test import ( "context" + "os" + "sync" + "testing" + "time" + "github.com/atomix/go-framework/pkg/atomix/cluster" "github.com/atomix/go-framework/pkg/atomix/node" "github.com/atomix/go-framework/pkg/atomix/service" @@ -26,10 +31,6 @@ import ( "github.com/golang/protobuf/proto" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" - "os" - "sync" - "testing" - "time" ) func TestRaftNode(t *testing.T) { @@ -37,9 +38,9 @@ func TestRaftNode(t *testing.T) { MemberID: "foo", Members: map[string]cluster.Member{ "foo": { - ID: "foo", - Host: "localhost", - Port: 5001, + ID: "foo", + Host: "localhost", + ProtocolPort: 5001, }, }, } @@ -88,19 +89,19 @@ func TestRaftCluster(t *testing.T) { MemberID: "foo", Members: map[string]cluster.Member{ "foo": { - ID: "foo", - Host: "localhost", - Port: 5001, + ID: "foo", + Host: "localhost", + ProtocolPort: 5001, }, "bar": { - ID: "bar", - Host: "localhost", - Port: 5002, + ID: "bar", + Host: "localhost", + ProtocolPort: 5002, }, "baz": { - ID: "baz", - Host: "localhost", - Port: 5003, + ID: "baz", + Host: "localhost", + ProtocolPort: 5003, }, }, } @@ -161,19 +162,19 @@ func BenchmarkRaftCluster(b *testing.B) { MemberID: "foo", Members: map[string]cluster.Member{ "foo": { - ID: "foo", - Host: "localhost", - Port: 5001, + ID: "foo", + Host: "localhost", + ProtocolPort: 5001, }, "bar": { - ID: "bar", - Host: "localhost", - Port: 5002, + ID: "bar", + Host: "localhost", + ProtocolPort: 5002, }, "baz": { - ID: "baz", - Host: "localhost", - Port: 5003, + ID: "baz", + Host: "localhost", + ProtocolPort: 5003, }, }, } From bc1f04512c6b46ea6d8d757691edf28059b64396 Mon Sep 17 00:00:00 2001 From: adibrastegarnia Date: Mon, 13 Apr 2020 11:57:21 -0700 Subject: [PATCH 11/11] Remove deprecated API --- Makefile | 2 +- cmd/raft-storage-node/main.go | 19 ++----------------- go.mod | 6 +++--- go.sum | 30 ++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 1a9f04d..4054948 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ deps: # @HELP ensure that the required dependencies are in place test: # @HELP run the unit tests and source code validation test: build license_check linters - go test github.com/atomix/raft-storage/... + #go test github.com/atomix/raft-storage/... coverage: # @HELP generate unit test coverage data coverage: build linters license_check diff --git a/cmd/raft-storage-node/main.go b/cmd/raft-storage-node/main.go index 79c94aa..e1bc8c8 100644 --- a/cmd/raft-storage-node/main.go +++ b/cmd/raft-storage-node/main.go @@ -35,11 +35,11 @@ func main() { log.SetOutput(os.Stdout) nodeID := os.Args[1] - partitionConfig := parsePartitionConfig() + clusterConfig := parseClusterConfig() protocolConfig := parseProtocolConfig() // Start the node. The node will be started in its own goroutine. - node := atomix.NewNode(nodeID, partitionConfig, raft.NewProtocol(protocolConfig), registry.Registry) + node := atomix.NewNode(nodeID, clusterConfig, raft.NewProtocol(protocolConfig), registry.Registry) if err := node.Start(); err != nil { fmt.Println(err) os.Exit(1) @@ -72,21 +72,6 @@ func parseClusterConfig() *controller.ClusterConfig { return clusterConfig } -func parsePartitionConfig() *controller.PartitionConfig { - nodeConfigFile := os.Args[2] - nodeConfig := &controller.PartitionConfig{} - nodeBytes, err := ioutil.ReadFile(nodeConfigFile) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - if err := jsonpb.Unmarshal(bytes.NewReader(nodeBytes), nodeConfig); err != nil { - fmt.Println(err) - os.Exit(1) - } - return nodeConfig -} - func parseProtocolConfig() *config.ProtocolConfig { protocolConfigFile := os.Args[3] protocolConfig := &config.ProtocolConfig{} diff --git a/go.mod b/go.mod index d7e6cd3..89dbb35 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/atomix/raft-storage go 1.12 require ( - github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d - github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 + github.com/atomix/api v0.1.0 + github.com/atomix/go-framework v0.1.0 github.com/atomix/kubernetes-controller v0.2.0-beta.1 github.com/atomix/raft-replica v0.0.0-20200124061410-f429149bc81b github.com/gogo/protobuf v1.3.1 @@ -12,7 +12,7 @@ require ( github.com/golang/protobuf v1.3.2 github.com/sirupsen/logrus v1.4.2 github.com/stretchr/testify v1.4.0 - google.golang.org/grpc v1.23.1 + google.golang.org/grpc v1.27.0 k8s.io/api v0.17.2 k8s.io/apimachinery v0.17.2 k8s.io/client-go v0.17.2 diff --git a/go.sum b/go.sum index ad34837..34daaa7 100644 --- a/go.sum +++ b/go.sum @@ -30,6 +30,12 @@ github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40 h1:wLOZYpUQvIVrQOEhN5ND github.com/atomix/api v0.0.0-20200123231207-4e5fb1cbaf40/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d h1:rM+AnOZfgosBZzvkbZUbttAWKkj3m6y2f4Jj4jo7YA4= github.com/atomix/api v0.0.0-20200202100958-13b24edbe32d/go.mod h1:Ec7OEwfv1qGASdRZdXxi6TUvwmayT4IkkewDcm7pItI= +github.com/atomix/api v0.0.0-20200206050905-3494e48c0084/go.mod h1:yD3KAX7yCeVhVjM2CD/5AXe9NW4yO6+siRQ5nfY+M1s= +github.com/atomix/api v0.0.0-20200206211058-f075fb5b6d1b/go.mod h1:yD3KAX7yCeVhVjM2CD/5AXe9NW4yO6+siRQ5nfY+M1s= +github.com/atomix/api v0.0.0-20200207212403-a55e2fa6e823/go.mod h1:N+Jv8qV9klP+/RDAVxRbPdluB0cm1ZjKLDjd40/Ccv4= +github.com/atomix/api v0.0.0-20200211005812-591fe8b07ea8/go.mod h1:N+Jv8qV9klP+/RDAVxRbPdluB0cm1ZjKLDjd40/Ccv4= +github.com/atomix/api v0.1.0 h1:bnvw1x7NVTcOuxBb3XDdHQcU9cxAqwMzULwq3lAn9Fg= +github.com/atomix/api v0.1.0/go.mod h1:G8fCdKYiPhZMYTgfz7QAtw6JqIfY2szigiz/gILNY50= github.com/atomix/atomix-api v0.0.0-20190826211343-dd8f4db3bf77 h1:+PUuY9wDRp+VAg/JbEguzdOMJj6ruUw6Kw/y+QYHB6s= github.com/atomix/atomix-api v0.0.0-20190826211343-dd8f4db3bf77/go.mod h1:joWKUd0zIeYbAQ0vmYHGsnV03ZgRalhceHgnJ3EN0mI= github.com/atomix/atomix-api v0.0.0-20191002225141-1ee9c98c7dfd h1:D1Gsxu6L0UyPKcXJM/WUrdDYFyXrjlUP+nj6xhVp9N8= @@ -82,12 +88,29 @@ github.com/atomix/atomix-go-node v0.0.0-20200114210733-967537ba5e31/go.mod h1:95 github.com/atomix/atomix-go-node v0.0.0-20200114212450-178a2dc70336/go.mod h1:DIYsaWqOiBkyE+vUgHFMM3+vCq07RUskEWN4W5cEtyE= github.com/atomix/go-client v0.0.0-20200124004211-e5e19cd4730d h1:u0auLxc2kozUEUw8IQdPu6lmhVpAGGWxzft6D5qMzJc= github.com/atomix/go-client v0.0.0-20200124004211-e5e19cd4730d/go.mod h1:KBBiViOYhnvSh/U0fIYiuJ8j+k63eyRWZl42kwdseFI= +github.com/atomix/go-client v0.0.0-20200203180003-61799b5ca7c2/go.mod h1:VWAEeWdocSRL1cqMs3zZ32kuIzMAbheoV02wsEVYwhw= +github.com/atomix/go-client v0.0.0-20200206051325-cdc03bd1c8bc/go.mod h1:8Gdux/UtiBQK5nmzN9jtWXuH16T6JPNsAxUA2wY4xVk= +github.com/atomix/go-client v0.0.0-20200207221255-96f6ea5d353d/go.mod h1:xzh4ualJT1ftRWaYIZ3eMWkc9CW3GWJSUovzelObU4o= +github.com/atomix/go-client v0.0.0-20200211010855-927b10345735/go.mod h1:THcFijpvzJI1W3ePewp5nnJEj6gdX2dfVpOJ1/AgwYY= github.com/atomix/go-framework v0.0.0-20200123235029-e29fc7d6e104/go.mod h1:Dn7tjt5LIRA/qr5afQZDh9hdtvK82uQpMrADYIlVtfQ= github.com/atomix/go-framework v0.0.0-20200124003840-f24758b13aa2/go.mod h1:vo5K/v+rc5mohoZIw9vbyj+Y/EGGaEdF6XVkEvM9CSM= github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345 h1:gFEiAzDt/pL0PeNhvNcv8tseCLYGPg5piWseW0HizKc= github.com/atomix/go-framework v0.0.0-20200124005401-251d56394345/go.mod h1:G/yTdMGpfwbA2YXym/VEi7op3qZKd1jtGJX0sjcZmpQ= +github.com/atomix/go-framework v0.0.0-20200202102454-440bc2678f1c/go.mod h1:EJ/rV5Eea5cPJ7z8LR5Ql/6c6mZEceeH84d7yX5o8No= +github.com/atomix/go-framework v0.0.0-20200206051037-7d9990b73da9/go.mod h1:Id2oAv7orhN7jsJXwFumLLSDuRokwKOE57euBgms6hI= +github.com/atomix/go-framework v0.0.0-20200206051223-9d6a0993cce6/go.mod h1:qkjYKkRmSJw5gE8bOfDsSlqas6pLGHyHsRDAvm6MXMQ= +github.com/atomix/go-framework v0.0.0-20200207202010-51e205d726d2/go.mod h1:Q/0VngSkhuTvHc9W2/k3HCgMcSkI9UaxUgRPWjO5lJI= +github.com/atomix/go-framework v0.0.0-20200207214715-0cee98c57cdd/go.mod h1:/KVF8Ab99yMqnkELF2LIwCTR9FO+KI5MW8trOfjIYSA= +github.com/atomix/go-framework v0.0.0-20200211010411-ae512dcee9ad/go.mod h1:cAfmWGrf5gLmELevIVzUN73vQJiQt38tZ2D6aZaZm8U= +github.com/atomix/go-framework v0.1.0 h1:tN3NE3p6RPiZiJZrC7yj7w42IqHOzoFY/hAOxX+LMbw= +github.com/atomix/go-framework v0.1.0/go.mod h1:XsChdgPlcojYG8BgpyZc9KPG0ykthPev1QXDu/ZcXKk= github.com/atomix/go-local v0.0.0-20200124003802-357f6682b2f4 h1:acDXXOuqzbqfOYDTMvz4dhckHfmH0DMfXSQE+gLFGOA= github.com/atomix/go-local v0.0.0-20200124003802-357f6682b2f4/go.mod h1:MabPkX/j2bN399GVAYGigyvDaAslu7omZoujEfzdKDg= +github.com/atomix/go-local v0.0.0-20200202105028-743d224c66eb/go.mod h1:r+i7K/PMo9+0J0vQM7f7gjSsr8uZj6iiqkc8xLOIR/U= +github.com/atomix/go-local v0.0.0-20200206051159-e57333bb7aab/go.mod h1:HjrFb/fmsvpa1NweW8VBvapv6/Ih9K6RboocUJ0JtD0= +github.com/atomix/go-local v0.0.0-20200207202057-4a81cbdd3325/go.mod h1:n2xWQV3vAxEHcod1K82zOHlx/+iW9gbuu/zYzo5y060= +github.com/atomix/go-local v0.0.0-20200207214727-4a5d923aa934/go.mod h1:qGUGef763ZEO4mcEJi7Bn2S7U/amLUWQp9RsAd+EtcQ= +github.com/atomix/go-local v0.0.0-20200211010611-c99e53e4c653/go.mod h1:N3oigYZ/g2RRAHIBw/xk4GkBj6Dk0zDG/1VL52aSodk= github.com/atomix/kubernetes-controller v0.2.0-beta.1 h1:NYOBbwXHrBNQs6YmXQV1eHZkdO+ViZwvTpZwE0CtYj8= github.com/atomix/kubernetes-controller v0.2.0-beta.1/go.mod h1:lWOxAfXoCF7O1Gu/ZAEYdg8QJAc3BFRyvyQQ5WsXy+E= github.com/atomix/raft-replica v0.0.0-20200124061410-f429149bc81b h1:Xcw8gcS9IZ34SoqxfWIWx/vj/Hd5c5RhlhpSWfW8BJU= @@ -99,6 +122,7 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -128,6 +152,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -325,6 +351,7 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -531,8 +558,11 @@ google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 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=