From 251f73aebf502445035db3b931daa96d1f5bcfb7 Mon Sep 17 00:00:00 2001 From: Richard Case Date: Tue, 24 Aug 2021 17:25:57 +0100 Subject: [PATCH] feat: implement control loop framework The adds the control loop that is used to kick off microvm reconciliation. The actual reconciliation is empty and will be implemented in later changes. This change also introduces a value object `VMID` that i sused to represent the identity of a microvm. Signed-off-by: Richard Case --- Makefile | 4 +- cmd/dev-helper/main.go | 90 +++++++- core/application/app.go | 2 +- core/application/app_test.go | 22 +- core/application/commands.go | 45 ++-- core/application/errors.go | 4 +- core/application/query.go | 4 +- core/application/reconcile.go | 7 + core/errors.go | 13 -- core/errors/errors.go | 32 +++ core/models/microvm.go | 4 +- core/models/vmid.go | 101 +++++++++ core/models/vmid_test.go | 147 +++++++++++++ core/ports/services.go | 2 + core/ports/usecases.go | 2 +- go.mod | 35 ++- go.sum | 155 +++----------- infrastructure/containerd/content.go | 6 +- infrastructure/containerd/event_service.go | 17 +- .../containerd/event_service_test.go | 1 + infrastructure/containerd/repo.go | 18 +- infrastructure/containerd/repo_test.go | 10 +- .../controllers/microvm_controller.go | 155 ++++++++++++++ .../controllers/microvm_controller_test.go | 202 ++++++++++++++++++ infrastructure/firecracker/config.go | 2 +- infrastructure/grpc/convert.go | 17 +- infrastructure/grpc/server.go | 14 +- infrastructure/mock/gen.go | 2 +- infrastructure/mock/mock.go | 54 ++++- internal/command/run/run.go | 34 ++- pkg/defaults/defaults.go | 5 +- pkg/queue/queue.go | 87 ++++++++ pkg/queue/queue_test.go | 113 ++++++++++ 33 files changed, 1155 insertions(+), 251 deletions(-) create mode 100644 core/application/reconcile.go delete mode 100644 core/errors.go create mode 100644 core/errors/errors.go create mode 100644 core/models/vmid.go create mode 100644 core/models/vmid_test.go create mode 100644 infrastructure/controllers/microvm_controller.go create mode 100644 infrastructure/controllers/microvm_controller_test.go create mode 100644 pkg/queue/queue.go create mode 100644 pkg/queue/queue_test.go diff --git a/Makefile b/Makefile index 0b71e712..af823d90 100644 --- a/Makefile +++ b/Makefile @@ -77,13 +77,13 @@ lint: $(GOLANGCI_LINT) $(BUF) ## Lint .PHONY: test test: ## Run unit tests - go test -v ./... + go test -v -race ./... .PHONY: test-int test-int: $(OUT_DIR) ## Run tests (including intengration tests) CTR_ROOT_DIR=$(OUT_DIR)/containerd mkdir -p $(CTR_ROOT_DIR) - sudo go test -v -count=1 ./... + sudo go test -v -race -count=1 ./... sudo rm -rf $(CTR_ROOT_DIR) .PHONY: test-e2e diff --git a/cmd/dev-helper/main.go b/cmd/dev-helper/main.go index d0c9488a..d648ee88 100644 --- a/cmd/dev-helper/main.go +++ b/cmd/dev-helper/main.go @@ -5,7 +5,9 @@ import ( "context" "fmt" "log" + "time" + "github.com/containerd/containerd/namespaces" "github.com/sirupsen/logrus" _ "github.com/containerd/containerd/api/events" @@ -16,6 +18,8 @@ import ( "github.com/weaveworks/reignite/core/models" "github.com/weaveworks/reignite/core/ports" "github.com/weaveworks/reignite/infrastructure/containerd" + "github.com/weaveworks/reignite/infrastructure/controllers" + "github.com/weaveworks/reignite/pkg/defaults" rlog "github.com/weaveworks/reignite/pkg/log" ) @@ -34,7 +38,7 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) rlog.Configure(&rlog.Config{ - Verbosity: 0, + Verbosity: 10, Format: "text", Output: "stderr", }) @@ -46,13 +50,18 @@ func main() { logger.Info("starting containerd event listener") go eventListener(ctx, socketPath, logger) - logger.Infof("Press [enter] to write vmspec to using containerd repo") - fmt.Scanln() - repoTest(ctx, socketPath, logger) + logger.Infof("Press [enter] to run controller test") + //fmt.Scanln() + go controllerTest(ctx, socketPath, logger) + go publishPeriodicEvents(ctx, socketPath, logger) - logger.Infof("Press [enter] to get image %s", imageName) - fmt.Scanln() - imageServiceTest(ctx, socketPath, logger) + //logger.Infof("Press [enter] to write vmspec to using containerd repo") + //fmt.Scanln() + //repoTest(ctx, socketPath, logger) + + //logger.Infof("Press [enter] to get image %s", imageName) + //fmt.Scanln() + //imageServiceTest(ctx, socketPath, logger) logger.Info("Press [enter] to exit") fmt.Scanln() @@ -104,7 +113,7 @@ func repoTest(ctx context.Context, socketPath string, logger *logrus.Entry) { repo := containerd.NewMicroVMRepoWithClient(client) vmSpec := getTestSpec() - logger.Infof("saving microvm spec %s/%s", vmSpec.Namespace, vmSpec.ID) + logger.Infof("saving microvm spec %s", vmSpec.ID) _, err = repo.Save(ctx, vmSpec) if err != nil { @@ -141,6 +150,57 @@ func imageServiceTest(ctx context.Context, socketPath string, logger *logrus.Ent logger.Infof("mounted image %s to %s (type %s)", imageName, mountPoint[0].Source, mountPoint[0].Type) } +func publishPeriodicEvents(ctx context.Context, socketPath string, logger *logrus.Entry) { + client, err := ctr.New(socketPath) + if err != nil { + log.Fatal(err) + } + + namespaceCtx := namespaces.WithNamespace(ctx, defaults.ContainerdNamespace) + + tickCh := time.Tick(10 * time.Second) + + for { + select { + case <-ctx.Done(): + logger.Info("Cancelled, exiting publisher") + return + case <-tickCh: + logger.Info("publishing event") + createEvt := &events.MicroVMSpecCreated{ + ID: "vm1", + Namespace: "testns", + } + + err = client.EventService().Publish(namespaceCtx, defaults.TopicMicroVMEvents, createEvt) + if err != nil { + logger.Error(err) + } + + } + } +} + +func controllerTest(ctx context.Context, socketPath string, logger *logrus.Entry) { + em, err := containerd.NewEventService(&containerd.Config{ + SocketPath: socketPath, + }) + if err != nil { + log.Fatal(err) + } + + app := &testApp{ + logger: logger, + } + + controller := controllers.New(em, app) + + logger.Info("running controller") + controller.Run(ctx, 1) + logger.Info("controller not running") + +} + func eventListener(ctx context.Context, socketPath string, logger *logrus.Entry) { cfg := &containerd.Config{ SocketPath: socketPath, @@ -167,9 +227,9 @@ func eventListener(ctx context.Context, socketPath string, logger *logrus.Entry) } func getTestSpec() *models.MicroVM { + vmid, _ := models.NewVMID(vmName, vmNamespace) return &models.MicroVM{ - ID: vmName, - Namespace: vmNamespace, + ID: vmid, Spec: models.MicroVMSpec{ MemoryInMb: 2048, VCPU: 4, @@ -207,3 +267,13 @@ func getTestSpec() *models.MicroVM { }, } } + +type testApp struct { + logger *logrus.Entry +} + +func (t *testApp) ReconcileMicroVMs(ctx context.Context, id, namespace string) error { + t.logger.Infof("received request to reconcole %s/%s", id, namespace) + + return nil +} diff --git a/core/application/app.go b/core/application/app.go index 15d4c5af..74a41f42 100644 --- a/core/application/app.go +++ b/core/application/app.go @@ -7,7 +7,7 @@ import "github.com/weaveworks/reignite/core/ports" type App interface { ports.MicroVMCommandUseCases ports.MicroVMQueryUseCases - // ports.ReconcileMicroVMsUseCase + ports.ReconcileMicroVMsUseCase } func New(repo ports.MicroVMRepository, eventSvc ports.EventService, idSvc ports.IDService, mvmProvider ports.MicroVMProvider) App { diff --git a/core/application/app_test.go b/core/application/app_test.go index 737fa711..583a6947 100644 --- a/core/application/app_test.go +++ b/core/application/app_test.go @@ -37,7 +37,7 @@ func TestApp_CreateMicroVM(t *testing.T) { rm.Get( gomock.AssignableToTypeOf(context.Background()), gomock.Eq("id1234"), - gomock.Eq(defaults.ContainerdNamespace), + gomock.Eq(defaults.MicroVMNamespace), ).Return( nil, nil, @@ -45,9 +45,9 @@ func TestApp_CreateMicroVM(t *testing.T) { rm.Save( gomock.AssignableToTypeOf(context.Background()), - gomock.Eq(createTestSpec("id1234", defaults.ContainerdNamespace)), + gomock.Eq(createTestSpec("id1234", defaults.MicroVMNamespace)), ).Return( - createTestSpec("id1234", defaults.ContainerdNamespace), + createTestSpec("id1234", defaults.MicroVMNamespace), nil, ) @@ -56,7 +56,7 @@ func TestApp_CreateMicroVM(t *testing.T) { gomock.Eq(defaults.TopicMicroVMEvents), gomock.Eq(&events.MicroVMSpecCreated{ ID: "id1234", - Namespace: defaults.ContainerdNamespace, + Namespace: defaults.MicroVMNamespace, }), ) }, @@ -155,14 +155,6 @@ func TestApp_UpdateMicroVM(t *testing.T) { specToUpdate: createTestSpec("", ""), expectError: true, expect: func(rm *mock.MockMicroVMRepositoryMockRecorder, em *mock.MockEventServiceMockRecorder, im *mock.MockIDServiceMockRecorder, pm *mock.MockMicroVMProviderMockRecorder) { - rm.Get( - gomock.AssignableToTypeOf(context.Background()), - gomock.Eq(""), - gomock.Eq(""), - ).Return( - nil, - nil, - ) }, }, { @@ -317,10 +309,10 @@ func TestApp_DeleteMicroVM(t *testing.T) { } } -func createTestSpec(id, namespace string) *models.MicroVM { +func createTestSpec(name, ns string) *models.MicroVM { + vmid, _ := models.NewVMID(name, ns) return &models.MicroVM{ - ID: id, - Namespace: namespace, + ID: vmid, Spec: models.MicroVMSpec{ VCPU: 2, MemoryInMb: 2048, diff --git a/core/application/commands.go b/core/application/commands.go index 7d983455..00c28968 100644 --- a/core/application/commands.go +++ b/core/application/commands.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/weaveworks/reignite/api/events" + coreerrs "github.com/weaveworks/reignite/core/errors" "github.com/weaveworks/reignite/core/models" "github.com/weaveworks/reignite/pkg/defaults" "github.com/weaveworks/reignite/pkg/log" @@ -15,28 +16,29 @@ func (a *app) CreateMicroVM(ctx context.Context, mvm *models.MicroVM) (*models.M logger.Trace("creating microvm") if mvm == nil { - return nil, errSpecRequired + return nil, coreerrs.ErrSpecRequired } - if mvm.ID == "" { - newID, err := a.idSvc.GenerateRandom() + if mvm.ID == nil { + name, err := a.idSvc.GenerateRandom() if err != nil { - return nil, fmt.Errorf("generating random id for microvm: %w", err) + return nil, fmt.Errorf("generating random name for microvm: %w", err) } - mvm.ID = newID - } - if mvm.Namespace == "" { - mvm.Namespace = defaults.ContainerdNamespace // TODO: not sure this is correct + vmid, err := models.NewVMID(name, defaults.MicroVMNamespace) + if err != nil { + return nil, fmt.Errorf("creating vmid: %w", err) + } + mvm.ID = vmid } - foundMvm, err := a.repo.Get(ctx, mvm.ID, mvm.Namespace) + foundMvm, err := a.repo.Get(ctx, mvm.ID.Name(), mvm.ID.Namespace()) if err != nil { return nil, fmt.Errorf("checking to see if spec exists: %w", err) } if foundMvm != nil { return nil, errSpecAlreadyExists{ - name: mvm.ID, - namespace: mvm.Namespace, + name: mvm.ID.Name(), + namespace: mvm.ID.Namespace(), } } @@ -48,8 +50,8 @@ func (a *app) CreateMicroVM(ctx context.Context, mvm *models.MicroVM) (*models.M } if err := a.eventSvc.Publish(ctx, defaults.TopicMicroVMEvents, &events.MicroVMSpecCreated{ - ID: mvm.ID, - Namespace: mvm.Namespace, + ID: mvm.ID.Name(), + Namespace: mvm.ID.Namespace(), }); err != nil { return nil, fmt.Errorf("publishing microvm created event: %w", err) } @@ -62,22 +64,25 @@ func (a *app) UpdateMicroVM(ctx context.Context, mvm *models.MicroVM) (*models.M logger.Trace("updating microvm") if mvm == nil { - return nil, errSpecRequired + return nil, coreerrs.ErrSpecRequired + } + if mvm.ID == nil { + return nil, coreerrs.ErrVMIDRequired } - foundMvm, err := a.repo.Get(ctx, mvm.ID, mvm.Namespace) + foundMvm, err := a.repo.Get(ctx, mvm.ID.Name(), mvm.ID.Namespace()) if err != nil { return nil, fmt.Errorf("checking to see if spec exists: %w", err) } if foundMvm == nil { return nil, errSpecNotFound{ - name: mvm.ID, - namespace: mvm.Namespace, + name: mvm.ID.Name(), + namespace: mvm.ID.Namespace(), } } // TODO: validate incoming spec - // TODO: check if update is valide (i.e. compare existing to requested update) + // TODO: check if update is valid (i.e. compare existing to requested update) updatedMVM, err := a.repo.Save(ctx, mvm) if err != nil { @@ -85,8 +90,8 @@ func (a *app) UpdateMicroVM(ctx context.Context, mvm *models.MicroVM) (*models.M } if err := a.eventSvc.Publish(ctx, defaults.TopicMicroVMEvents, &events.MicroVMSpecUpdated{ - ID: mvm.ID, - Namespace: mvm.Namespace, + ID: mvm.ID.Name(), + Namespace: mvm.ID.Namespace(), }); err != nil { return nil, fmt.Errorf("publishing microvm updated event: %w", err) } diff --git a/core/application/errors.go b/core/application/errors.go index 7ec825f8..dda5e575 100644 --- a/core/application/errors.go +++ b/core/application/errors.go @@ -6,8 +6,8 @@ import ( ) var ( - errSpecRequired = errors.New("microvm spec is required") - errIDRequired = errors.New("microvm id is required") + errIDRequired = errors.New("microvm id is required") + errNotImplemeted = errors.New("not implemented") ) type errSpecAlreadyExists struct { diff --git a/core/application/query.go b/core/application/query.go index a6213356..2010dda4 100644 --- a/core/application/query.go +++ b/core/application/query.go @@ -7,9 +7,9 @@ import ( ) func (a *app) GetMicroVM(ctx context.Context, id, namespace string) (*models.MicroVM, error) { - return nil, nil + return nil, errNotImplemeted } func (a *app) GetAllMicroVM(ctx context.Context, namespace string) ([]*models.MicroVM, error) { - return nil, nil + return nil, errNotImplemeted } diff --git a/core/application/reconcile.go b/core/application/reconcile.go new file mode 100644 index 00000000..5b17cc64 --- /dev/null +++ b/core/application/reconcile.go @@ -0,0 +1,7 @@ +package application + +import "context" + +func (a *app) ReconcileMicroVMs(ctx context.Context, id, namespace string) error { + return errNotImplemeted +} diff --git a/core/errors.go b/core/errors.go deleted file mode 100644 index 679441a2..00000000 --- a/core/errors.go +++ /dev/null @@ -1,13 +0,0 @@ -package event - -import "fmt" - -// ErrTopicNotFound is an error created when a topic with a specific name isn't found. -type ErrTopicNotFound struct { - Name string -} - -// Error returns the error message. -func (e ErrTopicNotFound) Error() string { - return fmt.Sprintf("topic %s not found", e.Name) -} diff --git a/core/errors/errors.go b/core/errors/errors.go new file mode 100644 index 00000000..408d9deb --- /dev/null +++ b/core/errors/errors.go @@ -0,0 +1,32 @@ +package core + +import ( + "errors" + "fmt" +) + +var ( + ErrSpecRequired = errors.New("microvm spec is required") + ErrVMIDRequired = errors.New("id for microvm is required") + ErrNameRequired = errors.New("name is required") + ErrNamespaceRequired = errors.New("namespace is required") +) + +// ErrTopicNotFound is an error created when a topic with a specific name isn't found. +type ErrTopicNotFound struct { + Name string +} + +// Error returns the error message. +func (e ErrTopicNotFound) Error() string { + return fmt.Sprintf("topic %s not found", e.Name) +} + +type ErrIncorrectVMIDFormat struct { + ActualID string +} + +// Error returns the error message. +func (e ErrIncorrectVMIDFormat) Error() string { + return fmt.Sprintf("unexpected vmid format: %s", e.ActualID) +} diff --git a/core/models/microvm.go b/core/models/microvm.go index 3920d72b..ee1e40e0 100644 --- a/core/models/microvm.go +++ b/core/models/microvm.go @@ -3,9 +3,7 @@ package models // MicroVM represents a microvm machine that is created via a provider. type MicroVM struct { // ID is the identifier for the microvm. - ID string `json:"id"` - // Namespace is the namespace for the microvm. - Namespace string `json:"namespace"` + ID *VMID `json:"id"` // Version is the version for the microvm definition. Version int `json:"version"` // Spec is the specification of the microvm. diff --git a/core/models/vmid.go b/core/models/vmid.go new file mode 100644 index 00000000..96ccd72f --- /dev/null +++ b/core/models/vmid.go @@ -0,0 +1,101 @@ +package models + +import ( + "encoding" + "fmt" + "strings" + + coreerrs "github.com/weaveworks/reignite/core/errors" +) + +const ( + numPartsForID = 2 +) + +var ( + _ encoding.TextMarshaler = (*VMID)(nil) + _ encoding.TextUnmarshaler = (*VMID)(nil) + _ fmt.Stringer = (*VMID)(nil) +) + +// VMID represents the identifier for a microvm. +type VMID struct { + name string + namespace string +} + +// NewVMID creates a new VMID from a name and namespace. +func NewVMID(name, namespace string) (*VMID, error) { + if name == "" { + return nil, coreerrs.ErrNameRequired + } + if namespace == "" { + return nil, coreerrs.ErrNamespaceRequired + } + + return &VMID{ + name: name, + namespace: namespace, + }, nil +} + +// NewVMID creates a new VMID from a string. +func NewVMIDFromString(id string) (*VMID, error) { + ns, name, err := splitVMIDFromString(id) + if err != nil { + return nil, fmt.Errorf("populating id from string: %w", err) + } + + return NewVMID(name, ns) +} + +// Name returns the name part of the VMID. +func (v *VMID) Name() string { + return v.name +} + +// Namespace returns the namespace part of the VMID. +func (v *VMID) Namespace() string { + return v.namespace +} + +// String returns a string representation of the vmid. +func (v *VMID) String() string { + return fmt.Sprintf("%s/%s", v.namespace, v.name) +} + +// MarshalText will marshall the vmid to a string representation. +func (v *VMID) MarshalText() (text []byte, err error) { + return []byte(v.String()), nil +} + +// UnmarshalText will unmarshall the text into the vmid. +func (v *VMID) UnmarshalText(text []byte) error { + id := string(text) + + ns, name, err := splitVMIDFromString(id) + if err != nil { + return fmt.Errorf("parsing vmid from string: %w", err) + } + + v.name = name + v.namespace = ns + + return nil +} + +func splitVMIDFromString(id string) (namespace string, name string, err error) { + parts := strings.Split(id, "/") + if len(parts) != numPartsForID { + return "", "", coreerrs.ErrIncorrectVMIDFormat{ActualID: id} + } + + if parts[0] == "" { + return "", "", coreerrs.ErrNamespaceRequired + } + if parts[1] == "" { + return "", "", coreerrs.ErrNameRequired + } + + return parts[0], parts[1], nil +} diff --git a/core/models/vmid_test.go b/core/models/vmid_test.go new file mode 100644 index 00000000..4221d441 --- /dev/null +++ b/core/models/vmid_test.go @@ -0,0 +1,147 @@ +package models_test + +import ( + "encoding/json" + "testing" + + . "github.com/onsi/gomega" + + "github.com/weaveworks/reignite/core/models" +) + +func TestVMID_New(t *testing.T) { + RegisterTestingT(t) + + testCases := []struct { + name string + vmName string + vmNamespace string + expectError bool + }{ + { + name: "non empty name and namespace, should succeed", + vmName: "test1", + vmNamespace: "ns1", + expectError: false, + }, + { + name: "empty name, non-empty namespace, should error", + vmName: "", + vmNamespace: "ns1", + expectError: true, + }, + { + name: "non-empty name, empty namespace, should error", + vmName: "test1", + vmNamespace: "", + expectError: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + vmid, err := models.NewVMID(tc.vmName, tc.vmNamespace) + + if tc.expectError { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).NotTo(HaveOccurred()) + Expect(vmid).NotTo(BeNil()) + } + }) + } +} + +func TestVMID_NewFromString(t *testing.T) { + RegisterTestingT(t) + + testCases := []struct { + name string + input string + expectedNS string + expectedName string + expectError bool + }{ + { + name: "correct structure", + input: "ns1/test1", + expectError: false, + expectedNS: "ns1", + expectedName: "test1", + }, + { + name: "empty ns", + input: "/test1", + expectError: true, + }, + { + name: "empty name", + input: "ns1/", + expectError: true, + }, + { + name: "wrong format", + input: "ns1@test1", + expectError: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + vmid, err := models.NewVMIDFromString(tc.input) + + if tc.expectError { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).NotTo(HaveOccurred()) + Expect(vmid).NotTo(BeNil()) + Expect(vmid.Name()).To(Equal(tc.expectedName)) + Expect(vmid.Namespace()).To(Equal(tc.expectedNS)) + } + }) + } +} + +func TestVMID_Marshalling(t *testing.T) { + RegisterTestingT(t) + + id1, err := models.NewVMID("name", "namespace") + Expect(err).ToNot(HaveOccurred()) + + data, err := json.Marshal(id1) + Expect(err).NotTo(HaveOccurred()) + + t.Logf("marshalled id to %s", string(data)) + + id2 := &models.VMID{} + + err = json.Unmarshal(data, id2) + Expect(err).NotTo(HaveOccurred()) + Expect(id2).To(BeEquivalentTo(id1)) +} + +func TestVMID_EmbeddedMarshalling(t *testing.T) { + RegisterTestingT(t) + + id1, err := models.NewVMID("name", "namespace") + Expect(err).ToNot(HaveOccurred()) + + s1 := struct { + ID *models.VMID `json:"id"` + }{ + ID: id1, + } + + data, err := json.Marshal(s1) + Expect(err).NotTo(HaveOccurred()) + + t.Logf("marshalled struct to %s", string(data)) + + s2 := struct { + ID *models.VMID `json:"id"` + }{} + + err = json.Unmarshal(data, &s2) + Expect(err).NotTo(HaveOccurred()) + Expect(s2).To(BeEquivalentTo(s1)) +} diff --git a/core/ports/services.go b/core/ports/services.go index 045b700c..6d91f36e 100644 --- a/core/ports/services.go +++ b/core/ports/services.go @@ -25,6 +25,8 @@ type EventService interface { Publish(ctx context.Context, topic string, eventToPublish interface{}) error // SubscribeTopic will subscribe to events on a named topic.. SubscribeTopic(ctx context.Context, topic string) (ch <-chan *EventEnvelope, errs <-chan error) + // SubscribeTopics will subscribe to events on a set of named topics. + SubscribeTopics(ctx context.Context, topics []string) (ch <-chan *EventEnvelope, errs <-chan error) // Subscribe will subscribe to events on all topics Subscribe(ctx context.Context) (ch <-chan *EventEnvelope, errs <-chan error) } diff --git a/core/ports/usecases.go b/core/ports/usecases.go index df1dc3cb..442ededa 100644 --- a/core/ports/usecases.go +++ b/core/ports/usecases.go @@ -18,5 +18,5 @@ type MicroVMQueryUseCases interface { } type ReconcileMicroVMsUseCase interface { - ReconcileMicroVMs(ctx context.Context) error + ReconcileMicroVMs(ctx context.Context, id, namespace string) error } diff --git a/go.mod b/go.mod index e11e51b2..37765aac 100644 --- a/go.mod +++ b/go.mod @@ -4,31 +4,24 @@ go 1.16 require ( github.com/containerd/containerd v1.5.5 - github.com/containerd/typeurl v1.0.2 // indirect - github.com/firecracker-microvm/firecracker-go-sdk v0.22.0 // indirect - github.com/go-openapi/strfmt v0.19.5 // indirect + github.com/containerd/typeurl v1.0.2 + github.com/firecracker-microvm/firecracker-go-sdk v0.22.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.6 github.com/google/uuid v1.3.0 // indirect - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 // indirect - github.com/gruntwork-io/terratest v0.37.4 - github.com/juju/errors v0.0.0-20180806074554-22422dad46e1 // indirect - github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 // indirect - github.com/juju/testing v0.0.0-20190613124551-e81189438503 // indirect - github.com/oklog/ulid v1.3.1 // indirect - github.com/onsi/gomega v1.15.0 + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 + github.com/gruntwork-io/terratest v0.37.7 + github.com/oklog/ulid v1.3.1 + github.com/onsi/gomega v1.16.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.1 - github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_golang v1.11.0 github.com/sirupsen/logrus v1.8.1 - github.com/spf13/cobra v1.2.1 // indirect + github.com/spf13/cobra v1.2.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.8.1 // indirect - github.com/vmware/transport-go v1.1.0 // indirect - google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect - google.golang.org/grpc v1.38.0 // indirect - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0 // indirect - google.golang.org/protobuf v1.26.0 // indirect - gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect + github.com/spf13/viper v1.8.1 + google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced + google.golang.org/grpc v1.38.0 + google.golang.org/protobuf v1.26.0 ) diff --git a/go.sum b/go.sum index c4630ba1..d6fc7623 100644 --- a/go.sum +++ b/go.sum @@ -10,7 +10,6 @@ cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6T cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= @@ -20,6 +19,7 @@ cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKP cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= @@ -53,7 +53,6 @@ github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdA github.com/Azure/go-autorest/autorest v0.11.0/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.5/go.mod h1:foo3aIXRQ90zFve3r0QiDsrjGDUwWhKl0ZOQy1CT14k= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= @@ -103,7 +102,6 @@ github.com/Microsoft/hcsshim v0.8.18/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwT github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 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= @@ -149,12 +147,10 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -163,7 +159,6 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dR github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/bufbuild/buf v0.37.0/go.mod h1:lQ1m2HkIaGOFba6w/aC3KYBHhKEOESP3gaAEpS3dAFM= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= @@ -221,8 +216,6 @@ github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.4 h1:uPF0og3ByFzDnaStfiQj3fVGTEtaSNyU+bW7GR/nqGA= -github.com/containerd/containerd v1.5.4/go.mod h1:sx18RgvW6ABJ4iYUw7Q5x7bgFOAB9B6G7+yO0XBc4zw= github.com/containerd/containerd v1.5.5 h1:q1gxsZsGZ8ddVe98yO6pR21b5xQSMiR61lD0W96pgQo= github.com/containerd/containerd v1.5.5/go.mod h1:oSTh0QpT1w6jYcGmbiSbxv9OSQYaa88mPyWIuU79zyo= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -284,7 +277,6 @@ github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgU github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= @@ -307,7 +299,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= @@ -341,6 +332,7 @@ github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c h1:ZfSZ3P3BedhKGUhzj7BQlPSU4OvT6tfOKe3DVHzOA7s= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/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= @@ -359,12 +351,9 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/firecracker-microvm/firecracker-go-sdk v0.22.0 h1:hk28AO5ArAX9iHomi6axNLK+6+8gz1wi3ooNsUTlSFQ= github.com/firecracker-microvm/firecracker-go-sdk v0.22.0/go.mod h1:lr7w/zmzIi72h+dDMQsRmmKS63EKvnFPEpg2KrjX2X0= @@ -393,10 +382,8 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.4.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= @@ -443,7 +430,6 @@ github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsd 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/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= @@ -473,8 +459,6 @@ github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZp github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stomp/stomp v2.0.3+incompatible h1:B8gYzgV3rXQRHoK8itI9RZDyimEBAwKbJjfoRKpdxwc= -github.com/go-stomp/stomp v2.0.3+incompatible/go.mod h1:VqCtqNZv1226A1/79yh+rMiFUcfY3R109np+7ke4n0c= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= @@ -507,11 +491,8 @@ github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblf github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -523,6 +504,7 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v0.0.0-20210429001901-424d2337a529 h1:2voWjNECnrZRbfwXxHB1/j8wa6xdKn85B5NzgVL/pTU= github.com/golang/glog v0.0.0-20210429001901-424d2337a529/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= @@ -573,7 +555,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -600,7 +581,6 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 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/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -608,21 +588,16 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ 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.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= 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/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -637,9 +612,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 h1:ajue7SzQMywqRjg2fK7dcpc0QhFG github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0/go.mod h1:r1hZAcvfFXuYmcKyCJI9wlyOPIZUJl6FCB8Cpca/NLE= github.com/gruntwork-io/go-commons v0.8.0 h1:k/yypwrPqSeYHevLlEDmvmgQzcyTwrlZGRaxEM6G0ro= github.com/gruntwork-io/go-commons v0.8.0/go.mod h1:gtp0yTtIBExIZp7vyIV9I0XQkVwiQZze678hvDXof78= -github.com/gruntwork-io/terratest v0.36.3 h1:R/wCo6RSPJMQBt573XQy07Ylp7J7BX3SgCB+bi06QfU= -github.com/gruntwork-io/terratest v0.36.3/go.mod h1:GIVJGBV1WIv1vxIG31Ycy0CuHYfXuvvkilNQuC9Wi+o= -github.com/gruntwork-io/terratest v0.37.4/go.mod h1:CSHpZNJdqYQ+TUrigM100jcahRUV5X6w7K2kZJ8iylY= +github.com/gruntwork-io/terratest v0.37.7 h1:D7mWUPdS3enMFOV/qVCm7q+iU46BTQoRSi12cYnpJxU= +github.com/gruntwork-io/terratest v0.37.7/go.mod h1:CSHpZNJdqYQ+TUrigM100jcahRUV5X6w7K2kZJ8iylY= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -657,12 +631,12 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.8.2 h1:wmFle3D1vu0okesm8BTLVDyJ6/OL9DCLUwn0b2OptiY= @@ -671,8 +645,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/terraform-json v0.9.0 h1:WE7+Wt93W93feOiCligElSyS0tlDzwZUtJuDGIBr8zg= -github.com/hashicorp/terraform-json v0.9.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE= +github.com/hashicorp/terraform-json v0.12.0 h1:8czPgEEWWPROStjkWPUnTQDXmpmZPlkQAwYYLETaTvw= github.com/hashicorp/terraform-json v0.12.0/go.mod h1:pmbq9o4EuL43db5+0ogX10Yofv1nozM+wskr/bGFJpI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -681,14 +654,11 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.8.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o= github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -711,10 +681,8 @@ github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMW github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20180806074554-22422dad46e1/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20190613124551-e81189438503/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= @@ -725,10 +693,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13 h1:eSvu8Tmq6j2psUJqJrLcWH6K3w5Dwc+qipbaA6eVEN4= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= 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/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -746,7 +712,6 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -762,14 +727,10 @@ github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kN github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= @@ -795,7 +756,6 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -803,14 +763,11 @@ github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= 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= @@ -829,7 +786,6 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -844,7 +800,6 @@ github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -854,11 +809,8 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= -github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= -github.com/onsi/gomega v1.15.0 h1:WjP/FQ/sk43MRmnEcT+MlDw2TFvkrXlprrPST/IudjU= -github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -901,7 +853,6 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 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= @@ -977,11 +928,14 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/sparrc/go-ping v0.0.0-20190613174326-4e5b6552494c h1:gqEdF4VwBu3lTKGHS9rXE9x1/pEaSwCXRLOZRF6qtlw= github.com/sparrc/go-ping v0.0.0-20190613174326-4e5b6552494c/go.mod h1:eMyUVp6f/5jnzM+3zahzl7q6UXLbgSc3MKg/+ow9QW0= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -994,8 +948,6 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv 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/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.0.1-0.20201006035406-b97b5ead31f7/go.mod h1:yk5b0mALVusDL5fMM6Rd1wgnoO5jUPhwsQ6LQAJTidQ= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -1010,11 +962,9 @@ 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/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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= @@ -1034,10 +984,10 @@ github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= 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/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/twitchtv/twirp v7.1.0+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -1057,8 +1007,6 @@ github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3C github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/vmware/transport-go v1.1.0 h1:68jUI4ZuTvoOuCc3ylvpWFT5HjYrVhqJTW79itV/pNE= -github.com/vmware/transport-go v1.1.0/go.mod h1:yVx33Ih199+jJbOTQRXuyNKm6Hu9nUH9nlM1gbj0buQ= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= @@ -1096,24 +1044,17 @@ go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvS go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1137,7 +1078,6 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1174,7 +1114,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -1230,7 +1169,6 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -1240,7 +1178,6 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG 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= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1249,6 +1186,7 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1 h1:x622Z2o4hgCr/4CiKWc51jHVKaWdtVpBNmEI8wI9Qns= golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 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= @@ -1312,7 +1250,6 @@ golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1333,7 +1270,6 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1360,10 +1296,8 @@ golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1378,10 +1312,8 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb 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/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 h1:Vv0JUPWTyeqUq42B2WJ1FeIDjjvGKoA2Ss+Ts0lAVbs= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/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= @@ -1412,9 +1344,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1437,13 +1366,10 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1464,7 +1390,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= 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= @@ -1534,14 +1459,11 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1568,16 +1490,13 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0-dev.0.20201218190559-666aea1fb34c/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1588,8 +1507,6 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.25.1-0.20201208041424-160c7477e0e8/go.mod h1:hFxJC2f0epmp1elRCiEGJTKAWbwxZ2nvqZdHl3FQXCY= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -1608,11 +1525,8 @@ gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 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= @@ -1652,37 +1566,30 @@ k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI= k8s.io/api v0.19.3/go.mod h1:VF+5FT1B74Pw3KxMdKyinLo+zynBaMBiAfGMuldcNDs= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.6 h1:bgdZrW++LqgrLikWYNruIKAtltXbSCX2l5mJu11hrVE= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.21.2 h1:vz7DqmRsXTCSa6pNxXwQ1IYeAZgdIsua+DZU+o+SX3Y= -k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU= -k8s.io/apiextensions-apiserver v0.21.2/go.mod h1:+Axoz5/l3AYpGLlhJDfcVQzCerVYq3K3CvDMvw6X1RA= k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.6 h1:R5p3SlhaABYShQSO6LpPsYHjV05Q+79eBUR0Ut/f4tk= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.21.2 h1:vezUc/BHqWlQDnZ+XkrpXSmnANSLbpnlpwo0Lhk0gpc= -k8s.io/apimachinery v0.21.2/go.mod h1:CdTY8fU/BlvAbJ2z/8kBwimGki5Zp8/fbVuLY8gJumM= k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/apiserver v0.21.2/go.mod h1:lN4yBoGyiNT7SC1dmNk0ue6a5Wi6O3SWOIw91TsucQw= k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k= k8s.io/client-go v0.19.3/go.mod h1:+eEMktZM+MG0KO+PTkci8xnbCZHvj9TqR6Q1XDUIJOM= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.6 h1:nJZOfolnsVtDtbGJNCxzOtKUAu7zvXjB8+pMo9UNxZo= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.21.2 h1:Q1j4L/iMN4pTw6Y4DWppBoUxgKO8LbffEMVEV00MUp0= -k8s.io/client-go v0.21.2/go.mod h1:HdJ9iknWpbl3vMGtib6T2PyI/VYxiZfq936WNVHBRrA= k8s.io/cloud-provider v0.17.0/go.mod h1:Ze4c3w2C0bRsjkBUoHpFi+qWe3ob1wI2/7cUn+YQIDE= k8s.io/code-generator v0.0.0-20191121015212-c4c8f8345c7e/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= -k8s.io/code-generator v0.21.2/go.mod h1:8mXJDCB7HcRo1xiEQstcguZkbxZaqeUOrO9SsicWs3U= k8s.io/component-base v0.17.0/go.mod h1:rKuRAokNMY2nn2A6LP/MiwpoaMRHpfRnrPaUJJj1Yoc= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.21.2/go.mod h1:9lvmIThzdlrJj5Hp8Z/TOgIkdfsNARQ1pT+3PByuiuc= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -1691,27 +1598,23 @@ k8s.io/csi-translation-lib v0.17.0/go.mod h1:HEF7MEz7pOLJCnxabi45IPkhSsE/KmxPQks 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/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= 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/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= -k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.17.0/go.mod h1:DdzaepJ3RtRy+e5YhNtrCYwlgyK87j/5+Yfp0L9Syp8= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210527160623-6fdb442a123b h1:MSqsVQ3pZvPGTqCjptfimO2WjG7A9un2zcpiHkA6M/s= -k8s.io/utils v0.0.0-20210527160623-6fdb442a123b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 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= @@ -1722,17 +1625,13 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.3 h1:n075bHQ1wb8hpX7C27pNrqsb0fj8mcfCQfNX+oKTbYE= -sigs.k8s.io/controller-runtime v0.9.3/go.mod h1:TxzMCHyEUpaeuOiZx/bIdc2T81vfs/aKdvJt9wuu0zk= 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 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3 h1:4oyYo8NREp49LBBhKxEqCulFjg26rawYKrnCmg+Sr6c= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/infrastructure/containerd/content.go b/infrastructure/containerd/content.go index 22c3c4bb..c32b5aeb 100644 --- a/infrastructure/containerd/content.go +++ b/infrastructure/containerd/content.go @@ -8,8 +8,8 @@ import ( ) var ( - // IDLabel is the name of the containerd content store label used for the microvm identifier. - IDLabel = fmt.Sprintf("%s/vmid", defaults.Domain) + // NameLabel is the name of the containerd content store label used for the microvm name. + NameLabel = fmt.Sprintf("%s/name", defaults.Domain) // NamespaceLabel is the name of the containerd content store label used for the microvm namespace. NamespaceLabel = fmt.Sprintf("%s/ns", defaults.Domain) // TypeLabel is the name of the containerd content store label used to denote the type of content. @@ -19,7 +19,7 @@ var ( ) func contentRefName(microvm *models.MicroVM) string { - return fmt.Sprintf("%s/%s", microvm.Namespace, microvm.ID) + return fmt.Sprintf("%s/microvm/%s", defaults.Domain, microvm.ID) } func labelFilter(name, value string) string { diff --git a/infrastructure/containerd/event_service.go b/infrastructure/containerd/event_service.go index d02fe9e6..dace3b52 100644 --- a/infrastructure/containerd/event_service.go +++ b/infrastructure/containerd/event_service.go @@ -45,11 +45,22 @@ func (es *eventService) Publish(ctx context.Context, topic string, eventToPublis // SubscribeTopic will subscribe to events on a named topic. func (es *eventService) SubscribeTopic(ctx context.Context, topic string) (ch <-chan *ports.EventEnvelope, errs <-chan error) { - topicFilter := fmt.Sprintf("topic==\"%s\"", topic) + topicFilter := topicFilter(topic) return es.subscribe(ctx, topicFilter) } +// SubscribeTopics will subscribe to events on a set of named topics. +func (es *eventService) SubscribeTopics(ctx context.Context, topics []string) (ch <-chan *ports.EventEnvelope, errs <-chan error) { + topicFilters := []string{} + + for _, topic := range topics { + topicFilters = append(topicFilters, topicFilter(topic)) + } + + return es.subscribe(ctx, topicFilters...) +} + // Subscribe will subscribe to events on all topics. func (es *eventService) Subscribe(ctx context.Context) (ch <-chan *ports.EventEnvelope, errs <-chan error) { return es.subscribe(ctx) @@ -98,3 +109,7 @@ func (es *eventService) subscribe(ctx context.Context, filters ...string) (ch <- return ch, errs } + +func topicFilter(topic string) string { + return fmt.Sprintf("topic==\"%s\"", topic) +} diff --git a/infrastructure/containerd/event_service_test.go b/infrastructure/containerd/event_service_test.go index 55420599..c3886d4c 100644 --- a/infrastructure/containerd/event_service_test.go +++ b/infrastructure/containerd/event_service_test.go @@ -5,6 +5,7 @@ import ( "testing" . "github.com/onsi/gomega" + "github.com/weaveworks/reignite/api/events" "github.com/weaveworks/reignite/core/ports" "github.com/weaveworks/reignite/infrastructure/containerd" diff --git a/infrastructure/containerd/repo.go b/infrastructure/containerd/repo.go index a1326358..481f93de 100644 --- a/infrastructure/containerd/repo.go +++ b/infrastructure/containerd/repo.go @@ -47,9 +47,9 @@ type containerdRepo struct { // Save will save the supplied microvm spec to the containred content store. func (r *containerdRepo) Save(ctx context.Context, microvm *models.MicroVM) (*models.MicroVM, error) { logger := log.GetLogger(ctx).WithField("repo", "containerd_microvm") - logger.Debugf("saving microvm spec %s/%s", microvm.Namespace, microvm.ID) + logger.Debugf("saving microvm spec %s", microvm.ID) - mu := r.getMutex(microvm.ID) + mu := r.getMutex(microvm.ID.String()) mu.Lock() defer mu.Unlock() @@ -113,7 +113,7 @@ func (r *containerdRepo) GetAll(ctx context.Context, namespace string) ([]*model versions := map[string]int{} digests := map[string]*digest.Digest{} err := store.Walk(namespaceCtx, func(i content.Info) error { - name := i.Labels[IDLabel] + name := i.Labels[NameLabel] version, err := strconv.Atoi(i.Labels[VersionLabel]) if err != nil { return fmt.Errorf("parsing version number: %w", err) @@ -150,14 +150,14 @@ func (r *containerdRepo) GetAll(ctx context.Context, namespace string) ([]*model // Delete will delete the supplied microvm details from the containerd content store. func (r *containerdRepo) Delete(ctx context.Context, microvm *models.MicroVM) error { - mu := r.getMutex(microvm.ID) + mu := r.getMutex(microvm.ID.String()) mu.Lock() defer mu.Unlock() namespaceCtx := namespaces.WithNamespace(ctx, defaults.ContainerdNamespace) store := r.client.ContentStore() - digests, err := r.findAllDigestForSpec(namespaceCtx, microvm.ID, microvm.Namespace) + digests, err := r.findAllDigestForSpec(namespaceCtx, microvm.ID.Name(), microvm.ID.Namespace()) if err != nil { return fmt.Errorf("finding digests for %s: %w", microvm.ID, err) } @@ -212,7 +212,7 @@ func (r *containerdRepo) getWithDigest(ctx context.Context, metadigest *digest.D } func (r *containerdRepo) findLatestDigestForSpec(ctx context.Context, name, namespace string) (*digest.Digest, error) { - idLabelFilter := labelFilter(IDLabel, name) + idLabelFilter := labelFilter(NameLabel, name) nsFilter := labelFilter(NamespaceLabel, namespace) store := r.client.ContentStore() @@ -239,7 +239,7 @@ func (r *containerdRepo) findLatestDigestForSpec(ctx context.Context, name, name } func (r *containerdRepo) findAllDigestForSpec(ctx context.Context, name, namespace string) ([]*digest.Digest, error) { - idLabelFilter := labelFilter(IDLabel, name) + idLabelFilter := labelFilter(NameLabel, name) nsLabelFilter := labelFilter(NamespaceLabel, namespace) store := r.client.ContentStore() @@ -273,8 +273,8 @@ func (r *containerdRepo) getMutex(name string) *sync.RWMutex { func getVMLabels(microvm *models.MicroVM) map[string]string { labels := map[string]string{ - IDLabel: microvm.ID, - NamespaceLabel: microvm.Namespace, + NameLabel: microvm.ID.Name(), + NamespaceLabel: microvm.ID.Namespace(), TypeLabel: "microvm", VersionLabel: strconv.Itoa(microvm.Version), } diff --git a/infrastructure/containerd/repo_test.go b/infrastructure/containerd/repo_test.go index b371e21c..ddd2ee3d 100644 --- a/infrastructure/containerd/repo_test.go +++ b/infrastructure/containerd/repo_test.go @@ -63,11 +63,11 @@ func TestMicroVMRepo_Integration(t *testing.T) { Expect(err).To(HaveOccurred()) } -func makeSpec(name, namespace string) *models.MicroVM { +func makeSpec(name, ns string) *models.MicroVM { + vmid, _ := models.NewVMID(name, ns) return &models.MicroVM{ - ID: name, - Namespace: namespace, - Version: 1, - Spec: models.MicroVMSpec{}, + ID: vmid, + Version: 1, + Spec: models.MicroVMSpec{}, } } diff --git a/infrastructure/controllers/microvm_controller.go b/infrastructure/controllers/microvm_controller.go new file mode 100644 index 00000000..8080bfd3 --- /dev/null +++ b/infrastructure/controllers/microvm_controller.go @@ -0,0 +1,155 @@ +package controllers + +import ( + "context" + "errors" + "fmt" + "sync" + + "github.com/sirupsen/logrus" + + "github.com/weaveworks/reignite/api/events" + "github.com/weaveworks/reignite/core/models" + "github.com/weaveworks/reignite/core/ports" + "github.com/weaveworks/reignite/pkg/defaults" + "github.com/weaveworks/reignite/pkg/log" + "github.com/weaveworks/reignite/pkg/queue" +) + +func New(eventSvc ports.EventService, reconcileUC ports.ReconcileMicroVMsUseCase) *MicroVMController { + return &MicroVMController{ + eventSvc: eventSvc, + reconcileUC: reconcileUC, + queue: queue.NewSimpleSyncQueue(), + } +} + +type MicroVMController struct { + eventSvc ports.EventService + reconcileUC ports.ReconcileMicroVMsUseCase + + queue queue.Queue +} + +func (r *MicroVMController) Run(ctx context.Context, numWorkers int) error { + logger := log.GetLogger(ctx).WithField("controller", "microvm") + ctx = log.WithLogger(ctx, logger) + logger.Infof("starting microvm controller with %d workers", numWorkers) + + go func() { + <-ctx.Done() + r.queue.Shutdown() + }() + + wg := &sync.WaitGroup{} + logger.Info("starting event listener") + wg.Add(1) + go func() { + defer wg.Done() + r.runEventListener(ctx) + }() + + logger.Info("Starting workers", "num_workers", numWorkers) + wg.Add(numWorkers) + for i := 0; i < numWorkers; i++ { + go func() { + defer wg.Done() + for r.processQueueItem(ctx) { + } + }() + } + + <-ctx.Done() + logger.Info("Shutdown request received, waiting got children to finish") + wg.Wait() + logger.Info("All children finished") + + return nil +} + +func (r *MicroVMController) runEventListener(ctx context.Context) { + logger := log.GetLogger(ctx) + evtCh, errCh := r.eventSvc.SubscribeTopic(ctx, defaults.TopicMicroVMEvents) + + for { + select { + case <-ctx.Done(): + if cerr := ctx.Err(); cerr != nil && !errors.Is(cerr, context.Canceled) { + logger.Errorf("cancelling event loop: %s", cerr) + } + + return + case evt := <-evtCh: + if err := r.handleEvent(evt, logger); err != nil { + logger.Errorf("handling events: %s", err) + // TODO: should we exit here + } + case evtErr := <-errCh: + logger.Errorf("error from event service: %s", evtErr) + // TODO: should we exit here? + } + } +} + +func (r *MicroVMController) processQueueItem(ctx context.Context) bool { + logger := log.GetLogger(ctx) + item, shutdown := r.queue.Dequeue() + if shutdown { + return false + } + + id, ok := item.(string) + if !ok { + logger.Errorf("vmid isn't a string, skipping %v", id) + + return true + } + vmid, err := models.NewVMIDFromString(id) + if err != nil { + logger.Errorf("failed to parse id into vmid %s, skipping: %s", id, err) + + return true + } + + err = r.reconcileUC.ReconcileMicroVMs(ctx, vmid.Name(), vmid.Namespace()) + if err != nil { + logger.Errorf("failed to reconcile vmid %s: %s", vmid, err) + r.queue.Enqueue(item) + + return true + } + + return true +} + +func (r *MicroVMController) handleEvent(envelope *ports.EventEnvelope, logger *logrus.Entry) error { + var name, namespace string + switch v := envelope.Event.(type) { + case *events.MicroVMSpecCreated: + created, _ := envelope.Event.(*events.MicroVMSpecCreated) + name = created.ID + namespace = created.Namespace + case *events.MicroVMSpecDeleted: + deleted, _ := envelope.Event.(*events.MicroVMSpecDeleted) + name = deleted.ID + namespace = deleted.Namespace + case *events.MicroVMSpecUpdated: + updated, _ := envelope.Event.(*events.MicroVMSpecUpdated) + name = updated.ID + namespace = updated.Namespace + default: + logger.Debugf("unhandled event type (%s) received", v) + + return nil + } + + vmid, err := models.NewVMID(name, namespace) + if err != nil { + return fmt.Errorf("getting vmid from event data: %w", err) + } + + logger.Debugf("enqueing vmid %s", vmid) + r.queue.Enqueue(vmid.String()) + + return nil +} diff --git a/infrastructure/controllers/microvm_controller_test.go b/infrastructure/controllers/microvm_controller_test.go new file mode 100644 index 00000000..f1a001f4 --- /dev/null +++ b/infrastructure/controllers/microvm_controller_test.go @@ -0,0 +1,202 @@ +package controllers_test + +import ( + "context" + "errors" + "sync" + "testing" + "time" + + "github.com/golang/mock/gomock" + . "github.com/onsi/gomega" + "github.com/sirupsen/logrus" + lgrtest "github.com/sirupsen/logrus/hooks/test" + + "github.com/weaveworks/reignite/api/events" + "github.com/weaveworks/reignite/core/ports" + "github.com/weaveworks/reignite/infrastructure/controllers" + "github.com/weaveworks/reignite/infrastructure/mock" + "github.com/weaveworks/reignite/pkg/defaults" + "github.com/weaveworks/reignite/pkg/log" +) + +var ( + vmID = "vm1" + vmNS = "testns" +) + +func TestMicroVMController(t *testing.T) { + testCases := []struct { + name string + eventsToSend []*ports.EventEnvelope + expectError bool + expectLogErr bool + expect func(em *mock.MockEventServiceMockRecorder, uc *mock.MockReconcileMicroVMsUseCaseMockRecorder, evtChan chan *ports.EventEnvelope, evtErrCh chan error) + }{ + { + name: "create event causes reconcile", + eventsToSend: []*ports.EventEnvelope{ + createdEvent(vmID, vmNS), + }, + expectError: false, + expectLogErr: false, + expect: func(em *mock.MockEventServiceMockRecorder, uc *mock.MockReconcileMicroVMsUseCaseMockRecorder, evtChan chan *ports.EventEnvelope, evtErrCh chan error) { + em.SubscribeTopic(gomock.Any(), gomock.Eq(defaults.TopicMicroVMEvents)).Return(evtChan, evtErrCh) + + uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(nil) + }, + }, + { + name: "update event causes reconcile", + eventsToSend: []*ports.EventEnvelope{ + updatedEvent(vmID, vmNS), + }, + expectError: false, + expect: func(em *mock.MockEventServiceMockRecorder, uc *mock.MockReconcileMicroVMsUseCaseMockRecorder, evtChan chan *ports.EventEnvelope, evtErrCh chan error) { + em.SubscribeTopic(gomock.Any(), gomock.Eq(defaults.TopicMicroVMEvents)).Return(evtChan, evtErrCh) + + uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(nil) + }, + }, + { + name: "delete event causes reconcile", + eventsToSend: []*ports.EventEnvelope{ + deletedEvent(vmID, vmNS), + }, + expectError: false, + expect: func(em *mock.MockEventServiceMockRecorder, uc *mock.MockReconcileMicroVMsUseCaseMockRecorder, evtChan chan *ports.EventEnvelope, evtErrCh chan error) { + em.SubscribeTopic(gomock.Any(), gomock.Eq(defaults.TopicMicroVMEvents)).Return(evtChan, evtErrCh) + + uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(nil) + }, + }, + { + name: "create event causes reconcile, 1st reconcile fails and then succeeds second time", + eventsToSend: []*ports.EventEnvelope{ + createdEvent(vmID, vmNS), + }, + expectError: false, + expectLogErr: true, + expect: func(em *mock.MockEventServiceMockRecorder, uc *mock.MockReconcileMicroVMsUseCaseMockRecorder, evtChan chan *ports.EventEnvelope, evtErrCh chan error) { + em.SubscribeTopic(gomock.Any(), gomock.Eq(defaults.TopicMicroVMEvents)).Return(evtChan, evtErrCh) + + failed := uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(errors.New("something bad happened")) + + uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(nil).After(failed) + }, + }, + { + name: "create event causes reconcile, 1st reconcile fails and then succeeds second time", + eventsToSend: []*ports.EventEnvelope{ + createdEvent(vmID, vmNS), + }, + expectError: false, + expectLogErr: true, + expect: func(em *mock.MockEventServiceMockRecorder, uc *mock.MockReconcileMicroVMsUseCaseMockRecorder, evtChan chan *ports.EventEnvelope, evtErrCh chan error) { + em.SubscribeTopic(gomock.Any(), gomock.Eq(defaults.TopicMicroVMEvents)).Return(evtChan, evtErrCh) + + failed := uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(errors.New("something bad happened")) + + uc.ReconcileMicroVMs(gomock.Any(), gomock.Eq(vmID), gomock.Eq(vmNS)).Return(nil).After(failed) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + RegisterTestingT(t) + + ctx, cancel := context.WithCancel(context.Background()) + + logger, hook := lgrtest.NewNullLogger() + ctx = log.WithLogger(ctx, logger.WithField("test", tc.name)) + + var err error + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + em := mock.NewMockEventService(mockCtrl) + uc := mock.NewMockReconcileMicroVMsUseCase(mockCtrl) + + evtCh := make(chan *ports.EventEnvelope) + evtErrCh := make(chan error, 1) + + tc.expect(em.EXPECT(), uc.EXPECT(), evtCh, evtErrCh) + + controller := controllers.New(em, uc) + + ctrlWG := sync.WaitGroup{} + ctrlWG.Add(1) + go func() { + defer ctrlWG.Done() + err = controller.Run(ctx, 1) + }() + + for _, evt := range tc.eventsToSend { + evtCh <- evt + time.Sleep(3 * time.Millisecond) + } + + cancel() + ctrlWG.Wait() + + if tc.expectError { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).NotTo(HaveOccurred()) + } + + if tc.expectLogErr { + Expect(hasLogError(hook)).To(BeTrue()) + } else { + Expect(hasLogError(hook)).To(BeFalse()) + } + }) + } +} + +func hasLogError(hook *lgrtest.Hook) bool { + for _, entry := range hook.Entries { + if entry.Level == logrus.ErrorLevel { + return true + } + } + + return false +} + +func createdEvent(name, namespace string) *ports.EventEnvelope { + return &ports.EventEnvelope{ + Timestamp: time.Now(), + Namespace: defaults.ContainerdNamespace, + Topic: defaults.TopicMicroVMEvents, + Event: &events.MicroVMSpecCreated{ + ID: name, + Namespace: namespace, + }, + } +} + +func updatedEvent(name, namespace string) *ports.EventEnvelope { + return &ports.EventEnvelope{ + Timestamp: time.Now(), + Namespace: defaults.ContainerdNamespace, + Topic: defaults.TopicMicroVMEvents, + Event: &events.MicroVMSpecUpdated{ + ID: name, + Namespace: namespace, + }, + } +} + +func deletedEvent(name, namespace string) *ports.EventEnvelope { + return &ports.EventEnvelope{ + Timestamp: time.Now(), + Namespace: defaults.ContainerdNamespace, + Topic: defaults.TopicMicroVMEvents, + Event: &events.MicroVMSpecDeleted{ + ID: name, + Namespace: namespace, + }, + } +} diff --git a/infrastructure/firecracker/config.go b/infrastructure/firecracker/config.go index e24d9de1..4a6986e4 100644 --- a/infrastructure/firecracker/config.go +++ b/infrastructure/firecracker/config.go @@ -31,7 +31,7 @@ func (p *fcProvider) getConfig(machine *models.MicroVM) (*firecracker.Config, er MemSizeMib: firecracker.Int64(machine.Spec.MemoryInMb), }, // JailerCfg: nil, - VMID: machine.ID, + VMID: machine.ID.String(), } return conf, nil diff --git a/infrastructure/grpc/convert.go b/infrastructure/grpc/convert.go index 84d4da5f..05bc5668 100644 --- a/infrastructure/grpc/convert.go +++ b/infrastructure/grpc/convert.go @@ -1,14 +1,19 @@ package grpc import ( + "fmt" + "github.com/weaveworks/reignite/api/types" "github.com/weaveworks/reignite/core/models" ) -func convertMicroVMToModel(spec *types.MicroVMSpec) *models.MicroVM { +func convertMicroVMToModel(spec *types.MicroVMSpec) (*models.MicroVM, error) { + vmid, err := models.NewVMID(spec.Id, spec.Namespace) + if err != nil { + return nil, fmt.Errorf("creating vmid from spec: %w", err) + } convertedModel := &models.MicroVM{ - ID: spec.Id, - Namespace: spec.Namespace, + ID: vmid, // Labels Spec: models.MicroVMSpec{ Kernel: models.Kernel{ @@ -32,7 +37,7 @@ func convertMicroVMToModel(spec *types.MicroVMSpec) *models.MicroVM { convertedModel.Spec.NetworkInterfaces = append(convertedModel.Spec.NetworkInterfaces, *convertedNetInt) } - return convertedModel + return convertedModel, nil } func convertNetworkInterfaceToModel(netInt *types.NetworkInterface) *models.NetworkInterface { @@ -73,8 +78,8 @@ func convertVolumeToModel(volume *types.Volume) *models.Volume { func convertModelToMicroVM(mvm *models.MicroVM) *types.MicroVMSpec { converted := &types.MicroVMSpec{ - Id: mvm.ID, - Namespace: mvm.Namespace, + Id: mvm.ID.Name(), + Namespace: mvm.ID.Namespace(), // Labels: , Vcpu: int32(mvm.Spec.VCPU), MemoryInMb: int32(mvm.Spec.MemoryInMb), diff --git a/infrastructure/grpc/server.go b/infrastructure/grpc/server.go index 2d6944c0..5218f49c 100644 --- a/infrastructure/grpc/server.go +++ b/infrastructure/grpc/server.go @@ -30,9 +30,12 @@ func (s *server) CreateMicroVM(ctx context.Context, req *mvmv1.CreateMicroVMRequ logger := log.GetLogger(ctx) logger.Trace("converting request to model") - modelSpec := convertMicroVMToModel(req.Microvm) + modelSpec, err := convertMicroVMToModel(req.Microvm) + if err != nil { + return nil, fmt.Errorf("converting request: %w", err) + } - logger.Infof("creating microvm %s/%s", modelSpec.ID, modelSpec.Namespace) + logger.Infof("creating microvm %s", modelSpec.ID) createdModel, err := s.commandUC.CreateMicroVM(ctx, modelSpec) if err != nil { logger.Errorf("failed to create microvm: %s", err) @@ -52,9 +55,12 @@ func (s *server) UpdateMicroVM(ctx context.Context, req *mvmv1.UpdateMicroVMRequ logger := log.GetLogger(ctx) logger.Trace("converting request to model") - modelSpec := convertMicroVMToModel(req.Microvm) + modelSpec, err := convertMicroVMToModel(req.Microvm) + if err != nil { + return nil, fmt.Errorf("converting request: %w", err) + } - logger.Infof("updating microvm %s/%s", modelSpec.ID, modelSpec.Namespace) + logger.Infof("updating microvm %s", modelSpec.ID) updatedModel, err := s.commandUC.UpdateMicroVM(ctx, modelSpec) if err != nil { logger.Errorf("failed to update microvm: %s", err) diff --git a/infrastructure/mock/gen.go b/infrastructure/mock/gen.go index d59b5e18..3e58bcc3 100644 --- a/infrastructure/mock/gen.go +++ b/infrastructure/mock/gen.go @@ -1,3 +1,3 @@ package mock -//go:generate ../../hack/tools/bin/mockgen -destination mock.go -package mock github.com/weaveworks/reignite/core/ports MicroVMProvider,MicroVMRepository,EventService,IDService,ImageService +//go:generate ../../hack/tools/bin/mockgen -destination mock.go -package mock github.com/weaveworks/reignite/core/ports MicroVMProvider,MicroVMRepository,EventService,IDService,ImageService,ReconcileMicroVMsUseCase diff --git a/infrastructure/mock/mock.go b/infrastructure/mock/mock.go index 487957c8..43cc323f 100644 --- a/infrastructure/mock/mock.go +++ b/infrastructure/mock/mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/weaveworks/reignite/core/ports (interfaces: MicroVMProvider,MicroVMRepository,EventService,IDService,ImageService) +// Source: github.com/weaveworks/reignite/core/ports (interfaces: MicroVMProvider,MicroVMRepository,EventService,IDService,ImageService,ReconcileMicroVMsUseCase) // Package mock is a generated GoMock package. package mock @@ -314,6 +314,21 @@ func (mr *MockEventServiceMockRecorder) SubscribeTopic(arg0, arg1 interface{}) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeTopic", reflect.TypeOf((*MockEventService)(nil).SubscribeTopic), arg0, arg1) } +// SubscribeTopics mocks base method. +func (m *MockEventService) SubscribeTopics(arg0 context.Context, arg1 []string) (<-chan *ports.EventEnvelope, <-chan error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeTopics", arg0, arg1) + ret0, _ := ret[0].(<-chan *ports.EventEnvelope) + ret1, _ := ret[1].(<-chan error) + return ret0, ret1 +} + +// SubscribeTopics indicates an expected call of SubscribeTopics. +func (mr *MockEventServiceMockRecorder) SubscribeTopics(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeTopics", reflect.TypeOf((*MockEventService)(nil).SubscribeTopics), arg0, arg1) +} + // MockIDService is a mock of IDService interface. type MockIDService struct { ctrl *gomock.Controller @@ -403,3 +418,40 @@ func (mr *MockImageServiceMockRecorder) GetAndMount(arg0, arg1 interface{}) *gom mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAndMount", reflect.TypeOf((*MockImageService)(nil).GetAndMount), arg0, arg1) } + +// MockReconcileMicroVMsUseCase is a mock of ReconcileMicroVMsUseCase interface. +type MockReconcileMicroVMsUseCase struct { + ctrl *gomock.Controller + recorder *MockReconcileMicroVMsUseCaseMockRecorder +} + +// MockReconcileMicroVMsUseCaseMockRecorder is the mock recorder for MockReconcileMicroVMsUseCase. +type MockReconcileMicroVMsUseCaseMockRecorder struct { + mock *MockReconcileMicroVMsUseCase +} + +// NewMockReconcileMicroVMsUseCase creates a new mock instance. +func NewMockReconcileMicroVMsUseCase(ctrl *gomock.Controller) *MockReconcileMicroVMsUseCase { + mock := &MockReconcileMicroVMsUseCase{ctrl: ctrl} + mock.recorder = &MockReconcileMicroVMsUseCaseMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockReconcileMicroVMsUseCase) EXPECT() *MockReconcileMicroVMsUseCaseMockRecorder { + return m.recorder +} + +// ReconcileMicroVMs mocks base method. +func (m *MockReconcileMicroVMsUseCase) ReconcileMicroVMs(arg0 context.Context, arg1, arg2 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReconcileMicroVMs", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// ReconcileMicroVMs indicates an expected call of ReconcileMicroVMs. +func (mr *MockReconcileMicroVMsUseCaseMockRecorder) ReconcileMicroVMs(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileMicroVMs", reflect.TypeOf((*MockReconcileMicroVMsUseCase)(nil).ReconcileMicroVMs), arg0, arg1, arg2) +} diff --git a/internal/command/run/run.go b/internal/command/run/run.go index 26f6b427..bb190097 100644 --- a/internal/command/run/run.go +++ b/internal/command/run/run.go @@ -18,6 +18,7 @@ import ( mvmv1 "github.com/weaveworks/reignite/api/services/microvm/v1alpha1" "github.com/weaveworks/reignite/core/application" reignite_ctr "github.com/weaveworks/reignite/infrastructure/containerd" + "github.com/weaveworks/reignite/infrastructure/controllers" "github.com/weaveworks/reignite/infrastructure/firecracker" microvmgrpc "github.com/weaveworks/reignite/infrastructure/grpc" "github.com/weaveworks/reignite/infrastructure/ulid" @@ -69,7 +70,13 @@ func runServer(ctx context.Context, cfg *config.Config) error { } }() - // TODO: start the reconciler + wg.Add(1) + go func() { + defer wg.Done() + if err := runControllers(ctx, cfg); err != nil { + logger.Errorf("failed running controllers: %v", err) + } + }() <-sigChan logger.Debug("shutdown signal received, waiting for work to finish") @@ -126,3 +133,28 @@ func serveAPI(ctx context.Context, cfg *config.Config) error { return nil } + +func runControllers(ctx context.Context, cfg *config.Config) error { + logger := log.GetLogger(ctx) + + // TODO: Use DI framework to inject these ------- + containerdClient, err := containerd.New(cfg.ContainerdSocketPath) + if err != nil { + return fmt.Errorf("creating containerd client: %w", err) + } + repo := reignite_ctr.NewMicroVMRepoWithClient(containerdClient) + eventSvc := reignite_ctr.NewEventServiceWithClient(containerdClient) + idSvc := ulid.New() + mvmprovider := firecracker.New(&cfg.Firecracker) + + app := application.New(repo, eventSvc, idSvc, mvmprovider) + mvmControllers := controllers.New(eventSvc, app) + // END todo ----------------------------------------- + + logger.Info("starting microvm controller") + if err := mvmControllers.Run(ctx, 1); err != nil { + logger.Fatalf("starting microvm controller: %v", err) + } + + return nil +} diff --git a/pkg/defaults/defaults.go b/pkg/defaults/defaults.go index a882b9b8..fb0c7ed9 100644 --- a/pkg/defaults/defaults.go +++ b/pkg/defaults/defaults.go @@ -26,5 +26,8 @@ const ( HTTPAPIEndpoint = "localhost:8090" // TopicMicroVMEvents is the topic name to use for microvm events. - TopicMicroVMEvents = "microvm" + TopicMicroVMEvents = "/microvm" + + // MicroVMNamespace is the default namespace to use for microvms. + MicroVMNamespace = "default" ) diff --git a/pkg/queue/queue.go b/pkg/queue/queue.go new file mode 100644 index 00000000..44b58f05 --- /dev/null +++ b/pkg/queue/queue.go @@ -0,0 +1,87 @@ +package queue + +import ( + "sync" + + "github.com/google/go-cmp/cmp" +) + +// NOTE: this is heavily based on the workerqueue from client-go: https://github.com/kubernetes/client-go/blob/master/util/workqueue/queue.go + +// Queue is the interface for a queue. +type Queue interface { + // Enqueue will add an item to the queue for processing. If the item being enqueued already exists then + // it will be ignored. + Enqueue(item interface{}) + // Dequeue will get an item from the queue. If there are no items on the queue then it will wait. + Dequeue() (interface{}, bool) + // Shutdown will cause the queue processing to shutdown. + Shutdown() +} + +// NewSimpleSyncQueue create a new simple sync queue. +func NewSimpleSyncQueue() Queue { + return &simpleSyncQueue{ + items: []interface{}{}, + emptyCond: sync.NewCond(&sync.Mutex{}), + } +} + +type simpleSyncQueue struct { + items []interface{} + + emptyCond *sync.Cond + shuttingDown bool +} + +func (q *simpleSyncQueue) Enqueue(item interface{}) { + q.emptyCond.L.Lock() + defer q.emptyCond.L.Unlock() + + if q.shuttingDown { + return + } + + if q.exists(item) { + // We already have the item so ignore + return + } + + q.items = append(q.items, item) + q.emptyCond.Signal() +} + +func (q *simpleSyncQueue) exists(item interface{}) bool { + for _, currentItem := range q.items { + if cmp.Equal(currentItem, item) { + return true + } + } + + return false +} + +func (q *simpleSyncQueue) Dequeue() (interface{}, bool) { + q.emptyCond.L.Lock() + defer q.emptyCond.L.Unlock() + + for len(q.items) == 0 && !q.shuttingDown { + q.emptyCond.Wait() + } + + if len(q.items) == 0 { + return nil, true + } + + var item interface{} + item, q.items = q.items[0], q.items[1:] + + return item, false +} + +func (q *simpleSyncQueue) Shutdown() { + q.emptyCond.L.Lock() + defer q.emptyCond.L.Unlock() + q.shuttingDown = true + q.emptyCond.Broadcast() +} diff --git a/pkg/queue/queue_test.go b/pkg/queue/queue_test.go new file mode 100644 index 00000000..ba991699 --- /dev/null +++ b/pkg/queue/queue_test.go @@ -0,0 +1,113 @@ +package queue_test + +import ( + "fmt" + "strings" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/weaveworks/reignite/pkg/queue" +) + +func TestSimpleSyncQueue_Basic(t *testing.T) { + q := queue.NewSimpleSyncQueue() + + var countProduced int32 + var countConsumed int32 + + numProduces := 10 + numItemsPerProducer := 10 + producersWG := sync.WaitGroup{} + producersWG.Add(numProduces) + for i := 0; i < numProduces; i++ { + go func(i int) { + defer producersWG.Done() + for j := 0; j < numItemsPerProducer; j++ { + offset := i * numItemsPerProducer + id := offset + j + vmid := fmt.Sprintf("ns1/vm%d", id) + q.Enqueue(vmid) + atomic.AddInt32(&countProduced, 1) + time.Sleep(time.Millisecond) + } + }(i) + } + + numConsumers := 5 + consumersWG := sync.WaitGroup{} + consumersWG.Add(numConsumers) + for i := 0; i < numConsumers; i++ { + go func(i int) { + defer consumersWG.Done() + for { + item, shutdown := q.Dequeue() + if shutdown { + return + } + if !strings.HasPrefix(item.(string), "ns1/vm") { + t.Fatal("received item from queue after shutdown") + } + atomic.AddInt32(&countConsumed, 1) + time.Sleep(3 * time.Millisecond) + } + }(i) + } + + producersWG.Wait() + t.Log("shutting queue down") + q.Shutdown() + t.Log("enqueing message after shutdown") + q.Enqueue("added after shutdown") + consumersWG.Wait() + + if countConsumed != countProduced { + t.Fatalf("number of items enqueued (%d) should equal the number dequeued (%d)", countProduced, countConsumed) + } +} + +func TestSimpleSyncQueue_Duplicate(t *testing.T) { + q := queue.NewSimpleSyncQueue() + + numItems := 10 + for i := 0; i < numItems; i++ { + vmid := fmt.Sprintf("ns1/vm%d", i) + q.Enqueue(vmid) + q.Enqueue(vmid) // duplicate enqueue with the same id + time.Sleep(time.Millisecond) + } + + var countConsumed int32 + numConsumers := 5 + consumersWG := sync.WaitGroup{} + consumersWG.Add(numConsumers) + for i := 0; i < numConsumers; i++ { + go func(i int) { + defer consumersWG.Done() + for { + item, shutdown := q.Dequeue() + if shutdown { + return + } + if !strings.HasPrefix(item.(string), "ns1/vm") { + t.Fatal("received item from queue after shutdown") + } + t.Logf("Worker %v: starting processing %v", i, item) + atomic.AddInt32(&countConsumed, 1) + time.Sleep(3 * time.Millisecond) + t.Logf("Worker %v: done processing %v", i, item) + } + }(i) + } + + t.Log("shutting queue down") + q.Shutdown() + t.Log("enqueing message after shutdown") + q.Enqueue("added after shutdown") + consumersWG.Wait() + + if countConsumed != int32(numItems) { + t.Fatalf("number of items enqueued (%d) should equal the number dequeued (%d)", numItems, countConsumed) + } +}