diff --git a/pkg/backup/backup.go b/pkg/backup/backup.go index 4f5139aff..5b8a85c4d 100644 --- a/pkg/backup/backup.go +++ b/pkg/backup/backup.go @@ -26,7 +26,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/backup/backup_pv_action.go b/pkg/backup/backup_pv_action.go index c849143be..44d9bdb5c 100644 --- a/pkg/backup/backup_pv_action.go +++ b/pkg/backup/backup_pv_action.go @@ -19,7 +19,6 @@ package backup import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/backup/backup_pv_action_test.go b/pkg/backup/backup_pv_action_test.go index bb33b0415..5137cfa9d 100644 --- a/pkg/backup/backup_pv_action_test.go +++ b/pkg/backup/backup_pv_action_test.go @@ -19,13 +19,14 @@ package backup import ( "testing" - "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/kuberesource" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/kuberesource" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestBackupPVAction(t *testing.T) { diff --git a/pkg/backup/backup_test.go b/pkg/backup/backup_test.go index 552f26b0b..29f27fe3e 100644 --- a/pkg/backup/backup_test.go +++ b/pkg/backup/backup_test.go @@ -28,7 +28,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/pkg/backup/delete_helpers.go b/pkg/backup/delete_helpers.go index 96215bbde..bf753ae08 100644 --- a/pkg/backup/delete_helpers.go +++ b/pkg/backup/delete_helpers.go @@ -19,8 +19,9 @@ package backup import ( "fmt" - "github.com/heptio/ark/pkg/apis/ark/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/heptio/ark/pkg/apis/ark/v1" ) // NewDeleteBackupRequest creates a DeleteBackupRequest for the backup identified by name and uid. diff --git a/pkg/backup/group_backupper.go b/pkg/backup/group_backupper.go index 8c1169afc..14920a99d 100644 --- a/pkg/backup/group_backupper.go +++ b/pkg/backup/group_backupper.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" kuberrs "k8s.io/apimachinery/pkg/util/errors" diff --git a/pkg/backup/group_backupper_test.go b/pkg/backup/group_backupper_test.go index cd4535c2e..00179b89a 100644 --- a/pkg/backup/group_backupper_test.go +++ b/pkg/backup/group_backupper_test.go @@ -19,16 +19,17 @@ package backup import ( "testing" - "github.com/heptio/ark/pkg/client" - "github.com/heptio/ark/pkg/discovery" - "github.com/heptio/ark/pkg/podexec" - "github.com/heptio/ark/pkg/restic" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/heptio/ark/pkg/client" + "github.com/heptio/ark/pkg/discovery" + "github.com/heptio/ark/pkg/podexec" + "github.com/heptio/ark/pkg/restic" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestBackupGroupBacksUpCorrectResourcesInCorrectOrder(t *testing.T) { diff --git a/pkg/backup/item_backupper.go b/pkg/backup/item_backupper.go index 55df74c95..8a9489f1b 100644 --- a/pkg/backup/item_backupper.go +++ b/pkg/backup/item_backupper.go @@ -24,7 +24,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/backup/item_backupper_test.go b/pkg/backup/item_backupper_test.go index 505044198..ba9880cd5 100644 --- a/pkg/backup/item_backupper_test.go +++ b/pkg/backup/item_backupper_test.go @@ -24,12 +24,6 @@ import ( "testing" "time" - "github.com/heptio/ark/pkg/apis/ark/v1" - api "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/cloudprovider" - resticmocks "github.com/heptio/ark/pkg/restic/mocks" - "github.com/heptio/ark/pkg/util/collections" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" @@ -43,6 +37,13 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + + "github.com/heptio/ark/pkg/apis/ark/v1" + api "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/cloudprovider" + resticmocks "github.com/heptio/ark/pkg/restic/mocks" + "github.com/heptio/ark/pkg/util/collections" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestBackupItemSkips(t *testing.T) { diff --git a/pkg/backup/item_hook_handler.go b/pkg/backup/item_hook_handler.go index 552f72c07..1199861b5 100644 --- a/pkg/backup/item_hook_handler.go +++ b/pkg/backup/item_hook_handler.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/backup/item_hook_handler_test.go b/pkg/backup/item_hook_handler_test.go index 791aace7e..64f7ac3f1 100644 --- a/pkg/backup/item_hook_handler_test.go +++ b/pkg/backup/item_hook_handler_test.go @@ -21,9 +21,6 @@ import ( "testing" "time" - "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/util/collections" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" @@ -33,6 +30,10 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + + "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/util/collections" + arktest "github.com/heptio/ark/pkg/util/test" ) type mockItemHookHandler struct { diff --git a/pkg/backup/pod_action.go b/pkg/backup/pod_action.go index e4ce43087..50b6297f6 100644 --- a/pkg/backup/pod_action.go +++ b/pkg/backup/pod_action.go @@ -19,7 +19,6 @@ package backup import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/backup/pod_action_test.go b/pkg/backup/pod_action_test.go index 1a45454ac..88f0bcbe9 100644 --- a/pkg/backup/pod_action_test.go +++ b/pkg/backup/pod_action_test.go @@ -19,11 +19,12 @@ package backup import ( "testing" - "github.com/heptio/ark/pkg/kuberesource" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/runtime" + + "github.com/heptio/ark/pkg/kuberesource" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestPodActionAppliesTo(t *testing.T) { diff --git a/pkg/backup/resource_backupper.go b/pkg/backup/resource_backupper.go index c4bee425b..38475ec47 100644 --- a/pkg/backup/resource_backupper.go +++ b/pkg/backup/resource_backupper.go @@ -19,7 +19,6 @@ package backup import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/backup/resource_backupper_test.go b/pkg/backup/resource_backupper_test.go index f6c3a4f3e..dbf8c426f 100644 --- a/pkg/backup/resource_backupper_test.go +++ b/pkg/backup/resource_backupper_test.go @@ -19,6 +19,13 @@ package backup import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "github.com/heptio/ark/pkg/apis/ark/v1" "github.com/heptio/ark/pkg/client" "github.com/heptio/ark/pkg/discovery" @@ -27,12 +34,6 @@ import ( "github.com/heptio/ark/pkg/restic" "github.com/heptio/ark/pkg/util/collections" arktest "github.com/heptio/ark/pkg/util/test" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" ) func TestBackupResource(t *testing.T) { diff --git a/pkg/backup/service_account_action.go b/pkg/backup/service_account_action.go index badfafbd7..a6605e6a3 100644 --- a/pkg/backup/service_account_action.go +++ b/pkg/backup/service_account_action.go @@ -19,7 +19,6 @@ package backup import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - rbac "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/backup/service_account_action_test.go b/pkg/backup/service_account_action_test.go index ae5af9af2..bb33185ff 100644 --- a/pkg/backup/service_account_action_test.go +++ b/pkg/backup/service_account_action_test.go @@ -23,7 +23,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - rbac "k8s.io/api/rbac/v1" rbacbeta "k8s.io/api/rbac/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/client/client.go b/pkg/client/client.go index a4e406745..2d7a56c58 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -21,7 +21,6 @@ import ( "runtime" "github.com/pkg/errors" - "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" diff --git a/pkg/client/factory.go b/pkg/client/factory.go index 6dda5186c..860719b5e 100644 --- a/pkg/client/factory.go +++ b/pkg/client/factory.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/pflag" - "k8s.io/client-go/kubernetes" "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cloudprovider/aws/block_store.go b/pkg/cloudprovider/aws/block_store.go index 904735111..d637f9f4c 100644 --- a/pkg/cloudprovider/aws/block_store.go +++ b/pkg/cloudprovider/aws/block_store.go @@ -27,7 +27,6 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" diff --git a/pkg/cloudprovider/aws/block_store_test.go b/pkg/cloudprovider/aws/block_store_test.go index f92c5b39a..fbaafde1f 100644 --- a/pkg/cloudprovider/aws/block_store_test.go +++ b/pkg/cloudprovider/aws/block_store_test.go @@ -22,11 +22,11 @@ import ( "testing" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/heptio/ark/pkg/util/collections" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/heptio/ark/pkg/util/collections" ) func TestGetVolumeID(t *testing.T) { diff --git a/pkg/cloudprovider/aws/helpers.go b/pkg/cloudprovider/aws/helpers.go index 2bdda3d86..f45ec1e09 100644 --- a/pkg/cloudprovider/aws/helpers.go +++ b/pkg/cloudprovider/aws/helpers.go @@ -20,11 +20,10 @@ import ( "context" "net/url" - "github.com/pkg/errors" - "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3/s3manager" + "github.com/pkg/errors" ) // GetBucketRegion returns the AWS region that a bucket is in, or an error diff --git a/pkg/cloudprovider/azure/block_store.go b/pkg/cloudprovider/azure/block_store.go index 07ee82279..112a957b8 100644 --- a/pkg/cloudprovider/azure/block_store.go +++ b/pkg/cloudprovider/azure/block_store.go @@ -31,7 +31,6 @@ import ( "github.com/pkg/errors" "github.com/satori/uuid" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/runtime" "github.com/heptio/ark/pkg/cloudprovider" diff --git a/pkg/cloudprovider/azure/block_store_test.go b/pkg/cloudprovider/azure/block_store_test.go index 85e284914..6e51be3a2 100644 --- a/pkg/cloudprovider/azure/block_store_test.go +++ b/pkg/cloudprovider/azure/block_store_test.go @@ -19,11 +19,11 @@ package azure import ( "testing" - "github.com/heptio/ark/pkg/util/collections" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/heptio/ark/pkg/util/collections" ) func TestGetVolumeID(t *testing.T) { diff --git a/pkg/cloudprovider/gcp/block_store.go b/pkg/cloudprovider/gcp/block_store.go index 2d0bba57b..2320d5ec4 100644 --- a/pkg/cloudprovider/gcp/block_store.go +++ b/pkg/cloudprovider/gcp/block_store.go @@ -29,7 +29,6 @@ import ( "golang.org/x/oauth2/google" "google.golang.org/api/compute/v1" "google.golang.org/api/googleapi" - "k8s.io/apimachinery/pkg/runtime" "github.com/heptio/ark/pkg/cloudprovider" diff --git a/pkg/cloudprovider/gcp/block_store_test.go b/pkg/cloudprovider/gcp/block_store_test.go index 36e330dd0..79fbb4f6e 100644 --- a/pkg/cloudprovider/gcp/block_store_test.go +++ b/pkg/cloudprovider/gcp/block_store_test.go @@ -20,13 +20,12 @@ import ( "encoding/json" "testing" - "github.com/heptio/ark/pkg/util/collections" - arktest "github.com/heptio/ark/pkg/util/test" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/heptio/ark/pkg/util/collections" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestGetVolumeID(t *testing.T) { diff --git a/pkg/cloudprovider/gcp/object_store_test.go b/pkg/cloudprovider/gcp/object_store_test.go index 419a8d2ec..203695a17 100644 --- a/pkg/cloudprovider/gcp/object_store_test.go +++ b/pkg/cloudprovider/gcp/object_store_test.go @@ -21,8 +21,9 @@ import ( "strings" "testing" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" + + arktest "github.com/heptio/ark/pkg/util/test" ) type mockWriteCloser struct { diff --git a/pkg/cmd/cli/backup/create.go b/pkg/cmd/cli/backup/create.go index 2f32f8138..5dda4edd9 100644 --- a/pkg/cmd/cli/backup/create.go +++ b/pkg/cmd/cli/backup/create.go @@ -20,10 +20,8 @@ import ( "fmt" "time" - "github.com/heptio/ark/pkg/generated/informers/externalversions/ark/v1" "github.com/spf13/cobra" "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" @@ -33,6 +31,7 @@ import ( "github.com/heptio/ark/pkg/cmd/util/flag" "github.com/heptio/ark/pkg/cmd/util/output" arkclient "github.com/heptio/ark/pkg/generated/clientset/versioned" + "github.com/heptio/ark/pkg/generated/informers/externalversions/ark/v1" ) func NewCreateCommand(f client.Factory, use string) *cobra.Command { diff --git a/pkg/cmd/cli/backup/delete.go b/pkg/cmd/cli/backup/delete.go index ad58ec1e0..1ca2de406 100644 --- a/pkg/cmd/cli/backup/delete.go +++ b/pkg/cmd/cli/backup/delete.go @@ -21,7 +21,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" kubeerrs "k8s.io/apimachinery/pkg/util/errors" diff --git a/pkg/cmd/cli/backup/get.go b/pkg/cmd/cli/backup/get.go index ff2317a3a..916d59115 100644 --- a/pkg/cmd/cli/backup/get.go +++ b/pkg/cmd/cli/backup/get.go @@ -18,7 +18,6 @@ package backup import ( "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/backuplocation/create.go b/pkg/cmd/cli/backuplocation/create.go index d67a193b2..983715220 100644 --- a/pkg/cmd/cli/backuplocation/create.go +++ b/pkg/cmd/cli/backuplocation/create.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/backuplocation/get.go b/pkg/cmd/cli/backuplocation/get.go index 5573eea43..9cef3d3e6 100644 --- a/pkg/cmd/cli/backuplocation/get.go +++ b/pkg/cmd/cli/backuplocation/get.go @@ -18,7 +18,6 @@ package backuplocation import ( "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/bug/bug.go b/pkg/cmd/cli/bug/bug.go index 753f65006..6c12e86b2 100644 --- a/pkg/cmd/cli/bug/bug.go +++ b/pkg/cmd/cli/bug/bug.go @@ -28,9 +28,10 @@ import ( "text/template" "time" + "github.com/spf13/cobra" + "github.com/heptio/ark/pkg/buildinfo" "github.com/heptio/ark/pkg/cmd" - "github.com/spf13/cobra" ) const ( diff --git a/pkg/cmd/cli/client/client.go b/pkg/cmd/cli/client/client.go index c8d623227..a4fd303b4 100644 --- a/pkg/cmd/cli/client/client.go +++ b/pkg/cmd/cli/client/client.go @@ -17,8 +17,9 @@ limitations under the License. package client import ( - "github.com/heptio/ark/pkg/cmd/cli/client/config" "github.com/spf13/cobra" + + "github.com/heptio/ark/pkg/cmd/cli/client/config" ) func NewCommand() *cobra.Command { diff --git a/pkg/cmd/cli/client/config/get.go b/pkg/cmd/cli/client/config/get.go index ce6ccc658..a46a123f5 100644 --- a/pkg/cmd/cli/client/config/get.go +++ b/pkg/cmd/cli/client/config/get.go @@ -20,9 +20,10 @@ import ( "fmt" "sort" + "github.com/spf13/cobra" + "github.com/heptio/ark/pkg/client" "github.com/heptio/ark/pkg/cmd" - "github.com/spf13/cobra" ) func NewGetCommand() *cobra.Command { diff --git a/pkg/cmd/cli/client/config/set.go b/pkg/cmd/cli/client/config/set.go index dcfe6c2cf..85c6536eb 100644 --- a/pkg/cmd/cli/client/config/set.go +++ b/pkg/cmd/cli/client/config/set.go @@ -21,9 +21,10 @@ import ( "os" "strings" + "github.com/spf13/cobra" + "github.com/heptio/ark/pkg/client" "github.com/heptio/ark/pkg/cmd" - "github.com/spf13/cobra" ) func NewSetCommand() *cobra.Command { diff --git a/pkg/cmd/cli/completion/completion.go b/pkg/cmd/cli/completion/completion.go index ef904bb17..612047318 100644 --- a/pkg/cmd/cli/completion/completion.go +++ b/pkg/cmd/cli/completion/completion.go @@ -20,8 +20,9 @@ import ( "fmt" "os" - kubectlcmd "github.com/heptio/ark/third_party/kubernetes/pkg/kubectl/cmd" "github.com/spf13/cobra" + + kubectlcmd "github.com/heptio/ark/third_party/kubernetes/pkg/kubectl/cmd" ) func NewCommand() *cobra.Command { diff --git a/pkg/cmd/cli/delete_options.go b/pkg/cmd/cli/delete_options.go index 3600cfc03..d3807c057 100644 --- a/pkg/cmd/cli/delete_options.go +++ b/pkg/cmd/cli/delete_options.go @@ -23,12 +23,12 @@ import ( "os" "strings" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/heptio/ark/pkg/client" "github.com/heptio/ark/pkg/cmd/util/flag" clientset "github.com/heptio/ark/pkg/generated/clientset/versioned" - - "github.com/spf13/cobra" - "github.com/spf13/pflag" ) // DeleteOptions contains parameters used for deleting a restore. diff --git a/pkg/cmd/cli/plugin/add.go b/pkg/cmd/cli/plugin/add.go index 50b287be1..25c2aed8d 100644 --- a/pkg/cmd/cli/plugin/add.go +++ b/pkg/cmd/cli/plugin/add.go @@ -24,7 +24,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/cmd/cli/plugin/remove.go b/pkg/cmd/cli/plugin/remove.go index 5a43adb51..4f1b93b85 100644 --- a/pkg/cmd/cli/plugin/remove.go +++ b/pkg/cmd/cli/plugin/remove.go @@ -22,7 +22,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/cmd/cli/restic/repo/get.go b/pkg/cmd/cli/restic/repo/get.go index 844c0ace0..bb452fbcd 100644 --- a/pkg/cmd/cli/restic/repo/get.go +++ b/pkg/cmd/cli/restic/repo/get.go @@ -18,7 +18,6 @@ package repo import ( "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/restic/server.go b/pkg/cmd/cli/restic/server.go index d61e38063..9847e419c 100644 --- a/pkg/cmd/cli/restic/server.go +++ b/pkg/cmd/cli/restic/server.go @@ -25,7 +25,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeinformers "k8s.io/client-go/informers" corev1informers "k8s.io/client-go/informers/core/v1" diff --git a/pkg/cmd/cli/restore/create.go b/pkg/cmd/cli/restore/create.go index fc6c33bca..9a4e9e6f5 100644 --- a/pkg/cmd/cli/restore/create.go +++ b/pkg/cmd/cli/restore/create.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" diff --git a/pkg/cmd/cli/restore/delete.go b/pkg/cmd/cli/restore/delete.go index a8f6ac18b..824eacdc5 100644 --- a/pkg/cmd/cli/restore/delete.go +++ b/pkg/cmd/cli/restore/delete.go @@ -21,7 +21,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" kubeerrs "k8s.io/apimachinery/pkg/util/errors" diff --git a/pkg/cmd/cli/restore/get.go b/pkg/cmd/cli/restore/get.go index bc55aba2f..0472c59cd 100644 --- a/pkg/cmd/cli/restore/get.go +++ b/pkg/cmd/cli/restore/get.go @@ -17,9 +17,8 @@ limitations under the License. package restore import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" "github.com/heptio/ark/pkg/client" diff --git a/pkg/cmd/cli/restore/logs.go b/pkg/cmd/cli/restore/logs.go index c7281c03b..e7454b1c9 100644 --- a/pkg/cmd/cli/restore/logs.go +++ b/pkg/cmd/cli/restore/logs.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/schedule/create.go b/pkg/cmd/cli/schedule/create.go index 58d137bdd..91f7bda97 100644 --- a/pkg/cmd/cli/schedule/create.go +++ b/pkg/cmd/cli/schedule/create.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/schedule/delete.go b/pkg/cmd/cli/schedule/delete.go index 31f5e8c46..c05f1aba5 100644 --- a/pkg/cmd/cli/schedule/delete.go +++ b/pkg/cmd/cli/schedule/delete.go @@ -21,7 +21,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" kubeerrs "k8s.io/apimachinery/pkg/util/errors" diff --git a/pkg/cmd/cli/schedule/get.go b/pkg/cmd/cli/schedule/get.go index dc6e0ba98..dd6cd101d 100644 --- a/pkg/cmd/cli/schedule/get.go +++ b/pkg/cmd/cli/schedule/get.go @@ -18,7 +18,6 @@ package schedule import ( "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/snapshotlocation/create.go b/pkg/cmd/cli/snapshotlocation/create.go index 24a730f47..9f65ad594 100644 --- a/pkg/cmd/cli/snapshotlocation/create.go +++ b/pkg/cmd/cli/snapshotlocation/create.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/cli/snapshotlocation/get.go b/pkg/cmd/cli/snapshotlocation/get.go index 7b4108761..c890e3319 100644 --- a/pkg/cmd/cli/snapshotlocation/get.go +++ b/pkg/cmd/cli/snapshotlocation/get.go @@ -17,12 +17,13 @@ limitations under the License. package snapshotlocation import ( + "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + api "github.com/heptio/ark/pkg/apis/ark/v1" "github.com/heptio/ark/pkg/client" "github.com/heptio/ark/pkg/cmd" "github.com/heptio/ark/pkg/cmd/util/output" - "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func NewGetCommand(f client.Factory, use string) *cobra.Command { diff --git a/pkg/cmd/server/server.go b/pkg/cmd/server/server.go index f0c430db2..b78d4f373 100644 --- a/pkg/cmd/server/server.go +++ b/pkg/cmd/server/server.go @@ -33,7 +33,6 @@ import ( "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/cmd/server/server_test.go b/pkg/cmd/server/server_test.go index 4ad765492..791b91a0e 100644 --- a/pkg/cmd/server/server_test.go +++ b/pkg/cmd/server/server_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/util/downloadrequest/downloadrequest.go b/pkg/cmd/util/downloadrequest/downloadrequest.go index 04a306f02..ff400e2de 100644 --- a/pkg/cmd/util/downloadrequest/downloadrequest.go +++ b/pkg/cmd/util/downloadrequest/downloadrequest.go @@ -25,7 +25,6 @@ import ( "time" "github.com/pkg/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/cmd/util/downloadrequest/downloadrequest_test.go b/pkg/cmd/util/downloadrequest/downloadrequest_test.go index 0266a6a76..f46e19eba 100644 --- a/pkg/cmd/util/downloadrequest/downloadrequest_test.go +++ b/pkg/cmd/util/downloadrequest/downloadrequest_test.go @@ -26,14 +26,15 @@ import ( "testing" "time" - "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/generated/clientset/versioned/fake" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" core "k8s.io/client-go/testing" + + "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/generated/clientset/versioned/fake" ) func TestStream(t *testing.T) { diff --git a/pkg/cmd/util/output/backup_describer.go b/pkg/cmd/util/output/backup_describer.go index 38f58ef02..b3c566fd1 100644 --- a/pkg/cmd/util/output/backup_describer.go +++ b/pkg/cmd/util/output/backup_describer.go @@ -23,11 +23,12 @@ import ( "sort" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + arkv1api "github.com/heptio/ark/pkg/apis/ark/v1" "github.com/heptio/ark/pkg/cmd/util/downloadrequest" clientset "github.com/heptio/ark/pkg/generated/clientset/versioned" "github.com/heptio/ark/pkg/volume" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // DescribeBackup describes a backup in human-readable format. diff --git a/pkg/cmd/util/output/backup_printer_test.go b/pkg/cmd/util/output/backup_printer_test.go index e6d2870b7..0e08139d0 100644 --- a/pkg/cmd/util/output/backup_printer_test.go +++ b/pkg/cmd/util/output/backup_printer_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/cmd/util/output/output.go b/pkg/cmd/util/output/output.go index d1b377997..402d96402 100644 --- a/pkg/cmd/util/output/output.go +++ b/pkg/cmd/util/output/output.go @@ -24,7 +24,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/printers" diff --git a/pkg/cmd/util/output/restore_describer.go b/pkg/cmd/util/output/restore_describer.go index 876edbae5..3c30d2f76 100644 --- a/pkg/cmd/util/output/restore_describer.go +++ b/pkg/cmd/util/output/restore_describer.go @@ -22,10 +22,11 @@ import ( "sort" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/heptio/ark/pkg/apis/ark/v1" "github.com/heptio/ark/pkg/cmd/util/downloadrequest" clientset "github.com/heptio/ark/pkg/generated/clientset/versioned" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func DescribeRestore(restore *v1.Restore, podVolumeRestores []v1.PodVolumeRestore, details bool, arkClient clientset.Interface) string { diff --git a/pkg/controller/backup_controller.go b/pkg/controller/backup_controller.go index a0409d2d1..990c5915c 100644 --- a/pkg/controller/backup_controller.go +++ b/pkg/controller/backup_controller.go @@ -29,7 +29,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/sirupsen/logrus" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/clock" diff --git a/pkg/controller/backup_controller_test.go b/pkg/controller/backup_controller_test.go index 60b650829..537d53748 100644 --- a/pkg/controller/backup_controller_test.go +++ b/pkg/controller/backup_controller_test.go @@ -30,7 +30,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/clock" diff --git a/pkg/controller/backup_deletion_controller.go b/pkg/controller/backup_deletion_controller.go index 59e17ebbe..6e4f90f46 100644 --- a/pkg/controller/backup_deletion_controller.go +++ b/pkg/controller/backup_deletion_controller.go @@ -22,6 +22,16 @@ import ( "time" jsonpatch "github.com/evanphx/json-patch" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/clock" + kubeerrs "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/client-go/tools/cache" + "github.com/heptio/ark/pkg/apis/ark/v1" pkgbackup "github.com/heptio/ark/pkg/backup" "github.com/heptio/ark/pkg/cloudprovider" @@ -32,15 +42,6 @@ import ( "github.com/heptio/ark/pkg/plugin" "github.com/heptio/ark/pkg/restic" "github.com/heptio/ark/pkg/util/kube" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" - kubeerrs "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/client-go/tools/cache" ) const resticTimeout = time.Minute diff --git a/pkg/controller/backup_deletion_controller_test.go b/pkg/controller/backup_deletion_controller_test.go index 072d388f8..eed72aafa 100644 --- a/pkg/controller/backup_deletion_controller_test.go +++ b/pkg/controller/backup_deletion_controller_test.go @@ -25,7 +25,6 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/controller/backup_sync_controller.go b/pkg/controller/backup_sync_controller.go index ee85bff28..07c974424 100644 --- a/pkg/controller/backup_sync_controller.go +++ b/pkg/controller/backup_sync_controller.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - kuberrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/controller/backup_sync_controller_test.go b/pkg/controller/backup_sync_controller_test.go index 12c8688ee..516d2b2f0 100644 --- a/pkg/controller/backup_sync_controller_test.go +++ b/pkg/controller/backup_sync_controller_test.go @@ -24,7 +24,6 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/clock" diff --git a/pkg/controller/download_request_controller.go b/pkg/controller/download_request_controller.go index 4363e70b8..9c5ea495c 100644 --- a/pkg/controller/download_request_controller.go +++ b/pkg/controller/download_request_controller.go @@ -23,7 +23,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/controller/download_request_controller_test.go b/pkg/controller/download_request_controller_test.go index c08d42f34..7890e256c 100644 --- a/pkg/controller/download_request_controller_test.go +++ b/pkg/controller/download_request_controller_test.go @@ -23,7 +23,6 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/clock" diff --git a/pkg/controller/gc_controller.go b/pkg/controller/gc_controller.go index 95431227d..823b587a3 100644 --- a/pkg/controller/gc_controller.go +++ b/pkg/controller/gc_controller.go @@ -19,16 +19,15 @@ package controller import ( "time" - pkgbackup "github.com/heptio/ark/pkg/backup" "github.com/pkg/errors" "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/clock" "k8s.io/client-go/tools/cache" arkv1api "github.com/heptio/ark/pkg/apis/ark/v1" + pkgbackup "github.com/heptio/ark/pkg/backup" arkv1client "github.com/heptio/ark/pkg/generated/clientset/versioned/typed/ark/v1" informers "github.com/heptio/ark/pkg/generated/informers/externalversions/ark/v1" listers "github.com/heptio/ark/pkg/generated/listers/ark/v1" diff --git a/pkg/controller/gc_controller_test.go b/pkg/controller/gc_controller_test.go index 08868e272..8f90e29b6 100644 --- a/pkg/controller/gc_controller_test.go +++ b/pkg/controller/gc_controller_test.go @@ -26,7 +26,6 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" diff --git a/pkg/controller/generic_controller.go b/pkg/controller/generic_controller.go index 11ec624ca..49565628c 100644 --- a/pkg/controller/generic_controller.go +++ b/pkg/controller/generic_controller.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" diff --git a/pkg/controller/pod_volume_backup_controller.go b/pkg/controller/pod_volume_backup_controller.go index 7c87f8a16..8ef684549 100644 --- a/pkg/controller/pod_volume_backup_controller.go +++ b/pkg/controller/pod_volume_backup_controller.go @@ -26,7 +26,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" corev1informers "k8s.io/client-go/informers/core/v1" diff --git a/pkg/controller/pod_volume_backup_controller_test.go b/pkg/controller/pod_volume_backup_controller_test.go index 393ff4f8f..a2cf392ba 100644 --- a/pkg/controller/pod_volume_backup_controller_test.go +++ b/pkg/controller/pod_volume_backup_controller_test.go @@ -20,10 +20,10 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" arkv1api "github.com/heptio/ark/pkg/apis/ark/v1" arktest "github.com/heptio/ark/pkg/util/test" - "github.com/stretchr/testify/require" ) func TestPVBHandler(t *testing.T) { diff --git a/pkg/controller/pod_volume_restore_controller.go b/pkg/controller/pod_volume_restore_controller.go index 163a1d97e..046ac31c8 100644 --- a/pkg/controller/pod_volume_restore_controller.go +++ b/pkg/controller/pod_volume_restore_controller.go @@ -27,7 +27,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1api "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/controller/pod_volume_restore_controller_test.go b/pkg/controller/pod_volume_restore_controller_test.go index 98d74f475..e731dd77a 100644 --- a/pkg/controller/pod_volume_restore_controller_test.go +++ b/pkg/controller/pod_volume_restore_controller_test.go @@ -22,7 +22,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev1api "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/controller/restic_repository_controller.go b/pkg/controller/restic_repository_controller.go index 70982129a..9f550c8fa 100644 --- a/pkg/controller/restic_repository_controller.go +++ b/pkg/controller/restic_repository_controller.go @@ -23,7 +23,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/controller/restore_controller.go b/pkg/controller/restore_controller.go index 70c98d888..fdb1a4aa5 100644 --- a/pkg/controller/restore_controller.go +++ b/pkg/controller/restore_controller.go @@ -26,6 +26,14 @@ import ( "sort" jsonpatch "github.com/evanphx/json-patch" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/tools/cache" + api "github.com/heptio/ark/pkg/apis/ark/v1" arkv1client "github.com/heptio/ark/pkg/generated/clientset/versioned/typed/ark/v1" informers "github.com/heptio/ark/pkg/generated/informers/externalversions/ark/v1" @@ -37,13 +45,6 @@ import ( "github.com/heptio/ark/pkg/util/collections" kubeutil "github.com/heptio/ark/pkg/util/kube" "github.com/heptio/ark/pkg/util/logging" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/tools/cache" ) // nonRestorableResources is a blacklist for the restoration process. Any resources diff --git a/pkg/controller/restore_controller_test.go b/pkg/controller/restore_controller_test.go index a94052f9b..06fcb2e60 100644 --- a/pkg/controller/restore_controller_test.go +++ b/pkg/controller/restore_controller_test.go @@ -24,6 +24,16 @@ import ( "testing" "time" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + core "k8s.io/client-go/testing" + "k8s.io/client-go/tools/cache" + api "github.com/heptio/ark/pkg/apis/ark/v1" "github.com/heptio/ark/pkg/generated/clientset/versioned/fake" informers "github.com/heptio/ark/pkg/generated/informers/externalversions" @@ -37,15 +47,6 @@ import ( "github.com/heptio/ark/pkg/util/collections" arktest "github.com/heptio/ark/pkg/util/test" "github.com/heptio/ark/pkg/volume" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - core "k8s.io/client-go/testing" - "k8s.io/client-go/tools/cache" ) func TestFetchBackupInfo(t *testing.T) { diff --git a/pkg/controller/schedule_controller.go b/pkg/controller/schedule_controller.go index c68b2e81c..7312bf18b 100644 --- a/pkg/controller/schedule_controller.go +++ b/pkg/controller/schedule_controller.go @@ -25,7 +25,6 @@ import ( "github.com/pkg/errors" "github.com/robfig/cron" "github.com/sirupsen/logrus" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/controller/schedule_controller_test.go b/pkg/controller/schedule_controller_test.go index 67f55cdd1..aa7ac13f3 100644 --- a/pkg/controller/schedule_controller_test.go +++ b/pkg/controller/schedule_controller_test.go @@ -24,7 +24,6 @@ import ( "github.com/robfig/cron" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" diff --git a/pkg/discovery/helper.go b/pkg/discovery/helper.go index ba3d4592e..ca055a476 100644 --- a/pkg/discovery/helper.go +++ b/pkg/discovery/helper.go @@ -20,15 +20,15 @@ import ( "sort" "sync" - kcmdutil "github.com/heptio/ark/third_party/kubernetes/pkg/kubectl/cmd/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" "k8s.io/client-go/restmapper" + + kcmdutil "github.com/heptio/ark/third_party/kubernetes/pkg/kubectl/cmd/util" ) // Helper exposes functions for interacting with the Kubernetes discovery diff --git a/pkg/discovery/helper_test.go b/pkg/discovery/helper_test.go index 55d76d6d3..5a773dec4 100644 --- a/pkg/discovery/helper_test.go +++ b/pkg/discovery/helper_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/install/crd.go b/pkg/install/crd.go index 4c5b2ff1e..1ed643ce2 100644 --- a/pkg/install/crd.go +++ b/pkg/install/crd.go @@ -19,10 +19,10 @@ package install import ( "fmt" - arkv1 "github.com/heptio/ark/pkg/apis/ark/v1" - apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + arkv1 "github.com/heptio/ark/pkg/apis/ark/v1" ) // CRDs returns a list of the CRD types for all of the required Ark CRDs diff --git a/pkg/persistence/object_store.go b/pkg/persistence/object_store.go index 20ea657da..aacd9618c 100644 --- a/pkg/persistence/object_store.go +++ b/pkg/persistence/object_store.go @@ -27,7 +27,6 @@ import ( "github.com/pkg/errors" "github.com/satori/uuid" "github.com/sirupsen/logrus" - kerrors "k8s.io/apimachinery/pkg/util/errors" arkv1api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/persistence/object_store_test.go b/pkg/persistence/object_store_test.go index b58c2c66c..6d4bd0d3c 100644 --- a/pkg/persistence/object_store_test.go +++ b/pkg/persistence/object_store_test.go @@ -31,7 +31,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/plugin/backup_item_action.go b/pkg/plugin/backup_item_action.go index 3c789a06f..49c95a27a 100644 --- a/pkg/plugin/backup_item_action.go +++ b/pkg/plugin/backup_item_action.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "golang.org/x/net/context" "google.golang.org/grpc" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/plugin/backup_item_action_test.go b/pkg/plugin/backup_item_action_test.go index 1cfee94ce..d02b831c2 100644 --- a/pkg/plugin/backup_item_action_test.go +++ b/pkg/plugin/backup_item_action_test.go @@ -20,11 +20,6 @@ import ( "encoding/json" "testing" - "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/backup" - "github.com/heptio/ark/pkg/backup/mocks" - proto "github.com/heptio/ark/pkg/plugin/generated" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -32,6 +27,12 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + + "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/backup" + "github.com/heptio/ark/pkg/backup/mocks" + proto "github.com/heptio/ark/pkg/plugin/generated" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestBackupItemActionGRPCServerExecute(t *testing.T) { diff --git a/pkg/plugin/client_builder_test.go b/pkg/plugin/client_builder_test.go index 6cd179742..a782d6eb7 100644 --- a/pkg/plugin/client_builder_test.go +++ b/pkg/plugin/client_builder_test.go @@ -21,9 +21,10 @@ import ( "testing" hcplugin "github.com/hashicorp/go-plugin" - "github.com/heptio/ark/pkg/util/test" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + + "github.com/heptio/ark/pkg/util/test" ) func TestNewClientBuilder(t *testing.T) { diff --git a/pkg/plugin/client_dispenser_test.go b/pkg/plugin/client_dispenser_test.go index 67a8dbda1..68b7daa62 100644 --- a/pkg/plugin/client_dispenser_test.go +++ b/pkg/plugin/client_dispenser_test.go @@ -18,10 +18,11 @@ package plugin import ( "testing" - "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" + + "github.com/heptio/ark/pkg/util/test" ) type fakeClient struct { diff --git a/pkg/plugin/logger_test.go b/pkg/plugin/logger_test.go index 51193d6ce..e4c073904 100644 --- a/pkg/plugin/logger_test.go +++ b/pkg/plugin/logger_test.go @@ -18,9 +18,10 @@ package plugin import ( "testing" - "github.com/heptio/ark/pkg/util/logging" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + + "github.com/heptio/ark/pkg/util/logging" ) func TestNewLogger(t *testing.T) { diff --git a/pkg/plugin/logrus_adapter_test.go b/pkg/plugin/logrus_adapter_test.go index 6e394f8ee..c31fd4d4a 100644 --- a/pkg/plugin/logrus_adapter_test.go +++ b/pkg/plugin/logrus_adapter_test.go @@ -19,9 +19,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" ) func TestArgsToFields(t *testing.T) { diff --git a/pkg/plugin/manager_test.go b/pkg/plugin/manager_test.go index 6c9aa2fa5..524888eae 100644 --- a/pkg/plugin/manager_test.go +++ b/pkg/plugin/manager_test.go @@ -20,12 +20,13 @@ import ( "fmt" "testing" - "github.com/heptio/ark/pkg/util/test" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + + "github.com/heptio/ark/pkg/util/test" ) type mockRegistry struct { diff --git a/pkg/plugin/plugin_base_test.go b/pkg/plugin/plugin_base_test.go index 76a4b0860..6d7eab2c8 100644 --- a/pkg/plugin/plugin_base_test.go +++ b/pkg/plugin/plugin_base_test.go @@ -18,8 +18,9 @@ package plugin import ( "testing" - "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" + + "github.com/heptio/ark/pkg/util/test" ) func TestClientLogger(t *testing.T) { diff --git a/pkg/plugin/plugin_lister.go b/pkg/plugin/plugin_lister.go index 460a418c4..eea77c855 100644 --- a/pkg/plugin/plugin_lister.go +++ b/pkg/plugin/plugin_lister.go @@ -17,10 +17,11 @@ package plugin import ( plugin "github.com/hashicorp/go-plugin" - proto "github.com/heptio/ark/pkg/plugin/generated" "github.com/pkg/errors" "golang.org/x/net/context" "google.golang.org/grpc" + + proto "github.com/heptio/ark/pkg/plugin/generated" ) // PluginIdenitifer uniquely identifies a plugin by command, kind, and name. diff --git a/pkg/plugin/registry.go b/pkg/plugin/registry.go index 817e0d814..07d7879ea 100644 --- a/pkg/plugin/registry.go +++ b/pkg/plugin/registry.go @@ -20,9 +20,10 @@ import ( "os" "path/filepath" - "github.com/heptio/ark/pkg/util/filesystem" "github.com/pkg/errors" "github.com/sirupsen/logrus" + + "github.com/heptio/ark/pkg/util/filesystem" ) // Registry manages information about available plugins. diff --git a/pkg/plugin/registry_test.go b/pkg/plugin/registry_test.go index acbad1e43..e36ee03d5 100644 --- a/pkg/plugin/registry_test.go +++ b/pkg/plugin/registry_test.go @@ -20,10 +20,11 @@ import ( "sort" "testing" - "github.com/heptio/ark/pkg/util/test" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/heptio/ark/pkg/util/test" ) func TestNewRegistry(t *testing.T) { diff --git a/pkg/plugin/restartable_backup_item_action.go b/pkg/plugin/restartable_backup_item_action.go index c0b1fca99..4a8cca0a2 100644 --- a/pkg/plugin/restartable_backup_item_action.go +++ b/pkg/plugin/restartable_backup_item_action.go @@ -16,10 +16,11 @@ limitations under the License. package plugin import ( - api "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/backup" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/runtime" + + api "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/backup" ) // restartableBackupItemAction is a backup item action for a given implementation (such as "pod"). It is associated with diff --git a/pkg/plugin/restartable_backup_item_action_test.go b/pkg/plugin/restartable_backup_item_action_test.go index 20854191e..299be2b80 100644 --- a/pkg/plugin/restartable_backup_item_action_test.go +++ b/pkg/plugin/restartable_backup_item_action_test.go @@ -19,14 +19,15 @@ package plugin import ( "testing" - "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/backup" - "github.com/heptio/ark/pkg/backup/mocks" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" + + "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/backup" + "github.com/heptio/ark/pkg/backup/mocks" ) func TestRestartableGetBackupItemAction(t *testing.T) { diff --git a/pkg/plugin/restartable_block_store.go b/pkg/plugin/restartable_block_store.go index 188a02be0..533bcfae4 100644 --- a/pkg/plugin/restartable_block_store.go +++ b/pkg/plugin/restartable_block_store.go @@ -16,9 +16,10 @@ limitations under the License. package plugin import ( - "github.com/heptio/ark/pkg/cloudprovider" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/runtime" + + "github.com/heptio/ark/pkg/cloudprovider" ) // restartableBlockStore is an object store for a given implementation (such as "aws"). It is associated with diff --git a/pkg/plugin/restartable_block_store_test.go b/pkg/plugin/restartable_block_store_test.go index 16fd3f5fa..8fc3ac629 100644 --- a/pkg/plugin/restartable_block_store_test.go +++ b/pkg/plugin/restartable_block_store_test.go @@ -20,11 +20,12 @@ import ( "testing" "github.com/Azure/go-autorest/autorest/to" - "github.com/heptio/ark/pkg/cloudprovider/mocks" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/heptio/ark/pkg/cloudprovider/mocks" ) func TestRestartableGetBlockStore(t *testing.T) { diff --git a/pkg/plugin/restartable_object_store.go b/pkg/plugin/restartable_object_store.go index dc691a134..94bd155e2 100644 --- a/pkg/plugin/restartable_object_store.go +++ b/pkg/plugin/restartable_object_store.go @@ -19,8 +19,9 @@ import ( "io" "time" - "github.com/heptio/ark/pkg/cloudprovider" "github.com/pkg/errors" + + "github.com/heptio/ark/pkg/cloudprovider" ) // restartableObjectStore is an object store for a given implementation (such as "aws"). It is associated with diff --git a/pkg/plugin/restartable_restore_item_action.go b/pkg/plugin/restartable_restore_item_action.go index aa3fdb85d..d70caaacd 100644 --- a/pkg/plugin/restartable_restore_item_action.go +++ b/pkg/plugin/restartable_restore_item_action.go @@ -16,10 +16,11 @@ limitations under the License. package plugin import ( - api "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/restore" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/runtime" + + api "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/restore" ) // restartableRestoreItemAction is a restore item action for a given implementation (such as "pod"). It is associated with diff --git a/pkg/plugin/restartable_restore_item_action_test.go b/pkg/plugin/restartable_restore_item_action_test.go index 618faae44..a7960b707 100644 --- a/pkg/plugin/restartable_restore_item_action_test.go +++ b/pkg/plugin/restartable_restore_item_action_test.go @@ -19,13 +19,14 @@ package plugin import ( "testing" - "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/restore" - "github.com/heptio/ark/pkg/restore/mocks" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/restore" + "github.com/heptio/ark/pkg/restore/mocks" ) func TestRestartableGetRestoreItemAction(t *testing.T) { diff --git a/pkg/plugin/restore_item_action.go b/pkg/plugin/restore_item_action.go index dbf91eacf..5c6f8bfec 100644 --- a/pkg/plugin/restore_item_action.go +++ b/pkg/plugin/restore_item_action.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "golang.org/x/net/context" "google.golang.org/grpc" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/podexec/pod_command_executor.go b/pkg/podexec/pod_command_executor.go index bd1ac98fc..eaff18c93 100644 --- a/pkg/podexec/pod_command_executor.go +++ b/pkg/podexec/pod_command_executor.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - kapiv1 "k8s.io/api/core/v1" kscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" diff --git a/pkg/podexec/pod_command_executor_test.go b/pkg/podexec/pod_command_executor_test.go index b314a6d70..95f7921cb 100644 --- a/pkg/podexec/pod_command_executor_test.go +++ b/pkg/podexec/pod_command_executor_test.go @@ -24,8 +24,6 @@ import ( "testing" "time" - "github.com/heptio/ark/pkg/apis/ark/v1" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -34,6 +32,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/rest" "k8s.io/client-go/tools/remotecommand" + + "github.com/heptio/ark/pkg/apis/ark/v1" + arktest "github.com/heptio/ark/pkg/util/test" ) func TestNewPodCommandExecutor(t *testing.T) { diff --git a/pkg/restic/backupper.go b/pkg/restic/backupper.go index 4efc98a15..4a6aeaaa0 100644 --- a/pkg/restic/backupper.go +++ b/pkg/restic/backupper.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1api "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" diff --git a/pkg/restic/backupper_test.go b/pkg/restic/backupper_test.go index 662c67289..b91af9a5d 100644 --- a/pkg/restic/backupper_test.go +++ b/pkg/restic/backupper_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - corev1api "k8s.io/api/core/v1" ) diff --git a/pkg/restic/common.go b/pkg/restic/common.go index 41df3934f..f7c1a342f 100644 --- a/pkg/restic/common.go +++ b/pkg/restic/common.go @@ -23,7 +23,6 @@ import ( "time" "github.com/pkg/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" corev1listers "k8s.io/client-go/listers/core/v1" diff --git a/pkg/restic/common_test.go b/pkg/restic/common_test.go index 4fc9b2791..5b42ab1f5 100644 --- a/pkg/restic/common_test.go +++ b/pkg/restic/common_test.go @@ -20,10 +20,8 @@ import ( "sort" "testing" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" - + "github.com/stretchr/testify/require" corev1api "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1listers "k8s.io/client-go/listers/core/v1" diff --git a/pkg/restic/repository_ensurer.go b/pkg/restic/repository_ensurer.go index 012975140..3810c7ec2 100644 --- a/pkg/restic/repository_ensurer.go +++ b/pkg/restic/repository_ensurer.go @@ -23,7 +23,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/restic/repository_keys.go b/pkg/restic/repository_keys.go index 67a3144f1..34d2d9014 100644 --- a/pkg/restic/repository_keys.go +++ b/pkg/restic/repository_keys.go @@ -18,7 +18,6 @@ package restic import ( "github.com/pkg/errors" - corev1api "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/restic/repository_manager.go b/pkg/restic/repository_manager.go index f53c12f96..2505de20e 100644 --- a/pkg/restic/repository_manager.go +++ b/pkg/restic/repository_manager.go @@ -24,7 +24,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1listers "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" diff --git a/pkg/restic/restorer.go b/pkg/restic/restorer.go index ee0adddbd..9cf29a8ca 100644 --- a/pkg/restic/restorer.go +++ b/pkg/restic/restorer.go @@ -22,7 +22,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1api "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" diff --git a/pkg/restore/job_action.go b/pkg/restore/job_action.go index 22056cb27..a5229c4b0 100644 --- a/pkg/restore/job_action.go +++ b/pkg/restore/job_action.go @@ -18,7 +18,6 @@ package restore import ( "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/runtime" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/restore/job_action_test.go b/pkg/restore/job_action_test.go index f5c59ca38..238b067b2 100644 --- a/pkg/restore/job_action_test.go +++ b/pkg/restore/job_action_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "k8s.io/apimachinery/pkg/runtime" arktest "github.com/heptio/ark/pkg/util/test" diff --git a/pkg/restore/merge_service_account.go b/pkg/restore/merge_service_account.go index 21c1fac46..ae55bcf40 100644 --- a/pkg/restore/merge_service_account.go +++ b/pkg/restore/merge_service_account.go @@ -21,7 +21,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" - corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/pkg/restore/merge_service_account_test.go b/pkg/restore/merge_service_account_test.go index cb58c93c6..e3d425da9 100644 --- a/pkg/restore/merge_service_account_test.go +++ b/pkg/restore/merge_service_account_test.go @@ -21,7 +21,6 @@ import ( "unicode" "github.com/stretchr/testify/assert" - corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/pkg/restore/pod_action.go b/pkg/restore/pod_action.go index d74c5460d..858256631 100644 --- a/pkg/restore/pod_action.go +++ b/pkg/restore/pod_action.go @@ -20,7 +20,6 @@ import ( "strings" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/runtime" api "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/restore/pod_action_test.go b/pkg/restore/pod_action_test.go index c269a80e9..f32d94c42 100644 --- a/pkg/restore/pod_action_test.go +++ b/pkg/restore/pod_action_test.go @@ -19,10 +19,10 @@ package restore import ( "testing" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" - "k8s.io/apimachinery/pkg/runtime" + + arktest "github.com/heptio/ark/pkg/util/test" ) func TestPodActionExecute(t *testing.T) { diff --git a/pkg/restore/restic_restore_action.go b/pkg/restore/restic_restore_action.go index 9a5c33a66..45e4bfe81 100644 --- a/pkg/restore/restic_restore_action.go +++ b/pkg/restore/restic_restore_action.go @@ -21,7 +21,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/restore/restore.go b/pkg/restore/restore.go index 844b7faa6..c50b1adbe 100644 --- a/pkg/restore/restore.go +++ b/pkg/restore/restore.go @@ -32,7 +32,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/pkg/restore/restore_test.go b/pkg/restore/restore_test.go index c7ff2985c..b6a187ec4 100644 --- a/pkg/restore/restore_test.go +++ b/pkg/restore/restore_test.go @@ -21,16 +21,6 @@ import ( "testing" "time" - api "github.com/heptio/ark/pkg/apis/ark/v1" - "github.com/heptio/ark/pkg/cloudprovider" - cloudprovidermocks "github.com/heptio/ark/pkg/cloudprovider/mocks" - "github.com/heptio/ark/pkg/generated/clientset/versioned/fake" - informers "github.com/heptio/ark/pkg/generated/informers/externalversions" - "github.com/heptio/ark/pkg/kuberesource" - "github.com/heptio/ark/pkg/util/collections" - "github.com/heptio/ark/pkg/util/logging" - arktest "github.com/heptio/ark/pkg/util/test" - "github.com/heptio/ark/pkg/volume" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" @@ -47,6 +37,17 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes/scheme" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + + api "github.com/heptio/ark/pkg/apis/ark/v1" + "github.com/heptio/ark/pkg/cloudprovider" + cloudprovidermocks "github.com/heptio/ark/pkg/cloudprovider/mocks" + "github.com/heptio/ark/pkg/generated/clientset/versioned/fake" + informers "github.com/heptio/ark/pkg/generated/informers/externalversions" + "github.com/heptio/ark/pkg/kuberesource" + "github.com/heptio/ark/pkg/util/collections" + "github.com/heptio/ark/pkg/util/logging" + arktest "github.com/heptio/ark/pkg/util/test" + "github.com/heptio/ark/pkg/volume" ) func TestPrioritizeResources(t *testing.T) { diff --git a/pkg/restore/service_action.go b/pkg/restore/service_action.go index 98c1c9294..7c9b624cb 100644 --- a/pkg/restore/service_action.go +++ b/pkg/restore/service_action.go @@ -21,7 +21,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" - corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/restore/service_action_test.go b/pkg/restore/service_action_test.go index 7b9198756..cd4f0b2d1 100644 --- a/pkg/restore/service_action_test.go +++ b/pkg/restore/service_action_test.go @@ -20,11 +20,11 @@ import ( "encoding/json" "testing" - arktest "github.com/heptio/ark/pkg/util/test" "github.com/stretchr/testify/assert" - corev1api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" + + arktest "github.com/heptio/ark/pkg/util/test" ) func svcJSON(ports ...corev1api.ServicePort) string { diff --git a/pkg/util/collections/includes_excludes.go b/pkg/util/collections/includes_excludes.go index 21df19491..fea38a17e 100644 --- a/pkg/util/collections/includes_excludes.go +++ b/pkg/util/collections/includes_excludes.go @@ -20,7 +20,6 @@ import ( "strings" "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/util/sets" ) diff --git a/pkg/util/collections/includes_excludes_test.go b/pkg/util/collections/includes_excludes_test.go index 905314dad..9a7e37d46 100644 --- a/pkg/util/collections/includes_excludes_test.go +++ b/pkg/util/collections/includes_excludes_test.go @@ -19,9 +19,8 @@ package collections import ( "testing" - "github.com/stretchr/testify/assert" - "github.com/pkg/errors" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/util/encode/encode.go b/pkg/util/encode/encode.go index fa7c44b8e..2842127ab 100644 --- a/pkg/util/encode/encode.go +++ b/pkg/util/encode/encode.go @@ -22,7 +22,6 @@ import ( "io" "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/runtime" "github.com/heptio/ark/pkg/apis/ark/v1" diff --git a/pkg/util/kube/utils.go b/pkg/util/kube/utils.go index 8a504a967..0e2643729 100644 --- a/pkg/util/kube/utils.go +++ b/pkg/util/kube/utils.go @@ -20,7 +20,6 @@ import ( "fmt" "github.com/pkg/errors" - corev1api "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/util/test/comparisons.go b/pkg/util/test/comparisons.go index d6daf9cf3..ad2c2adc5 100644 --- a/pkg/util/test/comparisons.go +++ b/pkg/util/test/comparisons.go @@ -24,11 +24,9 @@ import ( "testing" "time" - "k8s.io/apimachinery/pkg/api/equality" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - + "k8s.io/apimachinery/pkg/api/equality" core "k8s.io/client-go/testing" ) diff --git a/pkg/util/test/fake_dynamic.go b/pkg/util/test/fake_dynamic.go index 30cce4ae9..1a95be5d1 100644 --- a/pkg/util/test/fake_dynamic.go +++ b/pkg/util/test/fake_dynamic.go @@ -18,7 +18,6 @@ package test import ( "github.com/stretchr/testify/mock" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/third_party/kubernetes/pkg/kubectl/cmd/util/shortcut_expander.go b/third_party/kubernetes/pkg/kubectl/cmd/util/shortcut_expander.go index 780b00dde..63b063a22 100644 --- a/third_party/kubernetes/pkg/kubectl/cmd/util/shortcut_expander.go +++ b/third_party/kubernetes/pkg/kubectl/cmd/util/shortcut_expander.go @@ -21,7 +21,6 @@ import ( "strings" "github.com/sirupsen/logrus" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery"