diff --git a/.golangci.yaml b/.golangci.yaml index 7cc7df8727..6c4f40826c 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -23,7 +23,7 @@ linters-settings: sections: - standard - default - - prefix(github.com/percona) + - prefix(github.com/superfly) depguard: rules: @@ -43,14 +43,14 @@ linters-settings: - pkg: testing/* desc: The "testing" packages should be used only in tests. - - pkg: github.com/percona/percona-postgresql-operator/internal/testing/* + - pkg: github.com/superfly/percona-postgresql-operator/internal/testing/* desc: The "internal/testing" packages should be used only in tests. exhaustive: default-signifies-exhaustive: true goimports: - local-prefixes: github.com/percona/percona-postgresql-operator + local-prefixes: github.com/superfly/percona-postgresql-operator gomodguard: blocked: diff --git a/cmd/extension-installer/main.go b/cmd/extension-installer/main.go index 5045e608eb..9f07a529c4 100644 --- a/cmd/extension-installer/main.go +++ b/cmd/extension-installer/main.go @@ -7,7 +7,7 @@ import ( "os" "path" - "github.com/percona/percona-postgresql-operator/percona/extensions" + "github.com/superfly/percona-postgresql-operator/percona/extensions" ) func main() { diff --git a/cmd/pgbackrest-server/main.go b/cmd/pgbackrest-server/main.go new file mode 100644 index 0000000000..46895a478c --- /dev/null +++ b/cmd/pgbackrest-server/main.go @@ -0,0 +1,25 @@ +package pgbackrestserver + +import ( + "fmt" + "net/http" + + "github.com/gorilla/mux" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest-server/api" +) + +func main() { + r := mux.NewRouter() + r = r.PathPrefix("/pgbackrest").Subrouter() + + // Endpoints + r.HandleFunc("/info", api.InfoCommandHandler).Methods("POST") + r.HandleFunc("/backup", api.BackupCommandHandler).Methods("POST") + r.HandleFunc("/restore", api.RestoreCommandHandler).Methods("POST") + + http.Handle("/", r) + err := http.ListenAndServe(":4422", nil) + if err != nil { + panic(fmt.Sprintf("server failed: %v", err)) + } +} diff --git a/cmd/postgres-operator/main.go b/cmd/postgres-operator/main.go index f43069e8a7..2830b6aec7 100644 --- a/cmd/postgres-operator/main.go +++ b/cmd/postgres-operator/main.go @@ -26,25 +26,25 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/controller/pgupgrade" - "github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/controller/standalone_pgadmin" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/upgradecheck" - perconaController "github.com/percona/percona-postgresql-operator/percona/controller" - "github.com/percona/percona-postgresql-operator/percona/controller/pgbackup" - "github.com/percona/percona-postgresql-operator/percona/controller/pgcluster" - "github.com/percona/percona-postgresql-operator/percona/controller/pgrestore" - perconaPGUpgrade "github.com/percona/percona-postgresql-operator/percona/controller/pgupgrade" - "github.com/percona/percona-postgresql-operator/percona/k8s" - perconaRuntime "github.com/percona/percona-postgresql-operator/percona/runtime" - "github.com/percona/percona-postgresql-operator/percona/utils/registry" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/pgupgrade" + "github.com/superfly/percona-postgresql-operator/internal/controller/postgrescluster" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/controller/standalone_pgadmin" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/upgradecheck" + perconaController "github.com/superfly/percona-postgresql-operator/percona/controller" + "github.com/superfly/percona-postgresql-operator/percona/controller/pgbackup" + "github.com/superfly/percona-postgresql-operator/percona/controller/pgcluster" + "github.com/superfly/percona-postgresql-operator/percona/controller/pgrestore" + perconaPGUpgrade "github.com/superfly/percona-postgresql-operator/percona/controller/pgupgrade" + "github.com/superfly/percona-postgresql-operator/percona/k8s" + perconaRuntime "github.com/superfly/percona-postgresql-operator/percona/runtime" + "github.com/superfly/percona-postgresql-operator/percona/utils/registry" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var versionString string diff --git a/go.mod b/go.mod index cc97744484..32bfb23694 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/percona/percona-postgresql-operator +module github.com/superfly/percona-postgresql-operator go 1.23.4 @@ -12,6 +12,8 @@ require ( github.com/go-openapi/validate v0.24.0 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 + github.com/gorilla/mux v1.8.1 + github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-version v1.7.0 github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0 github.com/onsi/ginkgo/v2 v2.22.2 diff --git a/go.sum b/go.sum index 04f91a588a..b409acf2aa 100644 --- a/go.sum +++ b/go.sum @@ -105,12 +105,16 @@ github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/Z github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= diff --git a/internal/bridge/client.go b/internal/bridge/client.go index 81d066124f..b54c9053f0 100644 --- a/internal/bridge/client.go +++ b/internal/bridge/client.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const defaultAPI = "https://api.crunchybridge.com" diff --git a/internal/bridge/client_test.go b/internal/bridge/client_test.go index 6b4455f764..cf17ecd1b9 100644 --- a/internal/bridge/client_test.go +++ b/internal/bridge/client_test.go @@ -19,7 +19,7 @@ import ( "gotest.tools/v3/assert" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/initialize" ) var testApiKey = "9012" diff --git a/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller.go b/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller.go index fbbdab045f..226f6f181f 100644 --- a/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller.go +++ b/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller.go @@ -21,11 +21,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/event" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - pgoRuntime "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + pgoRuntime "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // CrunchyBridgeClusterReconciler reconciles a CrunchyBridgeCluster object diff --git a/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller_test.go b/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller_test.go index b1a6791799..f45bf9617f 100644 --- a/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller_test.go +++ b/internal/bridge/crunchybridgecluster/crunchybridgecluster_controller_test.go @@ -19,12 +19,12 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var testTeamId = "5678" diff --git a/internal/bridge/crunchybridgecluster/delete.go b/internal/bridge/crunchybridgecluster/delete.go index 0749e38654..96ab4a9e47 100644 --- a/internal/bridge/crunchybridgecluster/delete.go +++ b/internal/bridge/crunchybridgecluster/delete.go @@ -11,9 +11,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const finalizer = "crunchybridgecluster.postgres-operator.crunchydata.com/finalizer" diff --git a/internal/bridge/crunchybridgecluster/delete_test.go b/internal/bridge/crunchybridgecluster/delete_test.go index 543881c7bc..b669e399cf 100644 --- a/internal/bridge/crunchybridgecluster/delete_test.go +++ b/internal/bridge/crunchybridgecluster/delete_test.go @@ -14,8 +14,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) func TestHandleDeleteCluster(t *testing.T) { diff --git a/internal/bridge/crunchybridgecluster/helpers_test.go b/internal/bridge/crunchybridgecluster/helpers_test.go index ad14b32751..e53de3fc82 100644 --- a/internal/bridge/crunchybridgecluster/helpers_test.go +++ b/internal/bridge/crunchybridgecluster/helpers_test.go @@ -17,10 +17,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // Scale extends d according to PGO_TEST_TIMEOUT_SCALE. diff --git a/internal/bridge/crunchybridgecluster/mock_bridge_api.go b/internal/bridge/crunchybridgecluster/mock_bridge_api.go index 081bb60a47..a3889f5225 100644 --- a/internal/bridge/crunchybridgecluster/mock_bridge_api.go +++ b/internal/bridge/crunchybridgecluster/mock_bridge_api.go @@ -11,10 +11,10 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) type TestBridgeClient struct { diff --git a/internal/bridge/crunchybridgecluster/postgres.go b/internal/bridge/crunchybridgecluster/postgres.go index 36e88c17e5..212e719a47 100644 --- a/internal/bridge/crunchybridgecluster/postgres.go +++ b/internal/bridge/crunchybridgecluster/postgres.go @@ -15,9 +15,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // generatePostgresRoleSecret returns a Secret containing a password and diff --git a/internal/bridge/crunchybridgecluster/postgres_test.go b/internal/bridge/crunchybridgecluster/postgres_test.go index be462e997b..81144bff4a 100644 --- a/internal/bridge/crunchybridgecluster/postgres_test.go +++ b/internal/bridge/crunchybridgecluster/postgres_test.go @@ -15,9 +15,9 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/bridge" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/bridge" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGeneratePostgresRoleSecret(t *testing.T) { diff --git a/internal/bridge/crunchybridgecluster/watches.go b/internal/bridge/crunchybridgecluster/watches.go index 3774a0a211..4eeade3edf 100644 --- a/internal/bridge/crunchybridgecluster/watches.go +++ b/internal/bridge/crunchybridgecluster/watches.go @@ -14,7 +14,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // watchForRelatedSecret handles create/update/delete events for secrets, diff --git a/internal/bridge/crunchybridgecluster/watches_test.go b/internal/bridge/crunchybridgecluster/watches_test.go index 02f5215fdf..e0565fdf65 100644 --- a/internal/bridge/crunchybridgecluster/watches_test.go +++ b/internal/bridge/crunchybridgecluster/watches_test.go @@ -12,7 +12,7 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) func TestFindCrunchyBridgeClustersForSecret(t *testing.T) { diff --git a/internal/bridge/installation.go b/internal/bridge/installation.go index 3e8fdf4e17..3d23b2e07d 100644 --- a/internal/bridge/installation.go +++ b/internal/bridge/installation.go @@ -25,9 +25,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" ) // self is a singleton Installation. See [InstallationReconciler]. diff --git a/internal/bridge/installation_test.go b/internal/bridge/installation_test.go index 73511d6017..6732489b49 100644 --- a/internal/bridge/installation_test.go +++ b/internal/bridge/installation_test.go @@ -20,8 +20,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func TestExtractSecretContract(t *testing.T) { diff --git a/internal/config/config.go b/internal/config/config.go index 9b02d0d6ee..4bb3910c66 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,7 +8,7 @@ import ( "fmt" "os" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // defaultFromEnv reads the environment variable key when value is empty. diff --git a/internal/config/config_test.go b/internal/config/config_test.go index ab9cf02818..f2bdb632de 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -11,7 +11,7 @@ import ( "gotest.tools/v3/assert" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestFetchKeyCommand(t *testing.T) { diff --git a/internal/controller/pgupgrade/jobs.go b/internal/controller/pgupgrade/jobs.go index 3194fbfc1c..32402f95ee 100644 --- a/internal/controller/pgupgrade/jobs.go +++ b/internal/controller/pgupgrade/jobs.go @@ -15,8 +15,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // Upgrade job diff --git a/internal/controller/pgupgrade/jobs_test.go b/internal/controller/pgupgrade/jobs_test.go index 077bf55963..70e420503b 100644 --- a/internal/controller/pgupgrade/jobs_test.go +++ b/internal/controller/pgupgrade/jobs_test.go @@ -16,9 +16,9 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGenerateUpgradeJob(t *testing.T) { diff --git a/internal/controller/pgupgrade/labels.go b/internal/controller/pgupgrade/labels.go index a5eda21d7a..1e6aa1d35a 100644 --- a/internal/controller/pgupgrade/labels.go +++ b/internal/controller/pgupgrade/labels.go @@ -5,7 +5,7 @@ package pgupgrade import ( - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/controller/pgupgrade/pgupgrade_controller.go b/internal/controller/pgupgrade/pgupgrade_controller.go index 4c2ba30724..9872e270c8 100644 --- a/internal/controller/pgupgrade/pgupgrade_controller.go +++ b/internal/controller/pgupgrade/pgupgrade_controller.go @@ -21,10 +21,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/registration" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/registration" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/controller/pgupgrade/registration.go b/internal/controller/pgupgrade/registration.go index 4d24e1debb..2e35c994ec 100644 --- a/internal/controller/pgupgrade/registration.go +++ b/internal/controller/pgupgrade/registration.go @@ -7,8 +7,8 @@ package pgupgrade import ( "k8s.io/apimachinery/pkg/api/meta" - "github.com/percona/percona-postgresql-operator/internal/registration" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/registration" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func (r *PGUpgradeReconciler) UpgradeAuthorized(upgrade *v1beta1.PGUpgrade) bool { diff --git a/internal/controller/pgupgrade/registration_test.go b/internal/controller/pgupgrade/registration_test.go index 82b583f69e..9ed86c94f5 100644 --- a/internal/controller/pgupgrade/registration_test.go +++ b/internal/controller/pgupgrade/registration_test.go @@ -13,11 +13,11 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/registration" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/registration" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestUpgradeAuthorized(t *testing.T) { diff --git a/internal/controller/pgupgrade/utils.go b/internal/controller/pgupgrade/utils.go index fddd12a76d..f582c46fdc 100644 --- a/internal/controller/pgupgrade/utils.go +++ b/internal/controller/pgupgrade/utils.go @@ -12,8 +12,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // The owner reference created by controllerutil.SetControllerReference blocks diff --git a/internal/controller/pgupgrade/world.go b/internal/controller/pgupgrade/world.go index e38c8bea82..fe74ec50fd 100644 --- a/internal/controller/pgupgrade/world.go +++ b/internal/controller/pgupgrade/world.go @@ -15,7 +15,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // The client used by the controller sets up a cache and an informer for any GVK diff --git a/internal/controller/pgupgrade/world_test.go b/internal/controller/pgupgrade/world_test.go index f73e8b319f..8d3ea67b98 100644 --- a/internal/controller/pgupgrade/world_test.go +++ b/internal/controller/pgupgrade/world_test.go @@ -15,8 +15,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPopulateCluster(t *testing.T) { diff --git a/internal/controller/postgrescluster/apply.go b/internal/controller/postgrescluster/apply.go index 33bf0cd9ca..9d877b7f5a 100644 --- a/internal/controller/postgrescluster/apply.go +++ b/internal/controller/postgrescluster/apply.go @@ -12,7 +12,7 @@ import ( "k8s.io/apimachinery/pkg/api/equality" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/kubeapi" + "github.com/superfly/percona-postgresql-operator/internal/kubeapi" ) // apply sends an apply patch to object's endpoint in the Kubernetes API and diff --git a/internal/controller/postgrescluster/apply_test.go b/internal/controller/postgrescluster/apply_test.go index 639458bd9d..493cd554b7 100644 --- a/internal/controller/postgrescluster/apply_test.go +++ b/internal/controller/postgrescluster/apply_test.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) func TestServerSideApply(t *testing.T) { diff --git a/internal/controller/postgrescluster/cluster.go b/internal/controller/postgrescluster/cluster.go index 54fda70bc5..6b5a927ae8 100644 --- a/internal/controller/postgrescluster/cluster.go +++ b/internal/controller/postgrescluster/cluster.go @@ -15,12 +15,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/patroni" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/patroni" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="",resources="configmaps",verbs={create,patch} diff --git a/internal/controller/postgrescluster/cluster_test.go b/internal/controller/postgrescluster/cluster_test.go index eb905e28b7..a129145d28 100644 --- a/internal/controller/postgrescluster/cluster_test.go +++ b/internal/controller/postgrescluster/cluster_test.go @@ -23,11 +23,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var gvks = []schema.GroupVersionKind{{ diff --git a/internal/controller/postgrescluster/controller.go b/internal/controller/postgrescluster/controller.go index da3c3a95dc..1a8427a697 100644 --- a/internal/controller/postgrescluster/controller.go +++ b/internal/controller/postgrescluster/controller.go @@ -30,21 +30,21 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/pgaudit" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/pgbouncer" - "github.com/percona/percona-postgresql-operator/internal/pgmonitor" - "github.com/percona/percona-postgresql-operator/internal/pgstatmonitor" - "github.com/percona/percona-postgresql-operator/internal/pgstatstatements" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/pmm" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/internal/registration" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/pgaudit" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/pgbouncer" + "github.com/superfly/percona-postgresql-operator/internal/pgmonitor" + "github.com/superfly/percona-postgresql-operator/internal/pgstatmonitor" + "github.com/superfly/percona-postgresql-operator/internal/pgstatstatements" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/pmm" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/registration" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/controller/postgrescluster/controller_ref_manager.go b/internal/controller/postgrescluster/controller_ref_manager.go index ec15ec364a..2be5f23585 100644 --- a/internal/controller/postgrescluster/controller_ref_manager.go +++ b/internal/controller/postgrescluster/controller_ref_manager.go @@ -17,10 +17,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/kubeapi" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/kubeapi" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // adoptObject adopts the provided Object by adding controller owner refs for the provided diff --git a/internal/controller/postgrescluster/controller_ref_manager_test.go b/internal/controller/postgrescluster/controller_ref_manager_test.go index 3355936718..9e01dd3e0f 100644 --- a/internal/controller/postgrescluster/controller_ref_manager_test.go +++ b/internal/controller/postgrescluster/controller_ref_manager_test.go @@ -13,8 +13,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) func TestManageControllerRefs(t *testing.T) { diff --git a/internal/controller/postgrescluster/controller_test.go b/internal/controller/postgrescluster/controller_test.go index 2093cde091..cce2c29401 100644 --- a/internal/controller/postgrescluster/controller_test.go +++ b/internal/controller/postgrescluster/controller_test.go @@ -29,10 +29,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/registration" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/registration" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestDeleteControlled(t *testing.T) { diff --git a/internal/controller/postgrescluster/delete.go b/internal/controller/postgrescluster/delete.go index 95246475f5..c7ee8fc4a5 100644 --- a/internal/controller/postgrescluster/delete.go +++ b/internal/controller/postgrescluster/delete.go @@ -12,8 +12,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="postgres-operator.crunchydata.com",resources="postgresclusters",verbs={patch} diff --git a/internal/controller/postgrescluster/helpers_test.go b/internal/controller/postgrescluster/helpers_test.go index e507dfb87c..cb393c3566 100644 --- a/internal/controller/postgrescluster/helpers_test.go +++ b/internal/controller/postgrescluster/helpers_test.go @@ -20,11 +20,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var ( diff --git a/internal/controller/postgrescluster/instance.go b/internal/controller/postgrescluster/instance.go index ee616a0395..a62b41b62f 100644 --- a/internal/controller/postgrescluster/instance.go +++ b/internal/controller/postgrescluster/instance.go @@ -27,17 +27,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/patroni" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/patroni" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // Instance represents a single PostgreSQL instance of a PostgresCluster. diff --git a/internal/controller/postgrescluster/instance_rollout_test.go b/internal/controller/postgrescluster/instance_rollout_test.go index d2cb1605de..53d5d5cd2d 100644 --- a/internal/controller/postgrescluster/instance_rollout_test.go +++ b/internal/controller/postgrescluster/instance_rollout_test.go @@ -23,10 +23,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestReconcilerRolloutInstance(t *testing.T) { diff --git a/internal/controller/postgrescluster/instance_test.go b/internal/controller/postgrescluster/instance_test.go index c4067ad303..38d212d074 100644 --- a/internal/controller/postgrescluster/instance_test.go +++ b/internal/controller/postgrescluster/instance_test.go @@ -34,14 +34,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestInstanceIsRunning(t *testing.T) { diff --git a/internal/controller/postgrescluster/patroni.go b/internal/controller/postgrescluster/patroni.go index 2f5456d05f..fb5bb673f6 100644 --- a/internal/controller/postgrescluster/patroni.go +++ b/internal/controller/postgrescluster/patroni.go @@ -16,13 +16,13 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/patroni" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/patroni" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="",resources="endpoints",verbs={deletecollection} diff --git a/internal/controller/postgrescluster/patroni_test.go b/internal/controller/postgrescluster/patroni_test.go index 3351b199b3..0c4edda2ca 100644 --- a/internal/controller/postgrescluster/patroni_test.go +++ b/internal/controller/postgrescluster/patroni_test.go @@ -24,11 +24,11 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGeneratePatroniLeaderLeaseService(t *testing.T) { diff --git a/internal/controller/postgrescluster/pgadmin.go b/internal/controller/postgrescluster/pgadmin.go index d4e16767f4..db9c341796 100644 --- a/internal/controller/postgrescluster/pgadmin.go +++ b/internal/controller/postgrescluster/pgadmin.go @@ -18,13 +18,13 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgadmin" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgadmin" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // reconcilePGAdmin writes the objects necessary to run a pgAdmin Pod. diff --git a/internal/controller/postgrescluster/pgadmin_test.go b/internal/controller/postgrescluster/pgadmin_test.go index a52752c5c3..f58aa50337 100644 --- a/internal/controller/postgrescluster/pgadmin_test.go +++ b/internal/controller/postgrescluster/pgadmin_test.go @@ -21,11 +21,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGeneratePGAdminConfigMap(t *testing.T) { diff --git a/internal/controller/postgrescluster/pgbackrest.go b/internal/controller/postgrescluster/pgbackrest.go index e0290c7fc3..d9c544d55a 100644 --- a/internal/controller/postgrescluster/pgbackrest.go +++ b/internal/controller/postgrescluster/pgbackrest.go @@ -32,17 +32,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/patroni" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/patroni" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/controller/postgrescluster/pgbackrest_test.go b/internal/controller/postgrescluster/pgbackrest_test.go index 88b331bb9e..84bf1bd58e 100644 --- a/internal/controller/postgrescluster/pgbackrest_test.go +++ b/internal/controller/postgrescluster/pgbackrest_test.go @@ -38,14 +38,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var testCronSchedule string = "*/15 * * * *" diff --git a/internal/controller/postgrescluster/pgbouncer.go b/internal/controller/postgrescluster/pgbouncer.go index 2fcd2802ff..6f9581e98b 100644 --- a/internal/controller/postgrescluster/pgbouncer.go +++ b/internal/controller/postgrescluster/pgbouncer.go @@ -18,13 +18,13 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgbouncer" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgbouncer" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // reconcilePGBouncer writes the objects necessary to run a PgBouncer Pod. diff --git a/internal/controller/postgrescluster/pgbouncer_test.go b/internal/controller/postgrescluster/pgbouncer_test.go index 9f92ee1857..4872c72eaa 100644 --- a/internal/controller/postgrescluster/pgbouncer_test.go +++ b/internal/controller/postgrescluster/pgbouncer_test.go @@ -19,11 +19,11 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGeneratePGBouncerService(t *testing.T) { diff --git a/internal/controller/postgrescluster/pgmonitor.go b/internal/controller/postgrescluster/pgmonitor.go index c8b3d400ba..24cceba41b 100644 --- a/internal/controller/postgrescluster/pgmonitor.go +++ b/internal/controller/postgrescluster/pgmonitor.go @@ -15,16 +15,16 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgmonitor" - "github.com/percona/percona-postgresql-operator/internal/postgres" - pgpassword "github.com/percona/percona-postgresql-operator/internal/postgres/password" - "github.com/percona/percona-postgresql-operator/internal/util" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgmonitor" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + pgpassword "github.com/superfly/percona-postgresql-operator/internal/postgres/password" + "github.com/superfly/percona-postgresql-operator/internal/util" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // If pgMonitor is enabled the pgMonitor sidecar(s) have been added to the diff --git a/internal/controller/postgrescluster/pgmonitor_test.go b/internal/controller/postgrescluster/pgmonitor_test.go index b38d874ae7..b99de27122 100644 --- a/internal/controller/postgrescluster/pgmonitor_test.go +++ b/internal/controller/postgrescluster/pgmonitor_test.go @@ -20,12 +20,12 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func testExporterCollectorsAnnotation(t *testing.T, ctx context.Context, cluster *v1beta1.PostgresCluster, queriesConfig, webConfig *corev1.ConfigMap) { diff --git a/internal/controller/postgrescluster/pki.go b/internal/controller/postgrescluster/pki.go index 8fad9f6da6..e05d56cf12 100644 --- a/internal/controller/postgrescluster/pki.go +++ b/internal/controller/postgrescluster/pki.go @@ -15,9 +15,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/controller/postgrescluster/pki_test.go b/internal/controller/postgrescluster/pki_test.go index 3b907f9133..344c1b09f2 100644 --- a/internal/controller/postgrescluster/pki_test.go +++ b/internal/controller/postgrescluster/pki_test.go @@ -20,10 +20,10 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // TestReconcileCerts tests the proper reconciliation of the root ca certificate diff --git a/internal/controller/postgrescluster/pod_disruption_budget.go b/internal/controller/postgrescluster/pod_disruption_budget.go index 8823998ab0..54d8166aac 100644 --- a/internal/controller/postgrescluster/pod_disruption_budget.go +++ b/internal/controller/postgrescluster/pod_disruption_budget.go @@ -15,8 +15,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // generatePodDisruptionBudget takes parameters required to fill out a PDB and diff --git a/internal/controller/postgrescluster/pod_disruption_budget_test.go b/internal/controller/postgrescluster/pod_disruption_budget_test.go index 523e4b7da2..18f203ed08 100644 --- a/internal/controller/postgrescluster/pod_disruption_budget_test.go +++ b/internal/controller/postgrescluster/pod_disruption_budget_test.go @@ -12,9 +12,9 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGeneratePodDisruptionBudget(t *testing.T) { diff --git a/internal/controller/postgrescluster/postgres.go b/internal/controller/postgrescluster/postgres.go index b9a35d62d3..6939184c91 100644 --- a/internal/controller/postgrescluster/postgres.go +++ b/internal/controller/postgrescluster/postgres.go @@ -25,19 +25,19 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgaudit" - "github.com/percona/percona-postgresql-operator/internal/pgstatmonitor" - "github.com/percona/percona-postgresql-operator/internal/pgstatstatements" - "github.com/percona/percona-postgresql-operator/internal/pgvector" - "github.com/percona/percona-postgresql-operator/internal/postgis" - "github.com/percona/percona-postgresql-operator/internal/postgres" - pgpassword "github.com/percona/percona-postgresql-operator/internal/postgres/password" - "github.com/percona/percona-postgresql-operator/internal/util" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgaudit" + "github.com/superfly/percona-postgresql-operator/internal/pgstatmonitor" + "github.com/superfly/percona-postgresql-operator/internal/pgstatstatements" + "github.com/superfly/percona-postgresql-operator/internal/pgvector" + "github.com/superfly/percona-postgresql-operator/internal/postgis" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + pgpassword "github.com/superfly/percona-postgresql-operator/internal/postgres/password" + "github.com/superfly/percona-postgresql-operator/internal/util" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // generatePostgresUserSecret returns a Secret containing a password and diff --git a/internal/controller/postgrescluster/postgres_test.go b/internal/controller/postgrescluster/postgres_test.go index de39a3c0c0..8882dd1a28 100644 --- a/internal/controller/postgrescluster/postgres_test.go +++ b/internal/controller/postgrescluster/postgres_test.go @@ -23,16 +23,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGeneratePostgresUserSecret(t *testing.T) { diff --git a/internal/controller/postgrescluster/rbac.go b/internal/controller/postgrescluster/rbac.go index df5dfd0bbe..7de0a51aa3 100644 --- a/internal/controller/postgrescluster/rbac.go +++ b/internal/controller/postgrescluster/rbac.go @@ -11,10 +11,10 @@ import ( corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/patroni" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/patroni" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // reconcileRBACResources creates Roles, RoleBindings, and ServiceAccounts for diff --git a/internal/controller/postgrescluster/snapshots.go b/internal/controller/postgrescluster/snapshots.go index 6c9ada6518..2d816b2792 100644 --- a/internal/controller/postgrescluster/snapshots.go +++ b/internal/controller/postgrescluster/snapshots.go @@ -18,13 +18,13 @@ import ( volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="snapshot.storage.k8s.io",resources="volumesnapshots",verbs={get,list,create,patch,delete} diff --git a/internal/controller/postgrescluster/snapshots_test.go b/internal/controller/postgrescluster/snapshots_test.go index cd7311e6ef..2ad9bb1340 100644 --- a/internal/controller/postgrescluster/snapshots_test.go +++ b/internal/controller/postgrescluster/snapshots_test.go @@ -22,14 +22,14 @@ import ( "k8s.io/utils/ptr" // K8SPG-714 "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestReconcileVolumeSnapshots(t *testing.T) { diff --git a/internal/controller/postgrescluster/suite_test.go b/internal/controller/postgrescluster/suite_test.go index 1dbd36bd1e..6cb41566a9 100644 --- a/internal/controller/postgrescluster/suite_test.go +++ b/internal/controller/postgrescluster/suite_test.go @@ -24,8 +24,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/logging" ) var suite struct { diff --git a/internal/controller/postgrescluster/topology_test.go b/internal/controller/postgrescluster/topology_test.go index 5da8c0e7ef..35286e9421 100644 --- a/internal/controller/postgrescluster/topology_test.go +++ b/internal/controller/postgrescluster/topology_test.go @@ -10,7 +10,7 @@ import ( "gotest.tools/v3/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func TestDefaultTopologySpreadConstraints(t *testing.T) { diff --git a/internal/controller/postgrescluster/util.go b/internal/controller/postgrescluster/util.go index 3631a74857..f36016f0f7 100644 --- a/internal/controller/postgrescluster/util.go +++ b/internal/controller/postgrescluster/util.go @@ -15,9 +15,9 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/rand" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var tmpDirSizeLimit = resource.MustParse("16Mi") diff --git a/internal/controller/postgrescluster/util_test.go b/internal/controller/postgrescluster/util_test.go index 3e673c02d6..92deaba222 100644 --- a/internal/controller/postgrescluster/util_test.go +++ b/internal/controller/postgrescluster/util_test.go @@ -15,9 +15,9 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestSafeHash32(t *testing.T) { diff --git a/internal/controller/postgrescluster/volumes.go b/internal/controller/postgrescluster/volumes.go index ae7ac39dd9..63ca2ce801 100644 --- a/internal/controller/postgrescluster/volumes.go +++ b/internal/controller/postgrescluster/volumes.go @@ -20,12 +20,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="",resources="persistentvolumeclaims",verbs={list} diff --git a/internal/controller/postgrescluster/volumes_test.go b/internal/controller/postgrescluster/volumes_test.go index 4de564c810..d202386ba1 100644 --- a/internal/controller/postgrescluster/volumes_test.go +++ b/internal/controller/postgrescluster/volumes_test.go @@ -20,13 +20,13 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestHandlePersistentVolumeClaimError(t *testing.T) { diff --git a/internal/controller/postgrescluster/watches.go b/internal/controller/postgrescluster/watches.go index 047903c2ff..d0468b15fb 100644 --- a/internal/controller/postgrescluster/watches.go +++ b/internal/controller/postgrescluster/watches.go @@ -13,8 +13,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/patroni" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/patroni" ) // watchPods returns a handler.EventHandler for Pods. diff --git a/internal/controller/runtime/runtime.go b/internal/controller/runtime/runtime.go index 65f06eb43c..623b023567 100644 --- a/internal/controller/runtime/runtime.go +++ b/internal/controller/runtime/runtime.go @@ -18,8 +18,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/manager/signals" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) type ( diff --git a/internal/controller/standalone_pgadmin/configmap.go b/internal/controller/standalone_pgadmin/configmap.go index 2e1390a666..b5a40dd7c0 100644 --- a/internal/controller/standalone_pgadmin/configmap.go +++ b/internal/controller/standalone_pgadmin/configmap.go @@ -16,9 +16,9 @@ import ( "github.com/pkg/errors" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="",resources="configmaps",verbs={get} diff --git a/internal/controller/standalone_pgadmin/configmap_test.go b/internal/controller/standalone_pgadmin/configmap_test.go index f895d56362..2bfdd62c8e 100644 --- a/internal/controller/standalone_pgadmin/configmap_test.go +++ b/internal/controller/standalone_pgadmin/configmap_test.go @@ -9,9 +9,9 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGenerateConfig(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/controller.go b/internal/controller/standalone_pgadmin/controller.go index f94000f440..0a353a3174 100644 --- a/internal/controller/standalone_pgadmin/controller.go +++ b/internal/controller/standalone_pgadmin/controller.go @@ -17,9 +17,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - controllerruntime "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + controllerruntime "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // PGAdminReconciler reconciles a PGAdmin object diff --git a/internal/controller/standalone_pgadmin/controller_test.go b/internal/controller/standalone_pgadmin/controller_test.go index 1c4924dc7a..4823734e64 100644 --- a/internal/controller/standalone_pgadmin/controller_test.go +++ b/internal/controller/standalone_pgadmin/controller_test.go @@ -14,8 +14,8 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestDeleteControlled(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/helpers_test.go b/internal/controller/standalone_pgadmin/helpers_test.go index cea3facd87..ca74620fa5 100644 --- a/internal/controller/standalone_pgadmin/helpers_test.go +++ b/internal/controller/standalone_pgadmin/helpers_test.go @@ -15,7 +15,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) // Scale extends d according to PGO_TEST_TIMEOUT_SCALE. diff --git a/internal/controller/standalone_pgadmin/helpers_unit_test.go b/internal/controller/standalone_pgadmin/helpers_unit_test.go index a57674e00a..3bbed56347 100644 --- a/internal/controller/standalone_pgadmin/helpers_unit_test.go +++ b/internal/controller/standalone_pgadmin/helpers_unit_test.go @@ -9,8 +9,8 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // TODO(benjaminjb): This file is duplicated test help functions diff --git a/internal/controller/standalone_pgadmin/pod.go b/internal/controller/standalone_pgadmin/pod.go index 7c04c72b8d..6cff03e03b 100644 --- a/internal/controller/standalone_pgadmin/pod.go +++ b/internal/controller/standalone_pgadmin/pod.go @@ -12,10 +12,10 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/controller/standalone_pgadmin/pod_test.go b/internal/controller/standalone_pgadmin/pod_test.go index f19a08dd56..652a9eaecb 100644 --- a/internal/controller/standalone_pgadmin/pod_test.go +++ b/internal/controller/standalone_pgadmin/pod_test.go @@ -12,9 +12,9 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPod(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/postgrescluster.go b/internal/controller/standalone_pgadmin/postgrescluster.go index b777140faf..d8967ea6d7 100644 --- a/internal/controller/standalone_pgadmin/postgrescluster.go +++ b/internal/controller/standalone_pgadmin/postgrescluster.go @@ -11,8 +11,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) //+kubebuilder:rbac:groups="postgres-operator.crunchydata.com",resources="pgadmins",verbs={list} diff --git a/internal/controller/standalone_pgadmin/service.go b/internal/controller/standalone_pgadmin/service.go index 74a21deffd..3fdc0b4f7a 100644 --- a/internal/controller/standalone_pgadmin/service.go +++ b/internal/controller/standalone_pgadmin/service.go @@ -17,9 +17,9 @@ import ( "github.com/pkg/errors" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="",resources="services",verbs={get} diff --git a/internal/controller/standalone_pgadmin/service_test.go b/internal/controller/standalone_pgadmin/service_test.go index a5fed9791a..f654f01096 100644 --- a/internal/controller/standalone_pgadmin/service_test.go +++ b/internal/controller/standalone_pgadmin/service_test.go @@ -9,8 +9,8 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestService(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/statefulset.go b/internal/controller/standalone_pgadmin/statefulset.go index b10818ee51..84e07131ef 100644 --- a/internal/controller/standalone_pgadmin/statefulset.go +++ b/internal/controller/standalone_pgadmin/statefulset.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // reconcilePGAdminStatefulSet writes the StatefulSet that runs pgAdmin. diff --git a/internal/controller/standalone_pgadmin/statefulset_test.go b/internal/controller/standalone_pgadmin/statefulset_test.go index da7ac2c8e7..7b9f48aac7 100644 --- a/internal/controller/standalone_pgadmin/statefulset_test.go +++ b/internal/controller/standalone_pgadmin/statefulset_test.go @@ -14,11 +14,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestReconcilePGAdminStatefulSet(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/users.go b/internal/controller/standalone_pgadmin/users.go index dd24bbd9ae..c1d97eb6e6 100644 --- a/internal/controller/standalone_pgadmin/users.go +++ b/internal/controller/standalone_pgadmin/users.go @@ -18,9 +18,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) type Executor func( diff --git a/internal/controller/standalone_pgadmin/users_test.go b/internal/controller/standalone_pgadmin/users_test.go index 0f75923e12..e03d48d43d 100644 --- a/internal/controller/standalone_pgadmin/users_test.go +++ b/internal/controller/standalone_pgadmin/users_test.go @@ -19,11 +19,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestReconcilePGAdminUsers(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/volume.go b/internal/controller/standalone_pgadmin/volume.go index 631efce9b0..333f45a746 100644 --- a/internal/controller/standalone_pgadmin/volume.go +++ b/internal/controller/standalone_pgadmin/volume.go @@ -15,8 +15,8 @@ import ( "github.com/pkg/errors" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:groups="",resources="persistentvolumeclaims",verbs={create,patch} diff --git a/internal/controller/standalone_pgadmin/volume_test.go b/internal/controller/standalone_pgadmin/volume_test.go index 2c61e4f3ba..43803ef719 100644 --- a/internal/controller/standalone_pgadmin/volume_test.go +++ b/internal/controller/standalone_pgadmin/volume_test.go @@ -17,13 +17,13 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/events" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestReconcilePGAdminDataVolume(t *testing.T) { diff --git a/internal/controller/standalone_pgadmin/watches.go b/internal/controller/standalone_pgadmin/watches.go index 0632961abe..3502022613 100644 --- a/internal/controller/standalone_pgadmin/watches.go +++ b/internal/controller/standalone_pgadmin/watches.go @@ -14,7 +14,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // watchPostgresClusters returns a [handler.EventHandler] for PostgresClusters. diff --git a/internal/controller/standalone_pgadmin/watches_test.go b/internal/controller/standalone_pgadmin/watches_test.go index 88a21e07b5..78aafab123 100644 --- a/internal/controller/standalone_pgadmin/watches_test.go +++ b/internal/controller/standalone_pgadmin/watches_test.go @@ -12,8 +12,8 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestFindPGAdminsForSecret(t *testing.T) { diff --git a/internal/feature/features.go b/internal/feature/features.go index db424ead42..28c379a321 100644 --- a/internal/feature/features.go +++ b/internal/feature/features.go @@ -86,6 +86,9 @@ const ( // Support VolumeSnapshots VolumeSnapshots = "VolumeSnapshots" + + // Use HTTP for interacting with pgBackRest + PGBackRestHTTP = "PGBackRestHTTP" ) // NewGate returns a MutableGate with the Features defined in this package. @@ -101,6 +104,7 @@ func NewGate() MutableGate { PGBouncerSidecars: {Default: false, PreRelease: featuregate.Alpha}, TablespaceVolumes: {Default: false, PreRelease: featuregate.Alpha}, VolumeSnapshots: {Default: false, PreRelease: featuregate.Alpha}, + PGBackRestHTTP: {Default: true, PreRelease: featuregate.Alpha}, }); err != nil { panic(err) } diff --git a/internal/initialize/intstr_test.go b/internal/initialize/intstr_test.go index 4b877980e9..c0f1b5b0ff 100644 --- a/internal/initialize/intstr_test.go +++ b/internal/initialize/intstr_test.go @@ -21,7 +21,7 @@ import ( "gotest.tools/v3/assert" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/initialize" ) func TestIntOrStringInt32(t *testing.T) { diff --git a/internal/initialize/metadata_test.go b/internal/initialize/metadata_test.go index 6704e4c11d..001725434a 100644 --- a/internal/initialize/metadata_test.go +++ b/internal/initialize/metadata_test.go @@ -10,7 +10,7 @@ import ( "gotest.tools/v3/assert" corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/initialize" ) func TestAnnotations(t *testing.T) { diff --git a/internal/initialize/primitives_test.go b/internal/initialize/primitives_test.go index ed3aaa504a..b2825164dc 100644 --- a/internal/initialize/primitives_test.go +++ b/internal/initialize/primitives_test.go @@ -9,7 +9,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/initialize" ) func TestBool(t *testing.T) { diff --git a/internal/initialize/security_test.go b/internal/initialize/security_test.go index 909b8d3443..a900b15d15 100644 --- a/internal/initialize/security_test.go +++ b/internal/initialize/security_test.go @@ -11,7 +11,7 @@ import ( "gotest.tools/v3/assert" corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/initialize" ) func TestPodSecurityContext(t *testing.T) { diff --git a/internal/naming/names.go b/internal/naming/names.go index d5da45b024..6ec12bd784 100644 --- a/internal/naming/names.go +++ b/internal/naming/names.go @@ -13,8 +13,8 @@ import ( "k8s.io/apimachinery/pkg/util/rand" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/naming/names_test.go b/internal/naming/names_test.go index a1b1c7df48..dafdbad9d4 100644 --- a/internal/naming/names_test.go +++ b/internal/naming/names_test.go @@ -15,7 +15,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestAsObjectKey(t *testing.T) { diff --git a/internal/naming/selectors.go b/internal/naming/selectors.go index 5f662a39e9..4a9b273d75 100644 --- a/internal/naming/selectors.go +++ b/internal/naming/selectors.go @@ -8,7 +8,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // AsSelector is a wrapper around metav1.LabelSelectorAsSelector() which converts diff --git a/internal/naming/selectors_test.go b/internal/naming/selectors_test.go index e4651d9778..4e5eb83f63 100644 --- a/internal/naming/selectors_test.go +++ b/internal/naming/selectors_test.go @@ -10,7 +10,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestAnyCluster(t *testing.T) { diff --git a/internal/naming/telemetry.go b/internal/naming/telemetry.go index 351f52f4ec..96750e58fe 100644 --- a/internal/naming/telemetry.go +++ b/internal/naming/telemetry.go @@ -6,4 +6,4 @@ package naming import "go.opentelemetry.io/otel" -var tracer = otel.Tracer("github.com/percona/percona-postgresql-operator/naming") +var tracer = otel.Tracer("github.com/superfly/percona-postgresql-operator/naming") diff --git a/internal/patroni/api.go b/internal/patroni/api.go index af9d9739ec..27d670dbb0 100644 --- a/internal/patroni/api.go +++ b/internal/patroni/api.go @@ -12,7 +12,7 @@ import ( "io" "strings" - "github.com/percona/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/logging" ) // API defines a general interface for interacting with the Patroni API. diff --git a/internal/patroni/certificates_test.go b/internal/patroni/certificates_test.go index 3432db41e8..cc131e072e 100644 --- a/internal/patroni/certificates_test.go +++ b/internal/patroni/certificates_test.go @@ -11,7 +11,7 @@ import ( "gotest.tools/v3/assert" corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) type funcMarshaler func() ([]byte, error) diff --git a/internal/patroni/config.go b/internal/patroni/config.go index 1a937f8d93..ca88581a61 100644 --- a/internal/patroni/config.go +++ b/internal/patroni/config.go @@ -12,10 +12,10 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/patroni/config_test.go b/internal/patroni/config_test.go index 45fd0dfc7d..f27598d598 100644 --- a/internal/patroni/config_test.go +++ b/internal/patroni/config_test.go @@ -17,12 +17,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestClusterYAML(t *testing.T) { diff --git a/internal/patroni/rbac.go b/internal/patroni/rbac.go index 617323acb8..2b959e13d6 100644 --- a/internal/patroni/rbac.go +++ b/internal/patroni/rbac.go @@ -8,7 +8,7 @@ import ( corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // "list", "patch", and "watch" are required. Include "get" for good measure. diff --git a/internal/patroni/rbac_test.go b/internal/patroni/rbac_test.go index 0bef7b4904..8e71e1dbba 100644 --- a/internal/patroni/rbac_test.go +++ b/internal/patroni/rbac_test.go @@ -10,8 +10,8 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func isUniqueAndSorted(slice []string) bool { diff --git a/internal/patroni/reconcile.go b/internal/patroni/reconcile.go index 7a03019a64..7b7349a79b 100644 --- a/internal/patroni/reconcile.go +++ b/internal/patroni/reconcile.go @@ -12,12 +12,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pgbackrest" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pgbackrest" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // ClusterBootstrapped returns a bool indicating whether or not Patroni has successfully diff --git a/internal/patroni/reconcile_test.go b/internal/patroni/reconcile_test.go index c7d60a1e9e..3c12d8b5fc 100644 --- a/internal/patroni/reconcile_test.go +++ b/internal/patroni/reconcile_test.go @@ -12,11 +12,11 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestClusterConfigMap(t *testing.T) { diff --git a/internal/pgadmin/config.go b/internal/pgadmin/config.go index 1d1fbf62de..256a5016a9 100644 --- a/internal/pgadmin/config.go +++ b/internal/pgadmin/config.go @@ -9,7 +9,7 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/pgadmin/config_test.go b/internal/pgadmin/config_test.go index f25ddbcaff..9991ddc054 100644 --- a/internal/pgadmin/config_test.go +++ b/internal/pgadmin/config_test.go @@ -14,9 +14,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPodConfigFiles(t *testing.T) { diff --git a/internal/pgadmin/reconcile.go b/internal/pgadmin/reconcile.go index 5a46258551..455cf9230f 100644 --- a/internal/pgadmin/reconcile.go +++ b/internal/pgadmin/reconcile.go @@ -12,10 +12,10 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // startupScript is the script for the configuration and startup of the pgAdmin service. diff --git a/internal/pgadmin/reconcile_test.go b/internal/pgadmin/reconcile_test.go index 5e9e051c0b..99b71902d3 100644 --- a/internal/pgadmin/reconcile_test.go +++ b/internal/pgadmin/reconcile_test.go @@ -12,9 +12,9 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestConfigMap(t *testing.T) { diff --git a/internal/pgadmin/users.go b/internal/pgadmin/users.go index 659bb92b85..c1c4e15041 100644 --- a/internal/pgadmin/users.go +++ b/internal/pgadmin/users.go @@ -12,9 +12,9 @@ import ( "io" "strings" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) type Executor func( diff --git a/internal/pgadmin/users_test.go b/internal/pgadmin/users_test.go index 89904ec8ba..ac873ac7ac 100644 --- a/internal/pgadmin/users_test.go +++ b/internal/pgadmin/users_test.go @@ -17,9 +17,9 @@ import ( "gotest.tools/v3/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestWriteUsersInPGAdmin(t *testing.T) { diff --git a/internal/pgaudit/postgres.go b/internal/pgaudit/postgres.go index d6d7710935..0ecae1f6c5 100644 --- a/internal/pgaudit/postgres.go +++ b/internal/pgaudit/postgres.go @@ -7,8 +7,8 @@ package pgaudit import ( "context" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) // When the pgAudit shared library is not loaded, the extension cannot be diff --git a/internal/pgaudit/postgres_test.go b/internal/pgaudit/postgres_test.go index ce869e88ff..bf3d3f6889 100644 --- a/internal/pgaudit/postgres_test.go +++ b/internal/pgaudit/postgres_test.go @@ -13,7 +13,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) func TestEnableInPostgreSQL(t *testing.T) { diff --git a/internal/pgbackrest-server/api/backup.go b/internal/pgbackrest-server/api/backup.go new file mode 100644 index 0000000000..07c6799b1f --- /dev/null +++ b/internal/pgbackrest-server/api/backup.go @@ -0,0 +1,72 @@ +package api + +import ( + "encoding/json" + "fmt" + "net/http" + "reflect" + + pgbackrestserver "github.com/superfly/percona-postgresql-operator/internal/pgbackrest-server" +) + +type BackupCommandOptions struct { + // General Options + Stanza string `json:"stanza"` // Required + Type string `json:"type,omitempty"` // 'full', 'incr', or 'diff' + LockPath string `json:"lock_path,omitempty"` + ProcessMax int `json:"process_max,omitempty"` + CompressType string `json:"compress_type,omitempty"` + + // Backup Options + Annotations map[string]string `json:"annotations,omitempty"` + Force bool `json:"force,omitempty"` + Resume bool `json:"resume,omitempty"` + StartFast bool `json:"start_fast,omitempty"` + StopAuto bool `json:"stop_auto,omitempty"` + BackupStandby bool `json:"backup_standby,omitempty"` + + // Filter Options + DBInclude []string `json:"db_include,omitempty"` + + // Repository Options + Repo int `json:"repo,omitempty"` + RepoPath string `json:"repo_path,omitempty"` + RepoType string `json:"repo_type,omitempty"` + RepoHardlink bool `json:"repo_hardlink,omitempty"` + RepoRetentionFull int `json:"repo_retention_full,omitempty"` + RepoRetentionFullType string `json:"repo_retention_full_type,omitempty"` + + // Logging and Configuration + Config string `json:"config,omitempty"` +} + +func (c *BackupCommandOptions) AsSlice() []string { + return pgbackrestserver.IntoOpts(reflect.ValueOf(c)) +} + +func BackupCommandHandler(w http.ResponseWriter, r *http.Request) { + var opts BackupCommandOptions + if err := json.NewDecoder(r.Body).Decode(&opts); err != nil { + http.Error(w, fmt.Sprintf("could not decode json body: %v", err), http.StatusBadRequest) + return + } + + cmd := pgbackrestserver.BackrestCommand{ + Command: "backup", + Opts: opts.AsSlice(), + } + + stdout, _, err := cmd.Run(r.Context()) + if err != nil { + http.Error(w, fmt.Sprintf("failed to run pgbackrest backup command: %v", err), http.StatusInternalServerError) + return + } + + out := map[string]string{"data": stdout.String()} + w.WriteHeader(http.StatusOK) + if err := json.NewEncoder(w).Encode(out); err != nil { + http.Error(w, fmt.Sprintf("failed to encode json response: %v", err), http.StatusInternalServerError) + return + } + +} diff --git a/internal/pgbackrest-server/api/info.go b/internal/pgbackrest-server/api/info.go new file mode 100644 index 0000000000..09993bc29b --- /dev/null +++ b/internal/pgbackrest-server/api/info.go @@ -0,0 +1,67 @@ +package api + +import ( + "encoding/json" + "fmt" + "net/http" + "reflect" + + pgbackrestserver "github.com/superfly/percona-postgresql-operator/internal/pgbackrest-server" +) + +type InfoCommandOptions struct { + // General Options + Stanza string `json:"stanza"` // Required + Config string `json:"config,omitempty"` + ConfigIncludePath string `json:"config_include_path,omitempty"` + ConfigPath string `json:"config_path,omitempty"` + Output string `json:"output,omitempty"` + + // Backup Set & Filter Options + BackupSet string `json:"set,omitempty"` + DBInclude []string `json:"db_include,omitempty"` + Type string `json:"type,omitempty"` + + // Archive Options + ArchiveCheck bool `json:"archive_check,omitempty"` + ArchiveCopy bool `json:"archive_copy,omitempty"` + + // Repository Options + Repo int `json:"repo,omitempty"` + RepoPath string `json:"repo_path,omitempty"` + RepoType string `json:"repo_type,omitempty"` + RepoHardlink bool `json:"repo_hardlink,omitempty"` + RepoRetentionFull int `json:"repo_retention_full,omitempty"` + RepoRetentionFullType string `json:"repo_retention_full_type,omitempty"` + + // S3 Repository Options + RepoS3Bucket string `json:"repo_s3_bucket,omitempty"` + RepoS3Endpoint string `json:"repo_s3_endpoint,omitempty"` + RepoS3Region string `json:"repo_s3_region,omitempty"` +} + +func (c *InfoCommandOptions) AsSlice() []string { + return pgbackrestserver.IntoOpts(reflect.ValueOf(c)) +} + +func InfoCommandHandler(w http.ResponseWriter, r *http.Request) { + var opts InfoCommandOptions + if err := json.NewDecoder(r.Body).Decode(&opts); err != nil { + http.Error(w, fmt.Sprintf("could not decode json body: %v", err), http.StatusBadRequest) + return + } + + cmd := pgbackrestserver.BackrestCommand{ + Command: "info", + Opts: opts.AsSlice(), + } + + stdout, _, err := cmd.Run(r.Context()) + if err != nil { + http.Error(w, fmt.Sprintf("failed to run pgbackrest info command: %v", err), http.StatusInternalServerError) + return + } + + w.WriteHeader(http.StatusOK) + w.Write(stdout.Bytes()) +} diff --git a/internal/pgbackrest-server/api/restore.go b/internal/pgbackrest-server/api/restore.go new file mode 100644 index 0000000000..b3b7806f9d --- /dev/null +++ b/internal/pgbackrest-server/api/restore.go @@ -0,0 +1,59 @@ +package api + +import ( + "encoding/json" + "fmt" + "net/http" + "reflect" + + pgbackrestserver "github.com/superfly/percona-postgresql-operator/internal/pgbackrest-server" +) + +type RestoreCommandOptions struct { + // General Options + Stanza string `json:"stanza"` // Required + Set string `json:"set,omitempty"` + Delta bool `json:"delta,omitempty"` + Force bool `json:"force,omitempty"` + Repo int `json:"repo,omitempty"` + + // Filter Options + DBInclude []string `json:"db_include,omitempty"` + + // Target & Recovery Options (Point-in-Time Recovery) + TargetType string `json:"target_type,omitempty"` // e.g., 'time', 'xid', 'lsn' + Target string `json:"target,omitempty"` + TargetAction string `json:"target_action,omitempty"` // e.g., 'pause', 'promote', 'shutdown' + RecoveryOption map[string]string `json:"recovery_option,omitempty"` +} + +func (c *RestoreCommandOptions) AsSlice() []string { + return pgbackrestserver.IntoOpts(reflect.ValueOf(c)) +} + +func RestoreCommandHandler(w http.ResponseWriter, r *http.Request) { + var opts RestoreCommandOptions + if err := json.NewDecoder(r.Body).Decode(&opts); err != nil { + http.Error(w, fmt.Sprintf("could not decode json body: %v", err), http.StatusBadRequest) + return + } + + cmd := pgbackrestserver.BackrestCommand{ + Command: "restore", + Opts: opts.AsSlice(), + } + + stdout, _, err := cmd.Run(r.Context()) + if err != nil { + http.Error(w, fmt.Sprintf("failed to run pgbackrest restore command: %v", err), http.StatusInternalServerError) + return + } + + out := map[string]string{"data": stdout.String()} + w.WriteHeader(http.StatusOK) + if err := json.NewEncoder(w).Encode(out); err != nil { + http.Error(w, fmt.Sprintf("failed to encode json response: %v", err), http.StatusInternalServerError) + return + } + +} diff --git a/internal/pgbackrest-server/api/stanza_create.go b/internal/pgbackrest-server/api/stanza_create.go new file mode 100644 index 0000000000..778f64ec17 --- /dev/null +++ b/internal/pgbackrest-server/api/stanza_create.go @@ -0,0 +1 @@ +package api diff --git a/internal/pgbackrest-server/api/stanza_upgrade.go b/internal/pgbackrest-server/api/stanza_upgrade.go new file mode 100644 index 0000000000..a57cc3f674 --- /dev/null +++ b/internal/pgbackrest-server/api/stanza_upgrade.go @@ -0,0 +1 @@ +package api \ No newline at end of file diff --git a/internal/pgbackrest-server/exec.go b/internal/pgbackrest-server/exec.go new file mode 100644 index 0000000000..bf6f899168 --- /dev/null +++ b/internal/pgbackrest-server/exec.go @@ -0,0 +1,33 @@ +package pgbackrestserver + +import ( + "bytes" + "context" + "os/exec" + "syscall" +) + +type BackrestCommand struct { + Command string + Opts []string +} + +func (b *BackrestCommand) Run(ctx context.Context) (*bytes.Buffer, *bytes.Buffer, error) { + args := append([]string{b.Command}, b.Opts...) + cmd := exec.CommandContext(ctx, "pgbackrest", args...) + + stdout, stderr := new(bytes.Buffer), new(bytes.Buffer) + cmd.Stdout = stdout + cmd.Stderr = stderr + + cmd.Cancel = func() error { + return cmd.Process.Signal(syscall.SIGTERM) + } + + err := cmd.Run() + if err != nil { + return nil, nil, err + } + + return stdout, stderr, nil +} diff --git a/internal/pgbackrest-server/opts.go b/internal/pgbackrest-server/opts.go new file mode 100644 index 0000000000..4291f62f93 --- /dev/null +++ b/internal/pgbackrest-server/opts.go @@ -0,0 +1,69 @@ +package pgbackrestserver + +import ( + "fmt" + "reflect" + "sort" + "strings" +) + +func IntoOpts(val reflect.Value) []string { + args := []string{} + + typ := val.Type() + for i := range val.NumField() { + jsonTag := typ.Field(i).Tag.Get("json") + if jsonTag == "" || jsonTag == "-" { + continue + } + + field := val.Field(i) + parts := strings.Split(jsonTag, ",") + jsonKey := parts[0] + isOmitEmpty := len(parts) > 1 && parts[1] == "omitempty" + + if isOmitEmpty && field.IsZero() { + continue + } + + flag := "--" + strings.ReplaceAll(jsonKey, "_", "-") + + switch field.Kind() { + case reflect.String: + if strVal := field.String(); strVal != "" || !isOmitEmpty { + args = append(args, fmt.Sprintf(" %s=%s", flag, strVal)) + } + case reflect.Int, reflect.Int64: + if intVal := field.Int(); intVal != 0 || !isOmitEmpty { + args = append(args, fmt.Sprintf(" %s=%d", flag, intVal)) + } + case reflect.Bool: + if field.Bool() { + args = append(args, fmt.Sprintf(" %s", flag)) + } + case reflect.Slice: + if field.Type().Elem().Kind() == reflect.String { + for j := range field.Len() { + args = append(args, fmt.Sprintf(" %s=%s", flag, field.Index(j).String())) + } + } + case reflect.Map: + // We sort the keys to ensure the output is deterministic (always the same order). + // This is especially important for reliable testing. + keys := make([]string, 0, field.Len()) + for _, keyVal := range field.MapKeys() { + keys = append(keys, keyVal.String()) + } + sort.Strings(keys) + + for _, key := range keys { + value := field.MapIndex(reflect.ValueOf(key)) + // Format is --flag=key=value + arg := fmt.Sprintf("%s=%s=%s", flag, key, value.String()) + args = append(args, arg) + } + } + } + + return args +} diff --git a/internal/pgbackrest/certificates.go b/internal/pgbackrest/certificates.go index c734b475fc..2951d5ca6d 100644 --- a/internal/pgbackrest/certificates.go +++ b/internal/pgbackrest/certificates.go @@ -10,7 +10,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/initialize" ) const ( diff --git a/internal/pgbackrest/certificates_test.go b/internal/pgbackrest/certificates_test.go index a6f6d8c7c5..af4c8ca15c 100644 --- a/internal/pgbackrest/certificates_test.go +++ b/internal/pgbackrest/certificates_test.go @@ -13,7 +13,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/uuid" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) type funcMarshaler func() ([]byte, error) diff --git a/internal/pgbackrest/config.go b/internal/pgbackrest/config.go index 64beccc236..3f5af4a7c2 100644 --- a/internal/pgbackrest/config.go +++ b/internal/pgbackrest/config.go @@ -13,11 +13,11 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/pgbackrest/config_test.go b/internal/pgbackrest/config_test.go index 06f564e25e..932e81e9b8 100644 --- a/internal/pgbackrest/config_test.go +++ b/internal/pgbackrest/config_test.go @@ -18,10 +18,10 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestCreatePGBackRestConfigMapIntent(t *testing.T) { diff --git a/internal/pgbackrest/helpers_test.go b/internal/pgbackrest/helpers_test.go index e4b2e51a73..89d3a55cec 100644 --- a/internal/pgbackrest/helpers_test.go +++ b/internal/pgbackrest/helpers_test.go @@ -16,7 +16,7 @@ package pgbackrest import ( - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) // marshalMatches converts actual to YAML and compares that to expected. diff --git a/internal/pgbackrest/pgbackrest.go b/internal/pgbackrest/pgbackrest.go index 618fa850d3..88d947d0e0 100644 --- a/internal/pgbackrest/pgbackrest.go +++ b/internal/pgbackrest/pgbackrest.go @@ -12,7 +12,7 @@ import ( "github.com/pkg/errors" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/pgbackrest/pgbackrest_test.go b/internal/pgbackrest/pgbackrest_test.go index 4c5c901120..a784f1f502 100644 --- a/internal/pgbackrest/pgbackrest_test.go +++ b/internal/pgbackrest/pgbackrest_test.go @@ -16,8 +16,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestStanzaCreateOrUpgrade(t *testing.T) { diff --git a/internal/pgbackrest/postgres.go b/internal/pgbackrest/postgres.go index a8bce592fa..770a13f75c 100644 --- a/internal/pgbackrest/postgres.go +++ b/internal/pgbackrest/postgres.go @@ -7,8 +7,8 @@ package pgbackrest import ( "strings" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // PostgreSQL populates outParameters with any settings needed to run pgBackRest. diff --git a/internal/pgbackrest/postgres_test.go b/internal/pgbackrest/postgres_test.go index 48ce0e5e0b..e0d5b191cc 100644 --- a/internal/pgbackrest/postgres_test.go +++ b/internal/pgbackrest/postgres_test.go @@ -10,8 +10,8 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPostgreSQLParameters(t *testing.T) { diff --git a/internal/pgbackrest/rbac.go b/internal/pgbackrest/rbac.go index dfc842dc9f..42665e0407 100644 --- a/internal/pgbackrest/rbac.go +++ b/internal/pgbackrest/rbac.go @@ -8,7 +8,7 @@ import ( corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // +kubebuilder:rbac:namespace=pgbackrest,groups="",resources="pods",verbs={list} diff --git a/internal/pgbackrest/rbac_test.go b/internal/pgbackrest/rbac_test.go index 8cc4ee3617..601b281adb 100644 --- a/internal/pgbackrest/rbac_test.go +++ b/internal/pgbackrest/rbac_test.go @@ -10,8 +10,8 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func isUniqueAndSorted(slice []string) bool { diff --git a/internal/pgbackrest/reconcile.go b/internal/pgbackrest/reconcile.go index 126677afbe..ba845547f4 100644 --- a/internal/pgbackrest/reconcile.go +++ b/internal/pgbackrest/reconcile.go @@ -12,13 +12,13 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // AddRepoVolumesToPod adds pgBackRest repository volumes to the provided Pod template spec, while diff --git a/internal/pgbackrest/reconcile_test.go b/internal/pgbackrest/reconcile_test.go index 8149f59f6e..f99d439a79 100644 --- a/internal/pgbackrest/reconcile_test.go +++ b/internal/pgbackrest/reconcile_test.go @@ -17,11 +17,11 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestAddRepoVolumesToPod(t *testing.T) { diff --git a/internal/pgbackrest/util.go b/internal/pgbackrest/util.go index 8f4725e648..8327e3d284 100644 --- a/internal/pgbackrest/util.go +++ b/internal/pgbackrest/util.go @@ -12,7 +12,7 @@ import ( "github.com/pkg/errors" "k8s.io/apimachinery/pkg/util/rand" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // maxPGBackrestRepos is the maximum number of repositories that can be configured according to the diff --git a/internal/pgbackrest/util_test.go b/internal/pgbackrest/util_test.go index fb18e2b676..90cbaec86d 100644 --- a/internal/pgbackrest/util_test.go +++ b/internal/pgbackrest/util_test.go @@ -13,7 +13,7 @@ import ( "gotest.tools/v3/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestCalculateConfigHashes(t *testing.T) { diff --git a/internal/pgbouncer/assertions_test.go b/internal/pgbouncer/assertions_test.go index 49def23334..3b621a8ab6 100644 --- a/internal/pgbouncer/assertions_test.go +++ b/internal/pgbouncer/assertions_test.go @@ -16,7 +16,7 @@ package pgbouncer import ( - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) // marshalMatches converts actual to YAML and compares that to expected. diff --git a/internal/pgbouncer/certificates_test.go b/internal/pgbouncer/certificates_test.go index 5c4a461205..36af19dc79 100644 --- a/internal/pgbouncer/certificates_test.go +++ b/internal/pgbouncer/certificates_test.go @@ -10,7 +10,7 @@ import ( "gotest.tools/v3/assert" corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func TestBackendAuthority(t *testing.T) { diff --git a/internal/pgbouncer/config.go b/internal/pgbouncer/config.go index 3ac90b5bfe..d98ccadf5f 100644 --- a/internal/pgbouncer/config.go +++ b/internal/pgbouncer/config.go @@ -11,8 +11,8 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/pgbouncer/config_test.go b/internal/pgbouncer/config_test.go index de2068d063..7909bdbdc0 100644 --- a/internal/pgbouncer/config_test.go +++ b/internal/pgbouncer/config_test.go @@ -17,9 +17,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPrettyYAML(t *testing.T) { diff --git a/internal/pgbouncer/postgres.go b/internal/pgbouncer/postgres.go index adf0b9b885..77494455ff 100644 --- a/internal/pgbouncer/postgres.go +++ b/internal/pgbouncer/postgres.go @@ -10,10 +10,10 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/internal/postgres/password" - "github.com/percona/percona-postgresql-operator/internal/util" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/postgres/password" + "github.com/superfly/percona-postgresql-operator/internal/util" ) const ( diff --git a/internal/pgbouncer/reconcile.go b/internal/pgbouncer/reconcile.go index 25d5bca9d0..650282dcad 100644 --- a/internal/pgbouncer/reconcile.go +++ b/internal/pgbouncer/reconcile.go @@ -11,13 +11,13 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // ConfigMap populates the PgBouncer ConfigMap. diff --git a/internal/pgbouncer/reconcile_test.go b/internal/pgbouncer/reconcile_test.go index 0e88177461..f40c7b58dc 100644 --- a/internal/pgbouncer/reconcile_test.go +++ b/internal/pgbouncer/reconcile_test.go @@ -13,12 +13,12 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/pki" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/pki" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestConfigMap(t *testing.T) { diff --git a/internal/pgmonitor/api.go b/internal/pgmonitor/api.go index 11a794b917..e9a48af472 100644 --- a/internal/pgmonitor/api.go +++ b/internal/pgmonitor/api.go @@ -22,7 +22,7 @@ import ( "io" "strings" - "github.com/percona/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/logging" ) type Executor func( diff --git a/internal/pgmonitor/exporter.go b/internal/pgmonitor/exporter.go index fd873523bd..ffea38c866 100644 --- a/internal/pgmonitor/exporter.go +++ b/internal/pgmonitor/exporter.go @@ -10,8 +10,8 @@ import ( "os" "strings" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/pgmonitor/exporter_test.go b/internal/pgmonitor/exporter_test.go index de43451c88..46c79848e5 100644 --- a/internal/pgmonitor/exporter_test.go +++ b/internal/pgmonitor/exporter_test.go @@ -13,8 +13,8 @@ import ( "gotest.tools/v3/assert" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGenerateDefaultExporterQueries(t *testing.T) { diff --git a/internal/pgmonitor/postgres.go b/internal/pgmonitor/postgres.go index 10f0618d73..4c050e38b6 100644 --- a/internal/pgmonitor/postgres.go +++ b/internal/pgmonitor/postgres.go @@ -9,9 +9,9 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/pgmonitor/postgres_test.go b/internal/pgmonitor/postgres_test.go index f27a6e04a8..947d3f0a3e 100644 --- a/internal/pgmonitor/postgres_test.go +++ b/internal/pgmonitor/postgres_test.go @@ -10,8 +10,8 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPostgreSQLHBA(t *testing.T) { diff --git a/internal/pgmonitor/util.go b/internal/pgmonitor/util.go index a31efeb58e..22bc0895df 100644 --- a/internal/pgmonitor/util.go +++ b/internal/pgmonitor/util.go @@ -8,8 +8,8 @@ import ( "context" "os" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func GetQueriesConfigDir(ctx context.Context) string { diff --git a/internal/pgmonitor/util_test.go b/internal/pgmonitor/util_test.go index 2d1957aa54..90e93b0a09 100644 --- a/internal/pgmonitor/util_test.go +++ b/internal/pgmonitor/util_test.go @@ -9,7 +9,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestExporterEnabled(t *testing.T) { diff --git a/internal/pgstatmonitor/pgstatmonitor.go b/internal/pgstatmonitor/pgstatmonitor.go index 103ff31375..c903d7c35c 100644 --- a/internal/pgstatmonitor/pgstatmonitor.go +++ b/internal/pgstatmonitor/pgstatmonitor.go @@ -4,8 +4,8 @@ import ( "context" "strings" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) func EnableInPostgreSQL(ctx context.Context, exec postgres.Executor) error { diff --git a/internal/pgstatmonitor/pgstatmonitor_test.go b/internal/pgstatmonitor/pgstatmonitor_test.go index 193f75c76a..dd2d06a445 100644 --- a/internal/pgstatmonitor/pgstatmonitor_test.go +++ b/internal/pgstatmonitor/pgstatmonitor_test.go @@ -9,7 +9,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) func TestEnableInPostgreSQL(t *testing.T) { diff --git a/internal/pgstatstatements/pgstatstatement.go b/internal/pgstatstatements/pgstatstatement.go index dcea8ea565..679e1e1acb 100644 --- a/internal/pgstatstatements/pgstatstatement.go +++ b/internal/pgstatstatements/pgstatstatement.go @@ -3,8 +3,8 @@ package pgstatstatements import ( "context" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) func EnableInPostgreSQL(ctx context.Context, exec postgres.Executor) error { diff --git a/internal/pgstatstatements/pgstatstatement_test.go b/internal/pgstatstatements/pgstatstatement_test.go index 1c81be5e30..dd9746b9ca 100644 --- a/internal/pgstatstatements/pgstatstatement_test.go +++ b/internal/pgstatstatements/pgstatstatement_test.go @@ -9,7 +9,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) func TestEnableInPostgreSQL(t *testing.T) { diff --git a/internal/pgvector/postgres.go b/internal/pgvector/postgres.go index 13b7ae0ebe..4b022b8070 100644 --- a/internal/pgvector/postgres.go +++ b/internal/pgvector/postgres.go @@ -3,8 +3,8 @@ package pgvector import ( "context" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) // EnableInPostgreSQL installs pgvector triggers into every database. diff --git a/internal/pki/encoding_test.go b/internal/pki/encoding_test.go index e1edc773d4..bc45248efa 100644 --- a/internal/pki/encoding_test.go +++ b/internal/pki/encoding_test.go @@ -14,7 +14,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) func TestCertificateTextMarshaling(t *testing.T) { diff --git a/internal/pki/pki_test.go b/internal/pki/pki_test.go index efa3db8395..b5a2d2fc07 100644 --- a/internal/pki/pki_test.go +++ b/internal/pki/pki_test.go @@ -16,7 +16,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) type StringSet map[string]struct{} diff --git a/internal/pmm/hba.go b/internal/pmm/hba.go index 628f6b7cc7..a5c436a0d7 100644 --- a/internal/pmm/hba.go +++ b/internal/pmm/hba.go @@ -1,8 +1,8 @@ package pmm import ( - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/postgis/postgis.go b/internal/postgis/postgis.go index 2b8732ca39..e85466e6a9 100644 --- a/internal/postgis/postgis.go +++ b/internal/postgis/postgis.go @@ -8,8 +8,8 @@ import ( "context" "strings" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/postgres" ) // EnableInPostgreSQL installs triggers for the following extensions into every database: diff --git a/internal/postgres/assertions_test.go b/internal/postgres/assertions_test.go index 24d5f5e789..4147089b23 100644 --- a/internal/postgres/assertions_test.go +++ b/internal/postgres/assertions_test.go @@ -16,7 +16,7 @@ package postgres import ( - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func marshalMatches(actual interface{}, expected string) cmp.Comparison { diff --git a/internal/postgres/config.go b/internal/postgres/config.go index 2d2917767d..eb47da108c 100644 --- a/internal/postgres/config.go +++ b/internal/postgres/config.go @@ -11,10 +11,10 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/postgres/config_test.go b/internal/postgres/config_test.go index af625fdb66..62e38ea740 100644 --- a/internal/postgres/config_test.go +++ b/internal/postgres/config_test.go @@ -19,9 +19,9 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestConfigDirectory(t *testing.T) { diff --git a/internal/postgres/databases.go b/internal/postgres/databases.go index e03e0b9056..eef8132214 100644 --- a/internal/postgres/databases.go +++ b/internal/postgres/databases.go @@ -9,7 +9,7 @@ import ( "context" "encoding/json" - "github.com/percona/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/logging" ) // CreateDatabasesInPostgreSQL calls exec to create databases that do not exist diff --git a/internal/postgres/databases_test.go b/internal/postgres/databases_test.go index fd9939f2f8..f7700475c5 100644 --- a/internal/postgres/databases_test.go +++ b/internal/postgres/databases_test.go @@ -13,7 +13,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func TestCreateDatabasesInPostgreSQL(t *testing.T) { diff --git a/internal/postgres/exec_test.go b/internal/postgres/exec_test.go index 3101017b99..579298e19f 100644 --- a/internal/postgres/exec_test.go +++ b/internal/postgres/exec_test.go @@ -16,7 +16,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" ) // This example demonstrates how Executor can work with exec.Cmd. diff --git a/internal/postgres/hba_test.go b/internal/postgres/hba_test.go index 212c4ad5d0..ec4b4c4398 100644 --- a/internal/postgres/hba_test.go +++ b/internal/postgres/hba_test.go @@ -10,7 +10,7 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func TestNewHBAs(t *testing.T) { diff --git a/internal/postgres/huge_pages.go b/internal/postgres/huge_pages.go index 94e3cdfd57..a38952eb77 100644 --- a/internal/postgres/huge_pages.go +++ b/internal/postgres/huge_pages.go @@ -10,7 +10,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // This function looks for a valid huge_pages resource request. If it finds one, diff --git a/internal/postgres/huge_pages_test.go b/internal/postgres/huge_pages_test.go index 2478099e05..93b02e80c5 100644 --- a/internal/postgres/huge_pages_test.go +++ b/internal/postgres/huge_pages_test.go @@ -11,8 +11,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestSetHugePages(t *testing.T) { diff --git a/internal/postgres/reconcile.go b/internal/postgres/reconcile.go index ed26420c3f..cfb0181f7b 100644 --- a/internal/postgres/reconcile.go +++ b/internal/postgres/reconcile.go @@ -10,11 +10,11 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/config" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/config" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var ( diff --git a/internal/postgres/reconcile_test.go b/internal/postgres/reconcile_test.go index 8014c18488..3fbc176a5b 100644 --- a/internal/postgres/reconcile_test.go +++ b/internal/postgres/reconcile_test.go @@ -12,11 +12,11 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/initialize" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/initialize" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestDataVolumeMount(t *testing.T) { diff --git a/internal/postgres/users.go b/internal/postgres/users.go index 2ea0188c9f..4cb51c59e3 100644 --- a/internal/postgres/users.go +++ b/internal/postgres/users.go @@ -12,10 +12,10 @@ import ( pg_query "github.com/pganalyze/pg_query_go/v5" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var RESERVED_SCHEMA_NAMES = map[string]bool{ diff --git a/internal/postgres/users_test.go b/internal/postgres/users_test.go index 9b9530835e..88a0188184 100644 --- a/internal/postgres/users_test.go +++ b/internal/postgres/users_test.go @@ -14,8 +14,8 @@ import ( "gotest.tools/v3/assert" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestSanitizeAlterRoleOptions(t *testing.T) { diff --git a/internal/registration/interface.go b/internal/registration/interface.go index 2e4d8a9c3a..f99b27f03f 100644 --- a/internal/registration/interface.go +++ b/internal/registration/interface.go @@ -14,7 +14,7 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) type Registration interface { diff --git a/internal/registration/runner.go b/internal/registration/runner.go index 19e5446aea..31072e9ec0 100644 --- a/internal/registration/runner.go +++ b/internal/registration/runner.go @@ -20,8 +20,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // Runner implements [Registration] by loading and validating the token at a diff --git a/internal/registration/runner_test.go b/internal/registration/runner_test.go index b46f04909f..3bc7444d01 100644 --- a/internal/registration/runner_test.go +++ b/internal/registration/runner_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/testing/events" + "github.com/superfly/percona-postgresql-operator/internal/testing/events" ) func TestNewRunner(t *testing.T) { diff --git a/internal/testing/require/kubernetes.go b/internal/testing/require/kubernetes.go index 7f8b18cca3..d49e4ed419 100644 --- a/internal/testing/require/kubernetes.go +++ b/internal/testing/require/kubernetes.go @@ -19,7 +19,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" ) // https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/envtest#pkg-constants diff --git a/internal/testing/validation/postgrescluster_test.go b/internal/testing/validation/postgrescluster_test.go index a411424bcb..69338d3883 100644 --- a/internal/testing/validation/postgrescluster_test.go +++ b/internal/testing/validation/postgrescluster_test.go @@ -14,9 +14,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestPostgresUserOptions(t *testing.T) { diff --git a/internal/upgradecheck/header.go b/internal/upgradecheck/header.go index 63941d457c..bc2712551d 100644 --- a/internal/upgradecheck/header.go +++ b/internal/upgradecheck/header.go @@ -18,10 +18,10 @@ import ( "k8s.io/client-go/rest" crclient "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/internal/upgradecheck/header_test.go b/internal/upgradecheck/header_test.go index 29d26104ee..4b47935a6c 100644 --- a/internal/upgradecheck/header_test.go +++ b/internal/upgradecheck/header_test.go @@ -20,12 +20,12 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "k8s.io/client-go/rest" - "github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" - "github.com/percona/percona-postgresql-operator/internal/testing/require" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/postgrescluster" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/testing/require" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func TestGenerateHeader(t *testing.T) { diff --git a/internal/upgradecheck/helpers_test.go b/internal/upgradecheck/helpers_test.go index 159f1b1d9b..8d11941067 100644 --- a/internal/upgradecheck/helpers_test.go +++ b/internal/upgradecheck/helpers_test.go @@ -22,9 +22,9 @@ import ( crclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) type fakeClientWithError struct { diff --git a/internal/upgradecheck/http.go b/internal/upgradecheck/http.go index 5cb337e149..0c982a991d 100644 --- a/internal/upgradecheck/http.go +++ b/internal/upgradecheck/http.go @@ -17,7 +17,7 @@ import ( crclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/logging" ) var ( diff --git a/internal/upgradecheck/http_test.go b/internal/upgradecheck/http_test.go index c0391e1cfa..d50522b8f0 100644 --- a/internal/upgradecheck/http_test.go +++ b/internal/upgradecheck/http_test.go @@ -21,9 +21,9 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/testing/cmp" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/testing/cmp" ) func init() { diff --git a/percona/controller/pgbackup/controller.go b/percona/controller/pgbackup/controller.go index f0347d04df..c6bd265a3a 100644 --- a/percona/controller/pgbackup/controller.go +++ b/percona/controller/pgbackup/controller.go @@ -21,15 +21,15 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/percona/clientcmd" - "github.com/percona/percona-postgresql-operator/percona/controller" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/percona/pgbackrest" - "github.com/percona/percona-postgresql-operator/percona/watcher" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/percona/clientcmd" + "github.com/superfly/percona-postgresql-operator/percona/controller" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/percona/pgbackrest" + "github.com/superfly/percona-postgresql-operator/percona/watcher" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/percona/controller/pgcluster/backup.go b/percona/controller/pgcluster/backup.go index 44639f1b1f..3dcf8c2a68 100644 --- a/percona/controller/pgcluster/backup.go +++ b/percona/controller/pgcluster/backup.go @@ -11,12 +11,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/percona/controller" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/percona/pgbackrest" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/percona/controller" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/percona/pgbackrest" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) func (r *PGClusterReconciler) reconcileBackups(ctx context.Context, cr *v2.PerconaPGCluster) error { diff --git a/percona/controller/pgcluster/backup_test.go b/percona/controller/pgcluster/backup_test.go index a4abf6d55d..7535ad1b8b 100644 --- a/percona/controller/pgcluster/backup_test.go +++ b/percona/controller/pgcluster/backup_test.go @@ -14,9 +14,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/naming" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/naming" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func compareMaps(x map[string]string, y map[string]string) bool { diff --git a/percona/controller/pgcluster/controller.go b/percona/controller/pgcluster/controller.go index 9027b09326..f19b4ce720 100644 --- a/percona/controller/pgcluster/controller.go +++ b/percona/controller/pgcluster/controller.go @@ -37,21 +37,21 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/internal/postgres" - "github.com/percona/percona-postgresql-operator/percona/clientcmd" - perconaController "github.com/percona/percona-postgresql-operator/percona/controller" - "github.com/percona/percona-postgresql-operator/percona/extensions" - "github.com/percona/percona-postgresql-operator/percona/k8s" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/percona/pmm" - perconaPG "github.com/percona/percona-postgresql-operator/percona/postgres" - "github.com/percona/percona-postgresql-operator/percona/utils/registry" - "github.com/percona/percona-postgresql-operator/percona/watcher" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/postgres" + "github.com/superfly/percona-postgresql-operator/percona/clientcmd" + perconaController "github.com/superfly/percona-postgresql-operator/percona/controller" + "github.com/superfly/percona-postgresql-operator/percona/extensions" + "github.com/superfly/percona-postgresql-operator/percona/k8s" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/percona/pmm" + perconaPG "github.com/superfly/percona-postgresql-operator/percona/postgres" + "github.com/superfly/percona-postgresql-operator/percona/utils/registry" + "github.com/superfly/percona-postgresql-operator/percona/watcher" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/percona/controller/pgcluster/controller_test.go b/percona/controller/pgcluster/controller_test.go index b3bbfbac68..0a83c46d0e 100644 --- a/percona/controller/pgcluster/controller_test.go +++ b/percona/controller/pgcluster/controller_test.go @@ -25,14 +25,14 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster" - "github.com/percona/percona-postgresql-operator/internal/feature" - "github.com/percona/percona-postgresql-operator/internal/naming" - perconaController "github.com/percona/percona-postgresql-operator/percona/controller" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/percona/runtime" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/postgrescluster" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/naming" + perconaController "github.com/superfly/percona-postgresql-operator/percona/controller" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/percona/runtime" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var _ = Describe("PG Cluster", Ordered, func() { diff --git a/percona/controller/pgcluster/finalizer.go b/percona/controller/pgcluster/finalizer.go index 5ab625cada..b1f8fde8cf 100644 --- a/percona/controller/pgcluster/finalizer.go +++ b/percona/controller/pgcluster/finalizer.go @@ -13,11 +13,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/percona/controller" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/percona/controller" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) type finalizerFunc func(context.Context, *v2.PerconaPGCluster) error diff --git a/percona/controller/pgcluster/finalizer_test.go b/percona/controller/pgcluster/finalizer_test.go index 3719b1c3d4..de4a41a148 100644 --- a/percona/controller/pgcluster/finalizer_test.go +++ b/percona/controller/pgcluster/finalizer_test.go @@ -19,9 +19,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var _ = Describe("Finalizers", Ordered, func() { diff --git a/percona/controller/pgcluster/restore.go b/percona/controller/pgcluster/restore.go index e8c4e2f8b6..f5321a5b35 100644 --- a/percona/controller/pgcluster/restore.go +++ b/percona/controller/pgcluster/restore.go @@ -6,9 +6,9 @@ import ( k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/percona/percona-postgresql-operator/internal/naming" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/internal/naming" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) // createBootstrapRestoreObject creates a PerconaPGRestore object for the bootstrap restore diff --git a/percona/controller/pgcluster/schedule.go b/percona/controller/pgcluster/schedule.go index 3c8d19997f..1c223aa25a 100644 --- a/percona/controller/pgcluster/schedule.go +++ b/percona/controller/pgcluster/schedule.go @@ -9,11 +9,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/postgrescluster" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func (r *PGClusterReconciler) reconcileScheduledBackups(ctx context.Context, cr *v2.PerconaPGCluster) error { diff --git a/percona/controller/pgcluster/status.go b/percona/controller/pgcluster/status.go index 0dd3893fdb..72c3191890 100644 --- a/percona/controller/pgcluster/status.go +++ b/percona/controller/pgcluster/status.go @@ -8,8 +8,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/retry" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func (r *PGClusterReconciler) getHost(ctx context.Context, cr *v2.PerconaPGCluster) (string, error) { diff --git a/percona/controller/pgcluster/status_test.go b/percona/controller/pgcluster/status_test.go index b4f56f0f93..533b113535 100644 --- a/percona/controller/pgcluster/status_test.go +++ b/percona/controller/pgcluster/status_test.go @@ -16,8 +16,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var _ = Describe("PG Cluster status", Ordered, func() { diff --git a/percona/controller/pgcluster/suite_test.go b/percona/controller/pgcluster/suite_test.go index 4316600709..8d7b83a0e6 100644 --- a/percona/controller/pgcluster/suite_test.go +++ b/percona/controller/pgcluster/suite_test.go @@ -20,8 +20,8 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) // These tests use Ginkgo (BDD-style Go testing framework). Refer to diff --git a/percona/controller/pgcluster/testutils_test.go b/percona/controller/pgcluster/testutils_test.go index b929152fed..be1f78285f 100644 --- a/percona/controller/pgcluster/testutils_test.go +++ b/percona/controller/pgcluster/testutils_test.go @@ -18,14 +18,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/event" - "github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/percona/controller/pgbackup" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - "github.com/percona/percona-postgresql-operator/percona/utils/registry" - "github.com/percona/percona-postgresql-operator/percona/watcher" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/controller/postgrescluster" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/percona/controller/pgbackup" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + "github.com/superfly/percona-postgresql-operator/percona/utils/registry" + "github.com/superfly/percona-postgresql-operator/percona/watcher" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) var k8sClient client.Client diff --git a/percona/controller/pgcluster/version.go b/percona/controller/pgcluster/version.go index 04be089232..d2d88f5ad1 100644 --- a/percona/controller/pgcluster/version.go +++ b/percona/controller/pgcluster/version.go @@ -11,11 +11,11 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/percona/extensions" - "github.com/percona/percona-postgresql-operator/percona/k8s" - "github.com/percona/percona-postgresql-operator/percona/version" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/percona/extensions" + "github.com/superfly/percona-postgresql-operator/percona/k8s" + "github.com/superfly/percona-postgresql-operator/percona/version" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) func (r *PGClusterReconciler) reconcileVersion(ctx context.Context, cr *v2.PerconaPGCluster) error { diff --git a/percona/controller/pgcluster/version_test.go b/percona/controller/pgcluster/version_test.go index 88b7cf23dc..7c0e59282c 100644 --- a/percona/controller/pgcluster/version_test.go +++ b/percona/controller/pgcluster/version_test.go @@ -25,8 +25,8 @@ import ( "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" - "github.com/percona/percona-postgresql-operator/percona/version" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/percona/version" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) var _ = Describe("Ensure Version", Ordered, func() { diff --git a/percona/controller/pgrestore/controller.go b/percona/controller/pgrestore/controller.go index db249f05ab..9a753e0dd1 100644 --- a/percona/controller/pgrestore/controller.go +++ b/percona/controller/pgrestore/controller.go @@ -16,12 +16,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/percona/controller" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/percona/controller" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/percona/controller/pgupgrade/controller.go b/percona/controller/pgupgrade/controller.go index 4a53ce64d6..e8582cdebf 100644 --- a/percona/controller/pgupgrade/controller.go +++ b/percona/controller/pgupgrade/controller.go @@ -16,11 +16,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/percona/extensions" - pgv2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" - crunchyv1beta1 "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/percona/extensions" + pgv2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + crunchyv1beta1 "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) const ( diff --git a/percona/controller/utils.go b/percona/controller/utils.go index 6f0a509cae..0a0002a08b 100644 --- a/percona/controller/utils.go +++ b/percona/controller/utils.go @@ -11,8 +11,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" ) // jobCompleted returns "true" if the Job provided completed successfully. Otherwise it returns diff --git a/percona/extensions/k8s.go b/percona/extensions/k8s.go index 7cf5839ae5..f2ab488eb6 100644 --- a/percona/extensions/k8s.go +++ b/percona/extensions/k8s.go @@ -6,7 +6,7 @@ import ( corev1 "k8s.io/api/core/v1" - pgv2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + pgv2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) func GetExtensionKey(pgMajor int, name, version string) string { diff --git a/percona/pgbackrest/pgbackrest.go b/percona/pgbackrest/pgbackrest.go index 35d51f36e6..80ebcb6b48 100644 --- a/percona/pgbackrest/pgbackrest.go +++ b/percona/pgbackrest/pgbackrest.go @@ -5,14 +5,19 @@ import ( "context" "encoding/json" "fmt" + "net/http" + "strconv" "strings" + "github.com/hashicorp/go-cleanhttp" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" - "github.com/percona/percona-postgresql-operator/internal/naming" - "github.com/percona/percona-postgresql-operator/percona/clientcmd" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/internal/feature" + "github.com/superfly/percona-postgresql-operator/internal/naming" + pgbackrestapi "github.com/superfly/percona-postgresql-operator/internal/pgbackrest-server/api" + "github.com/superfly/percona-postgresql-operator/percona/clientcmd" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) type InfoOutput []InfoStanza @@ -50,21 +55,59 @@ const ( ) func GetInfo(ctx context.Context, pod *corev1.Pod, repoName string) (InfoOutput, error) { - stdout, stderr := new(bytes.Buffer), new(bytes.Buffer) + out := InfoOutput{} - c, err := clientcmd.NewClient() - if err != nil { - return InfoOutput{}, errors.Wrap(err, "failed to create client") - } + if feature.Enabled(ctx, feature.PGBackRestHTTP) { + repo, err := strconv.Atoi(strings.TrimPrefix(repoName, "repo")) + if err != nil { + return InfoOutput{}, errors.Wrap(err, "failed to parse repo number") + } - if err := c.Exec(ctx, pod, naming.ContainerDatabase, nil, stdout, stderr, "pgbackrest", "info", "--output=json", "--repo="+strings.TrimPrefix(repoName, "repo")); err != nil { - return InfoOutput{}, errors.Wrapf(err, "exec: %s", stderr.String()) - } + opts := pgbackrestapi.InfoCommandOptions{ + Output: "json", + Repo: repo, + } - out := InfoOutput{} + var body bytes.Buffer + err = json.NewEncoder(&body).Encode(opts) + if err != nil { + return InfoOutput{}, errors.Wrap(err, "failed to marshal pgBackRest info options") + } + + url := fmt.Sprintf("https://%s.%s-pods.%s.svc:4422/pgbackrest/api", pod.Name, pod.Namespace, pod.Namespace) + req, err := http.NewRequest(http.MethodPost, url, &body) + if err != nil { + return InfoOutput{}, errors.Wrap(err, "failed to create request") + } + req.Header.Set("Content-Type", "application/json") + // req.Header.Set("User-Agent", "") + + client := &http.Client{ + Transport: cleanhttp.DefaultPooledTransport(), + } + resp, err := client.Do(req) + + if err := json.NewDecoder(resp.Body).Decode(&out); err != nil { + return InfoOutput{}, errors.Wrap(err, "failed to decode pgBackRest info response") + } + } else { + stdout, stderr := new(bytes.Buffer), new(bytes.Buffer) - if err := json.Unmarshal(stdout.Bytes(), &out); err != nil { - return InfoOutput{}, errors.Wrap(err, "failed to unmarshal pgBackRest info output") + c, err := clientcmd.NewClient() + if err != nil { + return InfoOutput{}, errors.Wrap(err, "failed to create client") + } + + if err := c.Exec(ctx, pod, naming.ContainerDatabase, nil, stdout, stderr, "pgbackrest", "info", "--output=json", "--repo="+strings.TrimPrefix(repoName, "repo")); err != nil { + return InfoOutput{}, errors.Wrapf(err, "exec: %s", stderr.String()) + } + + // if err := json.Unmarshal(stdout.Bytes(), &out); err != nil { + // return InfoOutput{}, errors.Wrap(err, "failed to unmarshal pgBackRest info output") + // } + if err := json.NewDecoder(stdout).Decode(&out); err != nil { + return InfoOutput{}, errors.Wrap(err, "failed to unmarshal pgBackRest info output") + } } for _, elem := range out { diff --git a/percona/pmm/pmm.go b/percona/pmm/pmm.go index c2c45f6043..7fd1a95b05 100644 --- a/percona/pmm/pmm.go +++ b/percona/pmm/pmm.go @@ -7,7 +7,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) const ( diff --git a/percona/postgres/common.go b/percona/postgres/common.go index a7b446ad44..ccb02c099c 100644 --- a/percona/postgres/common.go +++ b/percona/postgres/common.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "sigs.k8s.io/controller-runtime/pkg/client" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) func GetPrimaryPod(ctx context.Context, cli client.Client, cr *v2.PerconaPGCluster) (*corev1.Pod, error) { diff --git a/percona/runtime/runtime.go b/percona/runtime/runtime.go index 64cbad1569..af972006a2 100644 --- a/percona/runtime/runtime.go +++ b/percona/runtime/runtime.go @@ -13,8 +13,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" metricsServer "sigs.k8s.io/controller-runtime/pkg/metrics/server" - r "github.com/percona/percona-postgresql-operator/internal/controller/runtime" - "github.com/percona/percona-postgresql-operator/internal/feature" + r "github.com/superfly/percona-postgresql-operator/internal/controller/runtime" + "github.com/superfly/percona-postgresql-operator/internal/feature" ) // default refresh interval in minutes diff --git a/percona/version/service/client/api_version_proto_client.go b/percona/version/service/client/api_version_proto_client.go index 82aeb57415..42dd0d0d39 100644 --- a/percona/version/service/client/api_version_proto_client.go +++ b/percona/version/service/client/api_version_proto_client.go @@ -10,7 +10,7 @@ import ( httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/percona/percona-postgresql-operator/percona/version/service/client/version_service" + "github.com/superfly/percona-postgresql-operator/percona/version/service/client/version_service" ) // Default API version proto HTTP client. diff --git a/percona/version/service/client/version_service/version_service_apply_responses.go b/percona/version/service/client/version_service/version_service_apply_responses.go index e1357b86bd..1a93ca4878 100644 --- a/percona/version/service/client/version_service/version_service_apply_responses.go +++ b/percona/version/service/client/version_service/version_service_apply_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/percona/percona-postgresql-operator/percona/version/service/client/models" + "github.com/superfly/percona-postgresql-operator/percona/version/service/client/models" ) // VersionServiceApplyReader is a Reader for the VersionServiceApply structure. diff --git a/percona/version/service/client/version_service/version_service_operator_responses.go b/percona/version/service/client/version_service/version_service_operator_responses.go index dd5449f1a8..236b21dae0 100644 --- a/percona/version/service/client/version_service/version_service_operator_responses.go +++ b/percona/version/service/client/version_service/version_service_operator_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/percona/percona-postgresql-operator/percona/version/service/client/models" + "github.com/superfly/percona-postgresql-operator/percona/version/service/client/models" ) // VersionServiceOperatorReader is a Reader for the VersionServiceOperator structure. diff --git a/percona/version/service/client/version_service/version_service_product_responses.go b/percona/version/service/client/version_service/version_service_product_responses.go index 8464af47b5..86688cdcfa 100644 --- a/percona/version/service/client/version_service/version_service_product_responses.go +++ b/percona/version/service/client/version_service/version_service_product_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/percona/percona-postgresql-operator/percona/version/service/client/models" + "github.com/superfly/percona-postgresql-operator/percona/version/service/client/models" ) // VersionServiceProductReader is a Reader for the VersionServiceProduct structure. diff --git a/percona/version/version.go b/percona/version/version.go index bcdc7b54bc..7a0283743d 100644 --- a/percona/version/version.go +++ b/percona/version/version.go @@ -9,9 +9,9 @@ import ( "github.com/pkg/errors" - "github.com/percona/percona-postgresql-operator/percona/version/service/client" - "github.com/percona/percona-postgresql-operator/percona/version/service/client/version_service" - v2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/percona/version/service/client" + "github.com/superfly/percona-postgresql-operator/percona/version/service/client/version_service" + v2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) type Meta struct { diff --git a/percona/watcher/wal.go b/percona/watcher/wal.go index f28fdf1e58..4a83098a8e 100644 --- a/percona/watcher/wal.go +++ b/percona/watcher/wal.go @@ -12,11 +12,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/percona/clientcmd" - "github.com/percona/percona-postgresql-operator/percona/pgbackrest" - perconaPG "github.com/percona/percona-postgresql-operator/percona/postgres" - pgv2 "github.com/percona/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/percona/clientcmd" + "github.com/superfly/percona-postgresql-operator/percona/pgbackrest" + perconaPG "github.com/superfly/percona-postgresql-operator/percona/postgres" + pgv2 "github.com/superfly/percona-postgresql-operator/pkg/apis/pgv2.percona.com/v2" ) const ( diff --git a/pkg/apis/pgv2.percona.com/v2/perconapgbackup_types.go b/pkg/apis/pgv2.percona.com/v2/perconapgbackup_types.go index 179944d7dd..2c4a445546 100644 --- a/pkg/apis/pgv2.percona.com/v2/perconapgbackup_types.go +++ b/pkg/apis/pgv2.percona.com/v2/perconapgbackup_types.go @@ -8,7 +8,7 @@ import ( v "github.com/hashicorp/go-version" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - crunchyv1beta1 "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + crunchyv1beta1 "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func init() { diff --git a/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go b/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go index 4ffaac620c..433569712e 100644 --- a/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go +++ b/pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go @@ -11,10 +11,10 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/percona/percona-postgresql-operator/internal/logging" - "github.com/percona/percona-postgresql-operator/internal/naming" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" - crunchyv1beta1 "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/internal/logging" + "github.com/superfly/percona-postgresql-operator/internal/naming" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" + crunchyv1beta1 "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func init() { diff --git a/pkg/apis/pgv2.percona.com/v2/perconapgupgrade_types.go b/pkg/apis/pgv2.percona.com/v2/perconapgupgrade_types.go index 9dc99076fe..c0fb6c3baa 100644 --- a/pkg/apis/pgv2.percona.com/v2/perconapgupgrade_types.go +++ b/pkg/apis/pgv2.percona.com/v2/perconapgupgrade_types.go @@ -4,7 +4,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - crunchyv1beta1 "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + crunchyv1beta1 "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" ) func init() { diff --git a/pkg/apis/pgv2.percona.com/v2/zz_generated.deepcopy.go b/pkg/apis/pgv2.percona.com/v2/zz_generated.deepcopy.go index 4fe0c6c79e..6a97d8edf8 100644 --- a/pkg/apis/pgv2.percona.com/v2/zz_generated.deepcopy.go +++ b/pkg/apis/pgv2.percona.com/v2/zz_generated.deepcopy.go @@ -9,7 +9,7 @@ package v2 import ( - "github.com/percona/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" + "github.com/superfly/percona-postgresql-operator/pkg/apis/postgres-operator.crunchydata.com/v1beta1" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go index 69dceec600..aaf4bd7b1d 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go @@ -15,7 +15,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" - pNaming "github.com/percona/percona-postgresql-operator/percona/naming" + pNaming "github.com/superfly/percona-postgresql-operator/percona/naming" ) // PostgresClusterSpec defines the desired state of PostgresCluster