File tree 17 files changed +20
-40
lines changed
bridge/crunchybridgecluster
17 files changed +20
-40
lines changed Original file line number Diff line number Diff line change 3
3
linters :
4
4
disable :
5
5
- contextcheck
6
- - gci
7
6
- gofumpt
8
7
enable :
9
- - depguard
10
8
- goheader
11
- - gomodguard
12
9
- gosimple
13
10
- importas
14
11
- misspell
15
12
- unconvert
16
13
presets :
17
14
- bugs
18
15
- format
16
+ - import
19
17
- unused
20
18
21
19
linters-settings :
@@ -61,6 +59,12 @@ linters-settings:
61
59
exhaustive :
62
60
default-signifies-exhaustive : true
63
61
62
+ gci :
63
+ sections :
64
+ - standard
65
+ - default
66
+ - localmodule
67
+
64
68
goheader :
65
69
template : |-
66
70
Copyright {{ DATES }} Crunchy Data Solutions, Inc.
@@ -70,9 +74,6 @@ linters-settings:
70
74
regexp :
71
75
DATES : ' ((201[7-9]|202[0-4]) - 2025|2025)'
72
76
73
- goimports :
74
- local-prefixes : github.com/crunchydata/postgres-operator
75
-
76
77
gomodguard :
77
78
blocked :
78
79
modules :
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import (
13
13
14
14
"github.com/crunchydata/postgres-operator/internal/bridge"
15
15
"github.com/crunchydata/postgres-operator/internal/initialize"
16
-
17
16
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
18
17
)
19
18
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
11
11
"github.com/pkg/errors"
12
12
corev1 "k8s.io/api/core/v1"
13
13
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14
-
15
14
ctrl "sigs.k8s.io/controller-runtime"
16
15
"sigs.k8s.io/controller-runtime/pkg/client"
17
16
Original file line number Diff line number Diff line change @@ -8,12 +8,11 @@ import (
8
8
"context"
9
9
"testing"
10
10
11
- "sigs.k8s.io/controller-runtime/pkg/client"
12
-
13
11
"gotest.tools/v3/assert"
14
12
corev1 "k8s.io/api/core/v1"
15
13
apierrors "k8s.io/apimachinery/pkg/api/errors"
16
14
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
15
+ "sigs.k8s.io/controller-runtime/pkg/client"
17
16
18
17
"github.com/crunchydata/postgres-operator/internal/bridge"
19
18
"github.com/crunchydata/postgres-operator/internal/testing/require"
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import (
14
14
. "github.com/onsi/gomega"
15
15
. "github.com/onsi/gomega/gstruct"
16
16
"github.com/pkg/errors" //nolint:depguard // This legacy test covers so much code, it logs the origin of unexpected errors.
17
-
18
17
"gotest.tools/v3/assert"
19
18
appsv1 "k8s.io/api/apps/v1"
20
19
corev1 "k8s.io/api/core/v1"
Original file line number Diff line number Diff line change @@ -10,15 +10,14 @@ import (
10
10
"strings"
11
11
"time"
12
12
13
+ volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
13
14
"github.com/pkg/errors"
14
15
batchv1 "k8s.io/api/batch/v1"
15
16
corev1 "k8s.io/api/core/v1"
16
17
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
17
18
"k8s.io/apimachinery/pkg/labels"
18
19
"sigs.k8s.io/controller-runtime/pkg/client"
19
20
20
- volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
21
-
22
21
"github.com/crunchydata/postgres-operator/internal/config"
23
22
"github.com/crunchydata/postgres-operator/internal/feature"
24
23
"github.com/crunchydata/postgres-operator/internal/initialize"
Original file line number Diff line number Diff line change 9
9
"testing"
10
10
"time"
11
11
12
+ volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
12
13
"gotest.tools/v3/assert"
13
14
appsv1 "k8s.io/api/apps/v1"
14
15
batchv1 "k8s.io/api/batch/v1"
@@ -27,8 +28,6 @@ import (
27
28
"github.com/crunchydata/postgres-operator/internal/testing/events"
28
29
"github.com/crunchydata/postgres-operator/internal/testing/require"
29
30
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
30
-
31
- volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
32
31
)
33
32
34
33
func TestReconcileVolumeSnapshots (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -14,9 +14,6 @@ import (
14
14
. "github.com/onsi/gomega"
15
15
"k8s.io/apimachinery/pkg/util/version"
16
16
"k8s.io/client-go/discovery"
17
-
18
- // Google Kubernetes Engine / Google Cloud Platform authentication provider
19
- _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
20
17
"k8s.io/client-go/rest"
21
18
"sigs.k8s.io/controller-runtime/pkg/client"
22
19
"sigs.k8s.io/controller-runtime/pkg/log"
Original file line number Diff line number Diff line change 5
5
package runtime
6
6
7
7
import (
8
+ volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
8
9
"k8s.io/apimachinery/pkg/runtime"
9
10
"k8s.io/client-go/kubernetes/scheme"
10
11
"k8s.io/client-go/rest"
@@ -15,8 +16,6 @@ import (
15
16
16
17
"github.com/crunchydata/postgres-operator/internal/logging"
17
18
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
18
-
19
- volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
20
19
)
21
20
22
21
type (
Original file line number Diff line number Diff line change @@ -14,9 +14,8 @@ import (
14
14
"strconv"
15
15
"strings"
16
16
17
- corev1 "k8s.io/api/core/v1"
18
-
19
17
"github.com/pkg/errors"
18
+ corev1 "k8s.io/api/core/v1"
20
19
21
20
"github.com/crunchydata/postgres-operator/internal/collector"
22
21
"github.com/crunchydata/postgres-operator/internal/initialize"
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ package standalone_pgadmin
7
7
import (
8
8
"context"
9
9
10
+ "k8s.io/apimachinery/pkg/labels"
11
+ "sigs.k8s.io/controller-runtime/pkg/client"
12
+
10
13
"github.com/crunchydata/postgres-operator/internal/initialize"
11
14
"github.com/crunchydata/postgres-operator/internal/naming"
12
15
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
13
-
14
- "k8s.io/apimachinery/pkg/labels"
15
- "sigs.k8s.io/controller-runtime/pkg/client"
16
16
)
17
17
18
18
//+kubebuilder:rbac:groups="postgres-operator.crunchydata.com",resources="pgadmins",verbs={list}
Original file line number Diff line number Diff line change @@ -7,16 +7,14 @@ package standalone_pgadmin
7
7
import (
8
8
"context"
9
9
10
+ "github.com/pkg/errors"
10
11
corev1 "k8s.io/api/core/v1"
12
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
11
13
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
12
14
"k8s.io/apimachinery/pkg/types"
13
15
"k8s.io/apimachinery/pkg/util/intstr"
14
16
"sigs.k8s.io/controller-runtime/pkg/client"
15
17
16
- apierrors "k8s.io/apimachinery/pkg/api/errors"
17
-
18
- "github.com/pkg/errors"
19
-
20
18
"github.com/crunchydata/postgres-operator/internal/logging"
21
19
"github.com/crunchydata/postgres-operator/internal/naming"
22
20
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
Original file line number Diff line number Diff line change @@ -7,14 +7,13 @@ package standalone_pgadmin
7
7
import (
8
8
"context"
9
9
10
+ "github.com/pkg/errors"
10
11
appsv1 "k8s.io/api/apps/v1"
11
12
corev1 "k8s.io/api/core/v1"
12
13
apierrors "k8s.io/apimachinery/pkg/api/errors"
13
14
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14
15
"sigs.k8s.io/controller-runtime/pkg/client"
15
16
16
- "github.com/pkg/errors"
17
-
18
17
"github.com/crunchydata/postgres-operator/internal/collector"
19
18
"github.com/crunchydata/postgres-operator/internal/controller/postgrescluster"
20
19
"github.com/crunchydata/postgres-operator/internal/initialize"
Original file line number Diff line number Diff line change @@ -7,14 +7,13 @@ package standalone_pgadmin
7
7
import (
8
8
"context"
9
9
10
+ "github.com/pkg/errors"
10
11
corev1 "k8s.io/api/core/v1"
11
12
apierrors "k8s.io/apimachinery/pkg/api/errors"
12
13
"k8s.io/apimachinery/pkg/api/meta"
13
14
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14
15
"k8s.io/apimachinery/pkg/util/validation/field"
15
16
16
- "github.com/pkg/errors"
17
-
18
17
"github.com/crunchydata/postgres-operator/internal/naming"
19
18
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
20
19
)
Original file line number Diff line number Diff line change @@ -13,12 +13,10 @@ import (
13
13
"testing"
14
14
15
15
"gotest.tools/v3/assert"
16
- "k8s.io/apimachinery/pkg/api/resource"
17
-
18
16
corev1 "k8s.io/api/core/v1"
17
+ "k8s.io/apimachinery/pkg/api/resource"
19
18
20
19
"github.com/crunchydata/postgres-operator/internal/testing/require"
21
-
22
20
"github.com/crunchydata/postgres-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
23
21
)
24
22
Original file line number Diff line number Diff line change 5
5
package password
6
6
7
7
import (
8
-
9
8
// #nosec G501
10
9
"crypto/md5"
11
10
"errors"
Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ import (
15
15
corev1 "k8s.io/api/core/v1"
16
16
"k8s.io/apimachinery/pkg/util/uuid"
17
17
18
- // Google Kubernetes Engine / Google Cloud Platform authentication provider
19
- _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
20
-
21
18
"github.com/crunchydata/postgres-operator/internal/feature"
22
19
"github.com/crunchydata/postgres-operator/internal/kubernetes"
23
20
"github.com/crunchydata/postgres-operator/internal/naming"
You can’t perform that action at this time.
0 commit comments