Skip to content

Commit

Permalink
Bump codebase to v3
Browse files Browse the repository at this point in the history
We bumped to v3 without bumping the go.mod and codebase which prevented
importing theatre as a dependency into other codebases. This resolves
that.
  • Loading branch information
dyson committed Mar 17, 2021
1 parent c7365ac commit 865a93c
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 50 deletions.
3 changes: 2 additions & 1 deletion apis/workloads/v1alpha1/console_authorisation_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apis/workloads/v1alpha1/integration/priority_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
7 changes: 4 additions & 3 deletions cmd/acceptance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ 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"
"k8s.io/client-go/rest"
"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 (
Expand Down
8 changes: 4 additions & 4 deletions cmd/rbac-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
8 changes: 4 additions & 4 deletions cmd/theatre-consoles/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions cmd/theatre-secrets/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions cmd/vault-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions cmd/workloads-manager/acceptance/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions cmd/workloads-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions controllers/rbac/directoryrolebinding/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
8 changes: 4 additions & 4 deletions controllers/workloads/console/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions controllers/workloads/console/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions controllers/workloads/console/integration/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions pkg/recutil/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions pkg/workloads/console/runner/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/workloads/console/runner/integration/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions pkg/workloads/console/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 865a93c

Please sign in to comment.