Skip to content

Commit

Permalink
*: format imports
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Kuznetsov <[email protected]>
  • Loading branch information
stevekuznetsov committed Feb 6, 2025
1 parent 2a8a61c commit 2ade564
Show file tree
Hide file tree
Showing 300 changed files with 776 additions and 371 deletions.
1 change: 1 addition & 0 deletions cmd/aro/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/Azure/go-autorest/tracing"
"github.com/sirupsen/logrus"

kmetrics "k8s.io/client-go/tools/metrics"

"github.com/Azure/ARO-RP/pkg/database"
Expand Down
4 changes: 3 additions & 1 deletion cmd/aro/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import (
"flag"
"fmt"

machinev1 "github.com/openshift/api/machine/v1"
"github.com/sirupsen/logrus"

"k8s.io/client-go/discovery"
"k8s.io/client-go/kubernetes"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"

machinev1 "github.com/openshift/api/machine/v1"

"github.com/Azure/ARO-RP/pkg/env"
pkgoperator "github.com/Azure/ARO-RP/pkg/operator"
"github.com/Azure/ARO-RP/pkg/operator/controllers/alertwebhook"
Expand Down
1 change: 1 addition & 0 deletions cmd/aro/rp.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/Azure/go-autorest/tracing"
"github.com/sirupsen/logrus"

kmetrics "k8s.io/client-go/tools/metrics"

"github.com/Azure/ARO-RP/pkg/api"
Expand Down
1 change: 1 addition & 0 deletions hack/gendevconfig/gendevconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"

"github.com/sirupsen/logrus"

"sigs.k8s.io/yaml"

"github.com/Azure/ARO-RP/pkg/deploy"
Expand Down
4 changes: 3 additions & 1 deletion hack/gendiscoverycache/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import (
"os"
"path/filepath"

configclient "github.com/openshift/client-go/config/clientset/versioned"
"github.com/sirupsen/logrus"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

configclient "github.com/openshift/client-go/config/clientset/versioned"

utillog "github.com/Azure/ARO-RP/pkg/util/log"
"github.com/Azure/ARO-RP/pkg/util/version"
)
Expand Down
4 changes: 3 additions & 1 deletion hack/role/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ import (

"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
sdkauthorization "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
cloudcredentialv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1"
"github.com/sirupsen/logrus"

"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/yaml"

cloudcredentialv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1"

"github.com/Azure/ARO-RP/pkg/env"
"github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/armauthorization"
"github.com/Azure/ARO-RP/pkg/util/version"
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/acrtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/Azure/go-autorest/autorest/date"

corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
3 changes: 2 additions & 1 deletion pkg/cluster/arooperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"context"
"fmt"

cloudcredentialv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

cloudcredentialv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1"
)

var (
Expand Down
10 changes: 6 additions & 4 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/msi-dataplane/pkg/dataplane"
"github.com/sirupsen/logrus"

extensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"

configclient "github.com/openshift/client-go/config/clientset/versioned"
imageregistryclient "github.com/openshift/client-go/imageregistry/clientset/versioned"
machineclient "github.com/openshift/client-go/machine/clientset/versioned"
operatorclient "github.com/openshift/client-go/operator/clientset/versioned"
samplesclient "github.com/openshift/client-go/samples/clientset/versioned"
securityclient "github.com/openshift/client-go/security/clientset/versioned"
mcoclient "github.com/openshift/machine-config-operator/pkg/generated/clientset/versioned"
"github.com/sirupsen/logrus"
extensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/cluster/graph"
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/clusterserviceprincipal.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"

mgmtauthorization "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization"

corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
6 changes: 4 additions & 2 deletions pkg/cluster/clusterserviceprincipal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import (
mgmtauthorization "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization"
mgmtfeatures "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/features"
"github.com/Azure/go-autorest/autorest/to"
operatorv1 "github.com/openshift/api/operator/v1"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
"github.com/sirupsen/logrus"
"go.uber.org/mock/gomock"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -25,6 +24,9 @@ import (
ktesting "k8s.io/client-go/testing"
"sigs.k8s.io/yaml"

operatorv1 "github.com/openshift/api/operator/v1"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/util/arm"
mock_authorization "github.com/Azure/ARO-RP/pkg/util/mocks/azureclient/mgmt/authorization"
Expand Down
3 changes: 2 additions & 1 deletion pkg/cluster/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
"errors"
"time"

configv1 "github.com/openshift/api/config/v1"
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

configv1 "github.com/openshift/api/config/v1"

"github.com/Azure/ARO-RP/pkg/util/clusteroperators"
)

Expand Down
16 changes: 9 additions & 7 deletions pkg/cluster/condition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ import (
"time"

"github.com/Azure/go-autorest/autorest/to"
configv1 "github.com/openshift/api/config/v1"
machinev1beta1 "github.com/openshift/api/machine/v1beta1"
operatorv1 "github.com/openshift/api/operator/v1"
configfake "github.com/openshift/client-go/config/clientset/versioned/fake"
machinefake "github.com/openshift/client-go/machine/clientset/versioned/fake"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
cloudcredentialv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1"
"github.com/sirupsen/logrus"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -27,6 +21,14 @@ import (
"k8s.io/client-go/kubernetes/scheme"
ktesting "k8s.io/client-go/testing"

configv1 "github.com/openshift/api/config/v1"
machinev1beta1 "github.com/openshift/api/machine/v1beta1"
operatorv1 "github.com/openshift/api/operator/v1"
configfake "github.com/openshift/client-go/config/clientset/versioned/fake"
machinefake "github.com/openshift/client-go/machine/clientset/versioned/fake"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
cloudcredentialv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1"

"github.com/Azure/ARO-RP/pkg/api"
utilerror "github.com/Azure/ARO-RP/test/util/error"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/cluster/consolebranding.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ package cluster
import (
"context"

operatorv1 "github.com/openshift/api/operator/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/util/retry"

operatorv1 "github.com/openshift/api/operator/v1"
)

const consoleConfigResourceName string = "cluster"
Expand Down
6 changes: 4 additions & 2 deletions pkg/cluster/consolebranding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import (
"context"
"testing"

operatorv1 "github.com/openshift/api/operator/v1"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
"github.com/sirupsen/logrus"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

operatorv1 "github.com/openshift/api/operator/v1"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
)

func TestUpdateConsoleBranding(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
mgmtfeatures "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/features"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"

"k8s.io/apimachinery/pkg/util/wait"

"github.com/Azure/ARO-RP/pkg/api"
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/api"
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/deploybaseresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"

utilrand "k8s.io/apimachinery/pkg/util/rand"
"k8s.io/apimachinery/pkg/util/wait"

Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/deploybaseresources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

utilrand "k8s.io/apimachinery/pkg/util/rand"
"k8s.io/utils/ptr"

Expand Down
4 changes: 3 additions & 1 deletion pkg/cluster/disableupdates.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import (
"strings"

"github.com/coreos/go-semver/semver"
configv1 "github.com/openshift/api/config/v1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/util/retry"

configv1 "github.com/openshift/api/config/v1"
)

func (m *manager) disableUpdates(ctx context.Context) error {
Expand Down
6 changes: 4 additions & 2 deletions pkg/cluster/disableupdates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import (
"context"
"testing"

configv1 "github.com/openshift/api/config/v1"
configfake "github.com/openshift/client-go/config/clientset/versioned/fake"
"go.uber.org/mock/gomock"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

configv1 "github.com/openshift/api/config/v1"
configfake "github.com/openshift/client-go/config/clientset/versioned/fake"

"github.com/Azure/ARO-RP/pkg/api"
mock_env "github.com/Azure/ARO-RP/pkg/util/mocks/env"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/ensureendpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/api"
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/fixmcscert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"testing"

"go.uber.org/mock/gomock"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kruntime "k8s.io/apimachinery/pkg/runtime"
Expand Down
4 changes: 3 additions & 1 deletion pkg/cluster/fixmcsuserdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ import (
"net/url"
"strings"

machinev1beta1 "github.com/openshift/api/machine/v1beta1"
"github.com/ugorji/go/codec"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/util/retry"

machinev1beta1 "github.com/openshift/api/machine/v1beta1"

"github.com/Azure/ARO-RP/pkg/api"
_ "github.com/Azure/ARO-RP/pkg/util/scheme"
)
Expand Down
5 changes: 3 additions & 2 deletions pkg/cluster/fixmcsuserdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"reflect"
"testing"

machinev1beta1 "github.com/openshift/api/machine/v1beta1"
machinefake "github.com/openshift/client-go/machine/clientset/versioned/fake"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kruntime "k8s.io/apimachinery/pkg/runtime"
Expand All @@ -20,6 +18,9 @@ import (
kjson "k8s.io/apimachinery/pkg/runtime/serializer/json"
"k8s.io/client-go/kubernetes/fake"

machinev1beta1 "github.com/openshift/api/machine/v1beta1"
machinefake "github.com/openshift/client-go/machine/clientset/versioned/fake"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/util/cmp"
testlog "github.com/Azure/ARO-RP/test/util/log"
Expand Down
5 changes: 3 additions & 2 deletions pkg/cluster/gatherlogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import (
"io"
"strings"

configv1 "github.com/openshift/api/config/v1"
operatorv1 "github.com/openshift/api/operator/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

configv1 "github.com/openshift/api/config/v1"
operatorv1 "github.com/openshift/api/operator/v1"

"github.com/Azure/ARO-RP/pkg/cluster/failurediagnostics"
"github.com/Azure/ARO-RP/pkg/util/steps"
)
Expand Down
12 changes: 7 additions & 5 deletions pkg/cluster/gatherlogs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ import (

"github.com/onsi/gomega"
"github.com/onsi/gomega/types"
configv1 "github.com/openshift/api/config/v1"
operatorv1 "github.com/openshift/api/operator/v1"
configfake "github.com/openshift/client-go/config/clientset/versioned/fake"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kruntime "k8s.io/apimachinery/pkg/runtime"
kubernetesfake "k8s.io/client-go/kubernetes/fake"

configv1 "github.com/openshift/api/config/v1"
operatorv1 "github.com/openshift/api/operator/v1"
configfake "github.com/openshift/client-go/config/clientset/versioned/fake"
operatorfake "github.com/openshift/client-go/operator/clientset/versioned/fake"
hivev1 "github.com/openshift/hive/apis/hive/v1"

"github.com/Azure/ARO-RP/pkg/api"
mock_hive "github.com/Azure/ARO-RP/pkg/util/mocks/hive"
utilerror "github.com/Azure/ARO-RP/test/util/error"
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/hive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/sirupsen/logrus"
"go.uber.org/mock/gomock"

corev1 "k8s.io/api/core/v1"

"github.com/Azure/ARO-RP/pkg/api"
Expand Down
Loading

0 comments on commit 2ade564

Please sign in to comment.