Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
1793a01
K8SPG-1080 v3 module
oksana-grishchenko Jul 14, 2026
f366bc3
revert ubi9
oksana-grishchenko Jul 15, 2026
3321e3f
linter
oksana-grishchenko Jul 15, 2026
33fa9d3
linter
oksana-grishchenko Jul 15, 2026
d053f7a
linter
oksana-grishchenko Jul 15, 2026
7494bf2
linter
oksana-grishchenko Jul 15, 2026
2597b8f
linter
oksana-grishchenko Jul 15, 2026
8e6836c
linter
oksana-grishchenko Jul 15, 2026
c795f09
linter
oksana-grishchenko Jul 15, 2026
1f51ff2
linter
oksana-grishchenko Jul 15, 2026
571589a
linter
oksana-grishchenko Jul 15, 2026
267d84d
linter
oksana-grishchenko Jul 15, 2026
684acf8
linter
oksana-grishchenko Jul 15, 2026
aa8659a
linter
oksana-grishchenko Jul 15, 2026
e19f7c6
linter
oksana-grishchenko Jul 15, 2026
8ae5f9b
linter
oksana-grishchenko Jul 15, 2026
618352c
linter
oksana-grishchenko Jul 15, 2026
c110cef
linter
oksana-grishchenko Jul 15, 2026
dbbc78e
linter
oksana-grishchenko Jul 15, 2026
8c19414
linter
oksana-grishchenko Jul 15, 2026
82786c4
linter
oksana-grishchenko Jul 15, 2026
d3f5f0b
linter
oksana-grishchenko Jul 15, 2026
b5fb714
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 15, 2026
1f27d6e
linter & shellcheck
oksana-grishchenko Jul 15, 2026
50116ca
upd Jenkinsfile
oksana-grishchenko Jul 15, 2026
32bc51e
upd reviewdog.yml
oksana-grishchenko Jul 15, 2026
89bf8b6
linter
oksana-grishchenko Jul 15, 2026
ea8c779
fix flaky test
oksana-grishchenko Jul 16, 2026
4fcd5ff
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 16, 2026
4d80307
fix upgrade test
oksana-grishchenko Jul 16, 2026
47274f8
fix upgrade test
oksana-grishchenko Jul 16, 2026
a73fc80
revert the upgrade-minor test to main state
oksana-grishchenko Jul 20, 2026
53830c1
revert GroupVersion
oksana-grishchenko Jul 20, 2026
ad805d2
revert local changes mistakenly committed
oksana-grishchenko Jul 20, 2026
78a8d0b
Merge branch 'refs/heads/main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 20, 2026
dfc12b4
fix build failure
oksana-grishchenko Jul 20, 2026
2d44e62
revert mistakenly commited dockerfile changes
oksana-grishchenko Jul 20, 2026
d02592c
revert Dockerfile
oksana-grishchenko Jul 22, 2026
67d80be
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 22, 2026
dd73068
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 22, 2026
811c9a4
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 24, 2026
ff8600f
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 24, 2026
9cf64a9
Merge remote-tracking branch 'origin/K8SPG-1080-v3-module' into K8SPG…
oksana-grishchenko Jul 24, 2026
35ab529
fix merge conflict
oksana-grishchenko Jul 24, 2026
5841f62
revert Dockerfile
oksana-grishchenko Jul 24, 2026
512b2ce
Merge branch 'main' into K8SPG-1080-v3-module
oksana-grishchenko Jul 27, 2026
0e21271
adapt latest main
oksana-grishchenko Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- uses: reviewdog/action-alex@347481655add010a2ae302df34b57c9bcfa0d6e4 # v1
with:
github_token: ${{ secrets.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ pipeline {
-e GO111MODULE=on \
golang:1.26.0 sh -c '
go install github.com/google/go-licenses@latest;
/go/bin/go-licenses csv github.com/percona/percona-postgresql-operator/v2/cmd/postgres-operator \
/go/bin/go-licenses csv github.com/percona/percona-postgresql-operator/v3/cmd/postgres-operator \
| cut -d , -f 3 \
| sort -u \
> go-licenses-new || :
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ build-postgres-operator: ## Build the postgres-operator binary
) --trimpath -o bin/postgres-operator ./cmd/postgres-operator

##@ Test
GOLANGCI_LINT_VERSION ?= v2.12.2

.PHONY: lint
lint: ## Run golangci-lint (same as CI)
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) run --timeout 5m --max-issues-per-linter 0 --max-same-issues 0

.PHONY: check
check: ## Run basic go tests with coverage output
check: get-pgmonitor
Expand Down
4 changes: 2 additions & 2 deletions cmd/extension-installer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"path"

"github.com/percona/percona-postgresql-operator/v2/percona/extensions"
"github.com/percona/percona-postgresql-operator/v3/percona/extensions"
)

func main() {
Expand Down Expand Up @@ -77,7 +77,7 @@ func initStorage(storageType extensions.StorageType, endpoint, bucket, region st
case extensions.StorageTypeS3:
return extensions.NewS3(endpoint, region, bucket, s3ForcePathStyle, disableSSL)
default:
log.Fatalf("unknown storage type: %s", os.Getenv("STORAGE_TYPE"))
log.Fatalf("unknown storage type: %s", string(storageType))
}

return nil
Expand Down
6 changes: 5 additions & 1 deletion cmd/pgbackrest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ func (k *KubeAPI) Exec(ctx context.Context, namespace, pod, container string, st
}, ParameterCodec)

exec, err := remotecommand.NewSPDYExecutor(k.Config, "POST", request.URL())
if err != nil {
log.Error(err)
return err
}

stdoutReader, stdoutWriter := io.Pipe()
defer func() {
Expand Down Expand Up @@ -384,7 +388,7 @@ else
fi
`

localHashCmd := exec.Command("bash", "-ceu", "--", localScript)
localHashCmd := exec.CommandContext(ctx, "bash", "-ceu", "--", localScript)
hashOutput, err := localHashCmd.Output()
if err != nil {
log.Fatalf("unable to calculate hash for pgBackRest config: %v", err)
Expand Down
47 changes: 23 additions & 24 deletions cmd/postgres-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"

certmanagerscheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme"
Comment thread
oksana-grishchenko marked this conversation as resolved.
"github.com/percona/percona-postgresql-operator/v2/internal/controller/pgupgrade"
"github.com/percona/percona-postgresql-operator/v2/internal/controller/postgrescluster"
"github.com/percona/percona-postgresql-operator/v2/internal/controller/runtime"
"github.com/percona/percona-postgresql-operator/v2/internal/controller/standalone_pgadmin"
"github.com/percona/percona-postgresql-operator/v2/internal/feature"
"github.com/percona/percona-postgresql-operator/v2/internal/logging"
"github.com/percona/percona-postgresql-operator/v2/internal/naming"
"github.com/percona/percona-postgresql-operator/v2/internal/upgradecheck"
"github.com/percona/percona-postgresql-operator/v2/percona/certmanager"
perconaController "github.com/percona/percona-postgresql-operator/v2/percona/controller"
"github.com/percona/percona-postgresql-operator/v2/percona/controller/pgbackup"
"github.com/percona/percona-postgresql-operator/v2/percona/controller/pgcluster"
"github.com/percona/percona-postgresql-operator/v2/percona/controller/pgrestore"
perconaPGUpgrade "github.com/percona/percona-postgresql-operator/v2/percona/controller/pgupgrade"
"github.com/percona/percona-postgresql-operator/v2/percona/k8s"
perconaRuntime "github.com/percona/percona-postgresql-operator/v2/percona/runtime"
"github.com/percona/percona-postgresql-operator/v2/percona/utils/registry"
v2 "github.com/percona/percona-postgresql-operator/v2/pkg/apis/pgv2.percona.com/v2"
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/upstream.pgv2.percona.com/v1beta1"
"github.com/percona/percona-postgresql-operator/v3/internal/controller/pgupgrade"
"github.com/percona/percona-postgresql-operator/v3/internal/controller/postgrescluster"
"github.com/percona/percona-postgresql-operator/v3/internal/controller/runtime"
"github.com/percona/percona-postgresql-operator/v3/internal/controller/standalone_pgadmin"
"github.com/percona/percona-postgresql-operator/v3/internal/feature"
"github.com/percona/percona-postgresql-operator/v3/internal/logging"
"github.com/percona/percona-postgresql-operator/v3/internal/naming"
"github.com/percona/percona-postgresql-operator/v3/internal/upgradecheck"
"github.com/percona/percona-postgresql-operator/v3/percona/certmanager"
perconaController "github.com/percona/percona-postgresql-operator/v3/percona/controller"
"github.com/percona/percona-postgresql-operator/v3/percona/controller/pgbackup"
"github.com/percona/percona-postgresql-operator/v3/percona/controller/pgcluster"
"github.com/percona/percona-postgresql-operator/v3/percona/controller/pgrestore"
perconaPGUpgrade "github.com/percona/percona-postgresql-operator/v3/percona/controller/pgupgrade"
"github.com/percona/percona-postgresql-operator/v3/percona/k8s"
perconaRuntime "github.com/percona/percona-postgresql-operator/v3/percona/runtime"
"github.com/percona/percona-postgresql-operator/v3/percona/utils/registry"
v2 "github.com/percona/percona-postgresql-operator/v3/pkg/apis/pgv2.percona.com/v2"
"github.com/percona/percona-postgresql-operator/v3/pkg/apis/upstream.pgv2.percona.com/v1beta1"
)

var (
Expand Down Expand Up @@ -156,7 +156,7 @@ func addControllersToManager(ctx context.Context, mgr manager.Manager) error {
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Owner: postgrescluster.ControllerName,
Recorder: mgr.GetEventRecorderFor(postgrescluster.ControllerName),
Recorder: mgr.GetEventRecorderFor(postgrescluster.ControllerName), //nolint:staticcheck
Tracer: otel.Tracer(postgrescluster.ControllerName),
IsOpenShift: openShift,
CertManagerCtrlFunc: certmanager.NewController,
Expand Down Expand Up @@ -194,7 +194,7 @@ func addControllersToManager(ctx context.Context, mgr manager.Manager) error {
pc := &pgcluster.PGClusterReconciler{
Client: mgr.GetClient(),
Owner: pgcluster.PGClusterControllerName,
Recorder: mgr.GetEventRecorderFor(pgcluster.PGClusterControllerName),
Recorder: mgr.GetEventRecorderFor(pgcluster.PGClusterControllerName), //nolint:staticcheck
Tracer: otel.Tracer(pgcluster.PGClusterControllerName),
Platform: platform,
KubeVersion: getServerVersion(ctx, mgr.GetConfig()),
Expand Down Expand Up @@ -248,7 +248,7 @@ func addControllersToManager(ctx context.Context, mgr manager.Manager) error {
pr := &pgrestore.PGRestoreReconciler{
Client: mgr.GetClient(),
Owner: pgrestore.PGRestoreControllerName,
Recorder: mgr.GetEventRecorderFor(pgrestore.PGRestoreControllerName),
Recorder: mgr.GetEventRecorderFor(pgrestore.PGRestoreControllerName), //nolint:staticcheck
Tracer: otel.Tracer(pgrestore.PGRestoreControllerName),
}
if err := pr.SetupWithManager(mgr); err != nil {
Expand All @@ -274,7 +274,7 @@ func addControllersToManager(ctx context.Context, mgr manager.Manager) error {
pgAdminReconciler := &standalone_pgadmin.PGAdminReconciler{
Client: mgr.GetClient(),
Owner: "pgadmin-controller",
Recorder: mgr.GetEventRecorderFor(naming.ControllerPGAdmin),
Recorder: mgr.GetEventRecorderFor(naming.ControllerPGAdmin), //nolint:staticcheck
IsOpenShift: openShift,
}

Expand Down Expand Up @@ -521,7 +521,6 @@ func getLogLevel() zapcore.LevelEnabler {
}
}


type envConfig struct {
LeaderElection bool `default:"true" envconfig:"PGO_CONTROLLER_LEADER_ELECTION_ENABLED"`
LeaderElectionID string `envconfig:"PGO_CONTROLLER_LEASE_NAME"`
Expand Down
2 changes: 1 addition & 1 deletion cmd/postgres-operator/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"

"github.com/percona/percona-postgresql-operator/v2/internal/controller/runtime"
"github.com/percona/percona-postgresql-operator/v3/internal/controller/runtime"
)

func TestInitManager(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/postgres-operator/open_telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io"
"net/http"
"os"
"path/filepath"

"github.com/pkg/errors"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
Expand All @@ -35,7 +36,7 @@ func initOpenTelemetry() (func(), error) {
options := []stdouttrace.Option{}

if filename != "" {
file, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644)
file, err := os.OpenFile(filepath.Clean(filename), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644)
if err != nil {
return nil, errors.Wrap(err, "unable to open exporter file")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/percona/percona-postgresql-operator/v2
module github.com/percona/percona-postgresql-operator/v3

go 1.26.0

Expand Down
3 changes: 3 additions & 0 deletions hack/create-todo-patch.sh
Comment thread
oksana-grishchenko marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,19 @@ name_desc_with_todo=$(
.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.customTLSSecret.properties.name.description \
"${clusters_dir}/generated/upstream.pgv2.percona.com_postgresclusters.yaml"
)
# shellcheck disable=SC2001
name_desc_without_todo=$(sed 's/ TODO.*//g' <<< "${name_desc_with_todo}")
Comment thread
oksana-grishchenko marked this conversation as resolved.

# Generate a JSON patch file to update the "name" description for all applicable paths in the CRD.
# shellcheck disable=SC2016
python3 -m yq -y --arg old "${name_desc_with_todo}" --arg new "${name_desc_without_todo}" '
[{ op: "add", path: "/work", value: $new }] +
[paths(select(. == $old)) | { op: "copy", from: "/work", path: "/\(map(tostring) | join("/"))" }] +
[{ op: "remove", path: "/work" }]
' \
"${clusters_dir}/generated/upstream.pgv2.percona.com_postgresclusters.yaml" > "${clusters_dir}/todos.yaml"
Comment thread
oksana-grishchenko marked this conversation as resolved.

# shellcheck disable=SC2016
python3 -m yq -y --arg old "${name_desc_with_todo}" --arg new "${name_desc_without_todo}" '
[{ op: "add", path: "/work", value: $new }] +
[paths(select(. == $old)) | { op: "copy", from: "/work", path: "/\(map(tostring) | join("/"))" }] +
Expand Down
6 changes: 3 additions & 3 deletions internal/bridge/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/apimachinery/pkg/util/wait"

"github.com/percona/percona-postgresql-operator/v2/pkg/apis/upstream.pgv2.percona.com/v1beta1"
"github.com/percona/percona-postgresql-operator/v3/pkg/apis/upstream.pgv2.percona.com/v1beta1"
)

const defaultAPI = "https://api.crunchybridge.com"
Expand Down Expand Up @@ -279,7 +279,7 @@ func (c *Client) doWithBackoff(
request.Header = headers.Clone()

//nolint:bodyclose // This response is returned to the caller.
response, err = c.Client.Do(request)
response, err = c.Do(request)
}

// An error indicates there was no response from the server, and the
Expand Down Expand Up @@ -723,7 +723,7 @@ func (c *Client) UpdateCluster(
) (*ClusterApiResource, error) {
result := &ClusterApiResource{}

clusterbyte, err := json.Marshal(clusterRequestPayload)
clusterbyte, err := json.Marshal(clusterRequestPayload) //nolint:errchkjson //in case the struct changes, we would need to check the error anyway
if err != nil {
return result, err
}
Expand Down
24 changes: 12 additions & 12 deletions internal/bridge/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func TestClientBackoff(t *testing.T) {
client := NewClient("", "")
var total time.Duration

for i := 1; i <= 50 && client.Backoff.Steps > 0; i++ {
step := client.Backoff.Step()
for i := 1; i <= 50 && client.Backoff.Steps > 0; i++ { //nolint:staticcheck //test data
step := client.Backoff.Step() //nolint:staticcheck //test data
total += step

t.Logf("%02d:%20v%20v", i, step, total)
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestClientDoWithBackoff(t *testing.T) {

// Client with one attempt, i.e. no backoff.
client := NewClient(server.URL, "xyz")
client.Backoff.Steps = 1
client.Backoff.Steps = 1 //nolint:staticcheck //test data
assert.Equal(t, client.BaseURL.String(), server.URL)

ctx := context.Background()
Expand Down Expand Up @@ -111,8 +111,8 @@ func TestClientDoWithBackoff(t *testing.T) {

// Client with brief backoff.
client := NewClient(server.URL, "")
client.Backoff.Duration = time.Millisecond
client.Backoff.Steps = 5
client.Duration = time.Millisecond
client.Steps = 5
assert.Equal(t, client.BaseURL.String(), server.URL)

ctx := context.Background()
Expand Down Expand Up @@ -168,8 +168,8 @@ func TestClientDoWithBackoff(t *testing.T) {

// Client with brief backoff.
client := NewClient(server.URL, "")
client.Backoff.Duration = time.Millisecond
client.Backoff.Steps = 5
client.Duration = time.Millisecond
client.Steps = 5
assert.Equal(t, client.BaseURL.String(), server.URL)

ctx := context.Background()
Expand All @@ -188,8 +188,8 @@ func TestClientDoWithBackoff(t *testing.T) {

// Client with lots of brief backoff.
client := NewClient(server.URL, "")
client.Backoff.Duration = time.Millisecond
client.Backoff.Steps = 100
client.Duration = time.Millisecond
client.Steps = 100
assert.Equal(t, client.BaseURL.String(), server.URL)

ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)
Expand Down Expand Up @@ -1227,7 +1227,7 @@ func TestGetClusterRole(t *testing.T) {
}

t.Run("WeSendCorrectData", func(t *testing.T) {
responsePayloadJson, err := json.Marshal(clusterRoleApiResource)
responsePayloadJson, err := json.Marshal(clusterRoleApiResource) //nolint:gosec // test data, not a real secret
assert.NilError(t, err)

server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -1249,7 +1249,7 @@ func TestGetClusterRole(t *testing.T) {
})

t.Run("OkResponse", func(t *testing.T) {
responsePayloadJson, err := json.Marshal(clusterRoleApiResource)
responsePayloadJson, err := json.Marshal(clusterRoleApiResource) //nolint:gosec // test data, not a real secret
assert.NilError(t, err)

server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -1267,7 +1267,7 @@ func TestGetClusterRole(t *testing.T) {
})

t.Run("ErrorResponse", func(t *testing.T) {
responsePayloadJson, err := json.Marshal(clusterRoleApiResource)
responsePayloadJson, err := json.Marshal(clusterRoleApiResource) //nolint:gosec // test data, not a real secret
assert.NilError(t, err)

server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down
5 changes: 3 additions & 2 deletions internal/bridge/crunchybridgecluster/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"
"reflect"

"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand All @@ -22,7 +23,7 @@ func (r *CrunchyBridgeClusterReconciler) patch(
patch client.Patch, options ...client.PatchOption,
) error {
options = append([]client.PatchOption{r.Owner}, options...)
return r.Client.Patch(ctx, object, patch, options...)
return r.Patch(ctx, object, patch, options...)
}

// apply sends an apply patch to object's endpoint in the Kubernetes API and
Expand All @@ -36,7 +37,7 @@ func (r *CrunchyBridgeClusterReconciler) apply(ctx context.Context, object clien
// Generate an apply-patch by comparing the object to its zero value.
zero := reflect.New(reflect.TypeOf(object).Elem()).Interface()
data, err := client.MergeFrom(zero.(client.Object)).Data(object)
apply := client.RawPatch(client.Apply.Type(), data)
apply := client.RawPatch(types.ApplyPatchType, data)

// Send the apply-patch with force=true.
if err == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/event"

"github.com/percona/percona-postgresql-operator/v2/internal/bridge"
pgoRuntime "github.com/percona/percona-postgresql-operator/v2/internal/controller/runtime"
"github.com/percona/percona-postgresql-operator/v2/internal/naming"
"github.com/percona/percona-postgresql-operator/v2/pkg/apis/upstream.pgv2.percona.com/v1beta1"
"github.com/percona/percona-postgresql-operator/v3/internal/bridge"
pgoRuntime "github.com/percona/percona-postgresql-operator/v3/internal/controller/runtime"
"github.com/percona/percona-postgresql-operator/v3/internal/naming"
"github.com/percona/percona-postgresql-operator/v3/pkg/apis/upstream.pgv2.percona.com/v1beta1"
)

// CrunchyBridgeClusterReconciler reconciles a CrunchyBridgeCluster object
Expand Down Expand Up @@ -79,7 +79,7 @@ func (r *CrunchyBridgeClusterReconciler) SetupWithManager(
func (r *CrunchyBridgeClusterReconciler) setControllerReference(
owner *v1beta1.CrunchyBridgeCluster, controlled client.Object,
) error {
return controllerutil.SetControllerReference(owner, controlled, r.Client.Scheme())
return controllerutil.SetControllerReference(owner, controlled, r.Scheme())
}

//+kubebuilder:rbac:groups="upstream.pgv2.percona.com",resources="crunchybridgeclusters",verbs={get,patch,update}
Expand Down Expand Up @@ -669,7 +669,7 @@ func (r *CrunchyBridgeClusterReconciler) GetSecretKeys(
}}

err := errors.WithStack(
r.Client.Get(ctx, client.ObjectKeyFromObject(existing), existing))
r.Get(ctx, client.ObjectKeyFromObject(existing), existing))

if err == nil {
if existing.Data["key"] != nil && existing.Data["team"] != nil {
Expand All @@ -692,7 +692,7 @@ func (r *CrunchyBridgeClusterReconciler) deleteControlled(
version := object.GetResourceVersion()
exactly := client.Preconditions{UID: &uid, ResourceVersion: &version}

return r.Client.Delete(ctx, object, exactly)
return r.Delete(ctx, object, exactly)
}

return nil
Expand Down
Loading
Loading