From 865a93c3fe0fab305253c6bebd4c5613b064aa72 Mon Sep 17 00:00:00 2001 From: Dyson Simmons Date: Wed, 17 Mar 2021 15:27:01 +0000 Subject: [PATCH] Bump codebase to v3 We bumped to v3 without bumping the go.mod and codebase which prevented importing theatre as a dependency into other codebases. This resolves that. --- .../v1alpha1/console_authorisation_webhook.go | 3 ++- .../v1alpha1/integration/priority_suite_test.go | 4 ++-- cmd/acceptance/main.go | 7 ++++--- cmd/rbac-manager/main.go | 8 ++++---- cmd/theatre-consoles/main.go | 8 ++++---- cmd/theatre-secrets/main.go | 4 ++-- cmd/vault-manager/main.go | 6 +++--- cmd/workloads-manager/acceptance/acceptance.go | 6 +++--- cmd/workloads-manager/main.go | 10 +++++----- controllers/rbac/directoryrolebinding/controller.go | 6 +++--- .../integration/integration_test.go | 2 +- .../directoryrolebinding/integration/suite_test.go | 4 ++-- controllers/workloads/console/controller.go | 8 ++++---- .../workloads/console/integration/integration_test.go | 4 ++-- .../workloads/console/integration/suite_test.go | 6 +++--- pkg/recutil/reconcile.go | 4 ++-- .../console/runner/integration/integration_test.go | 4 ++-- pkg/workloads/console/runner/integration/suite_test.go | 4 ++-- pkg/workloads/console/runner/runner.go | 4 ++-- 19 files changed, 52 insertions(+), 50 deletions(-) diff --git a/apis/workloads/v1alpha1/console_authorisation_webhook.go b/apis/workloads/v1alpha1/console_authorisation_webhook.go index f7a1bc35..a6814a62 100644 --- a/apis/workloads/v1alpha1/console_authorisation_webhook.go +++ b/apis/workloads/v1alpha1/console_authorisation_webhook.go @@ -8,11 +8,12 @@ import ( "time" "github.com/go-logr/logr" - rbacutils "github.com/gocardless/theatre/v2/pkg/rbac" "github.com/hashicorp/go-multierror" "github.com/pkg/errors" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + rbacutils "github.com/gocardless/theatre/v3/pkg/rbac" ) // +kubebuilder:object:generate=false diff --git a/apis/workloads/v1alpha1/integration/priority_suite_test.go b/apis/workloads/v1alpha1/integration/priority_suite_test.go index e86a7813..c913e5d5 100644 --- a/apis/workloads/v1alpha1/integration/priority_suite_test.go +++ b/apis/workloads/v1alpha1/integration/priority_suite_test.go @@ -17,8 +17,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" ) var ( diff --git a/cmd/acceptance/main.go b/cmd/acceptance/main.go index 62f74e37..9b57f6c6 100644 --- a/cmd/acceptance/main.go +++ b/cmd/acceptance/main.go @@ -15,7 +15,6 @@ import ( "github.com/alecthomas/kingpin" kitlog "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" - "github.com/gocardless/theatre/v2/pkg/signals" . "github.com/onsi/ginkgo" "github.com/onsi/ginkgo/config" . "github.com/onsi/gomega" @@ -23,8 +22,10 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/klog" - vaultManagerAcceptance "github.com/gocardless/theatre/v2/cmd/vault-manager/acceptance" - workloadsManagerAcceptance "github.com/gocardless/theatre/v2/cmd/workloads-manager/acceptance" + "github.com/gocardless/theatre/v3/pkg/signals" + + vaultManagerAcceptance "github.com/gocardless/theatre/v3/cmd/vault-manager/acceptance" + workloadsManagerAcceptance "github.com/gocardless/theatre/v3/cmd/workloads-manager/acceptance" ) var ( diff --git a/cmd/rbac-manager/main.go b/cmd/rbac-manager/main.go index 4c446708..a1d30287 100644 --- a/cmd/rbac-manager/main.go +++ b/cmd/rbac-manager/main.go @@ -14,10 +14,10 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // this is required to auth against GCP ctrl "sigs.k8s.io/controller-runtime" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - "github.com/gocardless/theatre/v2/cmd" - directoryrolebinding "github.com/gocardless/theatre/v2/controllers/rbac/directoryrolebinding" - "github.com/gocardless/theatre/v2/pkg/signals" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + "github.com/gocardless/theatre/v3/cmd" + directoryrolebinding "github.com/gocardless/theatre/v3/controllers/rbac/directoryrolebinding" + "github.com/gocardless/theatre/v3/pkg/signals" ) var ( diff --git a/cmd/theatre-consoles/main.go b/cmd/theatre-consoles/main.go index 598e4e06..70f2eef8 100644 --- a/cmd/theatre-consoles/main.go +++ b/cmd/theatre-consoles/main.go @@ -16,10 +16,10 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/klog" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" - "github.com/gocardless/theatre/v2/cmd" - "github.com/gocardless/theatre/v2/pkg/signals" - "github.com/gocardless/theatre/v2/pkg/workloads/console/runner" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" + "github.com/gocardless/theatre/v3/cmd" + "github.com/gocardless/theatre/v3/pkg/signals" + "github.com/gocardless/theatre/v3/pkg/workloads/console/runner" ) var ( diff --git a/cmd/theatre-secrets/main.go b/cmd/theatre-secrets/main.go index d9bc37fb..aa5fe07c 100644 --- a/cmd/theatre-secrets/main.go +++ b/cmd/theatre-secrets/main.go @@ -22,8 +22,8 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" - "github.com/gocardless/theatre/v2/cmd" - "github.com/gocardless/theatre/v2/pkg/signals" + "github.com/gocardless/theatre/v3/cmd" + "github.com/gocardless/theatre/v3/pkg/signals" ) var logger logr.Logger diff --git a/cmd/vault-manager/main.go b/cmd/vault-manager/main.go index 3fccbcde..3a571fce 100644 --- a/cmd/vault-manager/main.go +++ b/cmd/vault-manager/main.go @@ -10,9 +10,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - vaultv1alpha1 "github.com/gocardless/theatre/v2/apis/vault/v1alpha1" - "github.com/gocardless/theatre/v2/cmd" - "github.com/gocardless/theatre/v2/pkg/signals" + vaultv1alpha1 "github.com/gocardless/theatre/v3/apis/vault/v1alpha1" + "github.com/gocardless/theatre/v3/cmd" + "github.com/gocardless/theatre/v3/pkg/signals" ) var ( diff --git a/cmd/workloads-manager/acceptance/acceptance.go b/cmd/workloads-manager/acceptance/acceptance.go index 95bcead9..d19b664e 100644 --- a/cmd/workloads-manager/acceptance/acceptance.go +++ b/cmd/workloads-manager/acceptance/acceptance.go @@ -17,9 +17,9 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" - "github.com/gocardless/theatre/v2/pkg/workloads/console/runner" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" + "github.com/gocardless/theatre/v3/pkg/workloads/console/runner" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/cmd/workloads-manager/main.go b/cmd/workloads-manager/main.go index 7c8609b1..b17ac633 100644 --- a/cmd/workloads-manager/main.go +++ b/cmd/workloads-manager/main.go @@ -11,11 +11,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" - "github.com/gocardless/theatre/v2/cmd" - consolecontroller "github.com/gocardless/theatre/v2/controllers/workloads/console" - "github.com/gocardless/theatre/v2/pkg/signals" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" + "github.com/gocardless/theatre/v3/cmd" + consolecontroller "github.com/gocardless/theatre/v3/controllers/workloads/console" + "github.com/gocardless/theatre/v3/pkg/signals" ) var ( diff --git a/controllers/rbac/directoryrolebinding/controller.go b/controllers/rbac/directoryrolebinding/controller.go index f196fd74..e317c477 100644 --- a/controllers/rbac/directoryrolebinding/controller.go +++ b/controllers/rbac/directoryrolebinding/controller.go @@ -19,9 +19,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - rbacutils "github.com/gocardless/theatre/v2/pkg/rbac" - "github.com/gocardless/theatre/v2/pkg/recutil" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + rbacutils "github.com/gocardless/theatre/v3/pkg/rbac" + "github.com/gocardless/theatre/v3/pkg/recutil" ) const ( diff --git a/controllers/rbac/directoryrolebinding/integration/integration_test.go b/controllers/rbac/directoryrolebinding/integration/integration_test.go index e417cf50..1efd2eaa 100644 --- a/controllers/rbac/directoryrolebinding/integration/integration_test.go +++ b/controllers/rbac/directoryrolebinding/integration/integration_test.go @@ -10,7 +10,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" "github.com/google/uuid" . "github.com/onsi/ginkgo" diff --git a/controllers/rbac/directoryrolebinding/integration/suite_test.go b/controllers/rbac/directoryrolebinding/integration/suite_test.go index cbb82a6f..efe202fd 100644 --- a/controllers/rbac/directoryrolebinding/integration/suite_test.go +++ b/controllers/rbac/directoryrolebinding/integration/suite_test.go @@ -17,8 +17,8 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - directoryrolebinding "github.com/gocardless/theatre/v2/controllers/rbac/directoryrolebinding" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + directoryrolebinding "github.com/gocardless/theatre/v3/controllers/rbac/directoryrolebinding" ) var ( diff --git a/controllers/workloads/console/controller.go b/controllers/workloads/console/controller.go index 5b016ab2..c1864261 100644 --- a/controllers/workloads/console/controller.go +++ b/controllers/workloads/console/controller.go @@ -28,10 +28,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" - "github.com/gocardless/theatre/v2/pkg/logging" - "github.com/gocardless/theatre/v2/pkg/recutil" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" + "github.com/gocardless/theatre/v3/pkg/logging" + "github.com/gocardless/theatre/v3/pkg/recutil" ) const ( diff --git a/controllers/workloads/console/integration/integration_test.go b/controllers/workloads/console/integration/integration_test.go index 524aa744..991033b6 100644 --- a/controllers/workloads/console/integration/integration_test.go +++ b/controllers/workloads/console/integration/integration_test.go @@ -16,8 +16,8 @@ import ( "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" ) var _ = Describe("Console", func() { diff --git a/controllers/workloads/console/integration/suite_test.go b/controllers/workloads/console/integration/suite_test.go index 5226a24a..f9115344 100644 --- a/controllers/workloads/console/integration/suite_test.go +++ b/controllers/workloads/console/integration/suite_test.go @@ -18,9 +18,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" - consolecontroller "github.com/gocardless/theatre/v2/controllers/workloads/console" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" + consolecontroller "github.com/gocardless/theatre/v3/controllers/workloads/console" ) var ( diff --git a/pkg/recutil/reconcile.go b/pkg/recutil/reconcile.go index 2ab10a94..0d781f09 100644 --- a/pkg/recutil/reconcile.go +++ b/pkg/recutil/reconcile.go @@ -16,8 +16,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - "github.com/gocardless/theatre/v2/pkg/logging" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + "github.com/gocardless/theatre/v3/pkg/logging" ) const ( diff --git a/pkg/workloads/console/runner/integration/integration_test.go b/pkg/workloads/console/runner/integration/integration_test.go index c5d8f9e0..23cf55ed 100644 --- a/pkg/workloads/console/runner/integration/integration_test.go +++ b/pkg/workloads/console/runner/integration/integration_test.go @@ -12,8 +12,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" - "github.com/gocardless/theatre/v2/pkg/workloads/console/runner" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" + "github.com/gocardless/theatre/v3/pkg/workloads/console/runner" ) func newNamespace(name string) corev1.Namespace { diff --git a/pkg/workloads/console/runner/integration/suite_test.go b/pkg/workloads/console/runner/integration/suite_test.go index 6abff21e..f197fd93 100644 --- a/pkg/workloads/console/runner/integration/suite_test.go +++ b/pkg/workloads/console/runner/integration/suite_test.go @@ -17,8 +17,8 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" ) var ( diff --git a/pkg/workloads/console/runner/runner.go b/pkg/workloads/console/runner/runner.go index e16fdd24..9a48c80e 100644 --- a/pkg/workloads/console/runner/runner.go +++ b/pkg/workloads/console/runner/runner.go @@ -31,8 +31,8 @@ import ( "k8s.io/kubectl/pkg/util/term" "sigs.k8s.io/controller-runtime/pkg/client" - rbacv1alpha1 "github.com/gocardless/theatre/v2/apis/rbac/v1alpha1" - workloadsv1alpha1 "github.com/gocardless/theatre/v2/apis/workloads/v1alpha1" + rbacv1alpha1 "github.com/gocardless/theatre/v3/apis/rbac/v1alpha1" + workloadsv1alpha1 "github.com/gocardless/theatre/v3/apis/workloads/v1alpha1" ) // Alias genericclioptions.IOStreams to avoid additional imports