Skip to content

Commit 32cc445

Browse files
authored
K8SPG-862 module github.com/percona/percona-postgresql-operator/v2 (#1308)
1 parent 3f7f7fc commit 32cc445

File tree

222 files changed

+738
-740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+738
-740
lines changed

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ linters:
5454
desc: Should be used only in tests.
5555
- pkg: testing/*
5656
desc: The "testing" packages should be used only in tests.
57-
- pkg: github.com/percona/percona-postgresql-operator/internal/testing/*
57+
- pkg: github.com/percona/percona-postgresql-operator/v2/internal/testing/*
5858
desc: The "internal/testing" packages should be used only in tests.
5959
tests:
6060
files:

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ pipeline {
498498
-e GO111MODULE=on \
499499
golang:1.25.1 sh -c '
500500
go install github.com/google/go-licenses@latest;
501-
/go/bin/go-licenses csv github.com/percona/percona-postgresql-operator/cmd/postgres-operator \
501+
/go/bin/go-licenses csv github.com/percona/percona-postgresql-operator/v2/cmd/postgres-operator \
502502
| cut -d , -f 3 \
503503
| sort -u \
504504
> go-licenses-new || :

cmd/extension-installer/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"path"
99

10-
"github.com/percona/percona-postgresql-operator/percona/extensions"
10+
"github.com/percona/percona-postgresql-operator/v2/percona/extensions"
1111
)
1212

1313
func main() {

cmd/postgres-operator/main.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ import (
2727
"sigs.k8s.io/controller-runtime/pkg/log/zap"
2828
"sigs.k8s.io/controller-runtime/pkg/manager"
2929

30-
"github.com/percona/percona-postgresql-operator/internal/controller/pgupgrade"
31-
"github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster"
32-
"github.com/percona/percona-postgresql-operator/internal/controller/runtime"
33-
"github.com/percona/percona-postgresql-operator/internal/controller/standalone_pgadmin"
34-
"github.com/percona/percona-postgresql-operator/internal/feature"
35-
"github.com/percona/percona-postgresql-operator/internal/initialize"
36-
"github.com/percona/percona-postgresql-operator/internal/logging"
37-
"github.com/percona/percona-postgresql-operator/internal/naming"
38-
"github.com/percona/percona-postgresql-operator/internal/upgradecheck"
39-
perconaController "github.com/percona/percona-postgresql-operator/percona/controller"
40-
"github.com/percona/percona-postgresql-operator/percona/controller/pgbackup"
41-
"github.com/percona/percona-postgresql-operator/percona/controller/pgcluster"
42-
"github.com/percona/percona-postgresql-operator/percona/controller/pgrestore"
43-
perconaPGUpgrade "github.com/percona/percona-postgresql-operator/percona/controller/pgupgrade"
44-
perconaRuntime "github.com/percona/percona-postgresql-operator/percona/runtime"
45-
"github.com/percona/percona-postgresql-operator/percona/utils/registry"
46-
v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2"
47-
"github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
30+
"github.com/percona/percona-postgresql-operator/v2/internal/controller/pgupgrade"
31+
"github.com/percona/percona-postgresql-operator/v2/internal/controller/postgrescluster"
32+
"github.com/percona/percona-postgresql-operator/v2/internal/controller/runtime"
33+
"github.com/percona/percona-postgresql-operator/v2/internal/controller/standalone_pgadmin"
34+
"github.com/percona/percona-postgresql-operator/v2/internal/feature"
35+
"github.com/percona/percona-postgresql-operator/v2/internal/initialize"
36+
"github.com/percona/percona-postgresql-operator/v2/internal/logging"
37+
"github.com/percona/percona-postgresql-operator/v2/internal/naming"
38+
"github.com/percona/percona-postgresql-operator/v2/internal/upgradecheck"
39+
perconaController "github.com/percona/percona-postgresql-operator/v2/percona/controller"
40+
"github.com/percona/percona-postgresql-operator/v2/percona/controller/pgbackup"
41+
"github.com/percona/percona-postgresql-operator/v2/percona/controller/pgcluster"
42+
"github.com/percona/percona-postgresql-operator/v2/percona/controller/pgrestore"
43+
perconaPGUpgrade "github.com/percona/percona-postgresql-operator/v2/percona/controller/pgupgrade"
44+
perconaRuntime "github.com/percona/percona-postgresql-operator/v2/percona/runtime"
45+
"github.com/percona/percona-postgresql-operator/v2/percona/utils/registry"
46+
v2 "github.com/percona/percona-postgresql-operator/v2/pkg/apis/pgv2.percona.com/v2"
47+
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
4848
)
4949

5050
var (

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/percona/percona-postgresql-operator
1+
module github.com/percona/percona-postgresql-operator/v2
22

33
go 1.25.1
44

internal/bridge/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"k8s.io/apimachinery/pkg/util/uuid"
2121
"k8s.io/apimachinery/pkg/util/wait"
2222

23-
"github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
23+
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
2424
)
2525

2626
const defaultAPI = "https://api.crunchybridge.com"

internal/bridge/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"gotest.tools/v3/assert"
2020
"k8s.io/apimachinery/pkg/util/intstr"
2121

22-
"github.com/percona/percona-postgresql-operator/internal/initialize"
22+
"github.com/percona/percona-postgresql-operator/v2/internal/initialize"
2323
)
2424

2525
var testApiKey = "9012"

internal/bridge/crunchybridgecluster/crunchybridgecluster_controller.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ import (
2121
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
2222
"sigs.k8s.io/controller-runtime/pkg/event"
2323

24-
"github.com/percona/percona-postgresql-operator/internal/bridge"
25-
"github.com/percona/percona-postgresql-operator/internal/controller/runtime"
26-
pgoRuntime "github.com/percona/percona-postgresql-operator/internal/controller/runtime"
27-
"github.com/percona/percona-postgresql-operator/internal/naming"
28-
"github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
24+
"github.com/percona/percona-postgresql-operator/v2/internal/bridge"
25+
pgoRuntime "github.com/percona/percona-postgresql-operator/v2/internal/controller/runtime"
26+
"github.com/percona/percona-postgresql-operator/v2/internal/naming"
27+
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
2928
)
3029

3130
// CrunchyBridgeClusterReconciler reconciles a CrunchyBridgeCluster object
@@ -223,7 +222,7 @@ func (r *CrunchyBridgeClusterReconciler) Reconcile(ctx context.Context, req ctrl
223222
// TODO(crunchybridgecluster): Do we want the operator to interrupt
224223
// upgrades created through the GUI/API?
225224
if len(crunchybridgecluster.Status.OngoingUpgrade) != 0 {
226-
return runtime.RequeueWithoutBackoff(3 * time.Minute), nil
225+
return pgoRuntime.RequeueWithoutBackoff(3 * time.Minute), nil
227226
}
228227

229228
// Check if there's an upgrade difference for the three upgradeable fields that hit the upgrade endpoint
@@ -253,7 +252,7 @@ func (r *CrunchyBridgeClusterReconciler) Reconcile(ctx context.Context, req ctrl
253252
log.Info("Reconciled")
254253
// TODO(crunchybridgecluster): do we always want to requeue? Does the Watch mean we
255254
// don't need this, or do we want both?
256-
return runtime.RequeueWithoutBackoff(3 * time.Minute), nil
255+
return pgoRuntime.RequeueWithoutBackoff(3 * time.Minute), nil
257256
}
258257

259258
// reconcileBridgeConnectionSecret looks for the Bridge connection secret specified by the cluster,
@@ -403,7 +402,7 @@ func (r *CrunchyBridgeClusterReconciler) handleCreateCluster(ctx context.Context
403402
Message: "The condition of the upgrade(s) is unknown.",
404403
})
405404

406-
return runtime.RequeueWithoutBackoff(3 * time.Minute)
405+
return pgoRuntime.RequeueWithoutBackoff(3 * time.Minute)
407406
}
408407

409408
// handleGetCluster handles getting the cluster details from Bridge and
@@ -564,7 +563,7 @@ func (r *CrunchyBridgeClusterReconciler) handleUpgrade(ctx context.Context,
564563
})
565564
}
566565

567-
return runtime.RequeueWithoutBackoff(3 * time.Minute)
566+
return pgoRuntime.RequeueWithoutBackoff(3 * time.Minute)
568567
}
569568

570569
// handleUpgradeHA handles upgrades that hit the
@@ -611,7 +610,7 @@ func (r *CrunchyBridgeClusterReconciler) handleUpgradeHA(ctx context.Context,
611610
})
612611
}
613612

614-
return runtime.RequeueWithoutBackoff(3 * time.Minute)
613+
return pgoRuntime.RequeueWithoutBackoff(3 * time.Minute)
615614
}
616615

617616
// handleUpdate handles upgrades that hit the "PATCH /clusters/<id>" endpoint
@@ -656,7 +655,7 @@ func (r *CrunchyBridgeClusterReconciler) handleUpdate(ctx context.Context,
656655
clusterUpdate.ClusterName, *clusterUpdate.IsProtected),
657656
})
658657

659-
return runtime.RequeueWithoutBackoff(3 * time.Minute)
658+
return pgoRuntime.RequeueWithoutBackoff(3 * time.Minute)
660659
}
661660

662661
// GetSecretKeys gets the secret and returns the expected API key and team id

internal/bridge/crunchybridgecluster/crunchybridgecluster_controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import (
1919
ctrl "sigs.k8s.io/controller-runtime"
2020
"sigs.k8s.io/controller-runtime/pkg/client"
2121

22-
"github.com/percona/percona-postgresql-operator/internal/bridge"
23-
"github.com/percona/percona-postgresql-operator/internal/initialize"
24-
"github.com/percona/percona-postgresql-operator/internal/naming"
25-
"github.com/percona/percona-postgresql-operator/internal/testing/cmp"
26-
"github.com/percona/percona-postgresql-operator/internal/testing/require"
27-
"github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
22+
"github.com/percona/percona-postgresql-operator/v2/internal/bridge"
23+
"github.com/percona/percona-postgresql-operator/v2/internal/initialize"
24+
"github.com/percona/percona-postgresql-operator/v2/internal/naming"
25+
"github.com/percona/percona-postgresql-operator/v2/internal/testing/cmp"
26+
"github.com/percona/percona-postgresql-operator/v2/internal/testing/require"
27+
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
2828
)
2929

3030
var testTeamId = "5678"

internal/bridge/crunchybridgecluster/delete.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
ctrl "sigs.k8s.io/controller-runtime"
1212
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
1313

14-
"github.com/percona/percona-postgresql-operator/internal/controller/runtime"
15-
"github.com/percona/percona-postgresql-operator/internal/initialize"
16-
"github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
14+
"github.com/percona/percona-postgresql-operator/v2/internal/controller/runtime"
15+
"github.com/percona/percona-postgresql-operator/v2/internal/initialize"
16+
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/postgres-operator.crunchydata.com/v1beta1"
1717
)
1818

1919
const finalizer = "crunchybridgecluster.postgres-operator.crunchydata.com/finalizer"

0 commit comments

Comments
 (0)