Skip to content

K8SPG-1080 v3 module#1686

Draft
oksana-grishchenko wants to merge 1 commit into
mainfrom
K8SPG-1080-v3-module
Draft

K8SPG-1080 v3 module#1686
oksana-grishchenko wants to merge 1 commit into
mainfrom
K8SPG-1080-v3-module

Conversation

@oksana-grishchenko

Copy link
Copy Markdown
Contributor

v3 module

Problem:
PG 3.0.0 is released while go module still references v2 which makes it harder to use it.

Solution:
Implement v3 module

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Comment thread hack/create-todo-patch.sh
Comment on lines 35 to +37
python3 -m yq -r \
.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.customTLSSecret.properties.name.description \
"${clusters_dir}/generated/upstream.pgv2.percona.com_postgresclusters.yaml"
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
python3 -m yq -r \
.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.customTLSSecret.properties.name.description \
"${clusters_dir}/generated/upstream.pgv2.percona.com_postgresclusters.yaml"
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml"
python3 -m yq -r \
.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.customTLSSecret.properties.name.description \
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml"

Comment thread hack/create-todo-patch.sh
@@ -34,7 +34,7 @@ echo "Generating Kustomize patch file for removing Kube API TODOs"
name_desc_with_todo=$(
python3 -m yq -r \
.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.customTLSSecret.properties.name.description \
"${clusters_dir}/generated/upstream.pgv2.percona.com_postgresclusters.yaml"
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml"
)
name_desc_without_todo=$(sed 's/ TODO.*//g' <<< "${name_desc_with_todo}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
name_desc_without_todo=$(sed 's/ TODO.*//g' <<< "${name_desc_with_todo}")
name_desc_without_todo=$(sed 's/ TODO.*//g' <<<"${name_desc_with_todo}")

Comment thread hack/create-todo-patch.sh
@@ -44,11 +44,11 @@ python3 -m yq -y --arg old "${name_desc_with_todo}" --arg new "${name_desc_witho
[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"
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml" > "${clusters_dir}/todos.yaml"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml" > "${clusters_dir}/todos.yaml"
"${clusters_dir}/generated/upstream.pgv3.percona.com_postgresclusters.yaml" >"${clusters_dir}/todos.yaml"

Comment thread hack/create-todo-patch.sh

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" }]
' \
"${upgrades_dir}/generated/upstream.pgv2.percona.com_pgupgrades.yaml" > "${upgrades_dir}/todos.yaml"
"${upgrades_dir}/generated/upstream.pgv3.percona.com_pgupgrades.yaml" > "${upgrades_dir}/todos.yaml"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
"${upgrades_dir}/generated/upstream.pgv3.percona.com_pgupgrades.yaml" > "${upgrades_dir}/todos.yaml"
"${upgrades_dir}/generated/upstream.pgv3.percona.com_pgupgrades.yaml" >"${upgrades_dir}/todos.yaml"

@@ -29,25 +29,25 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"

certmanagerscheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
certmanagerscheme "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/scheme"

@@ -15,9 +15,9 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
"sigs.k8s.io/controller-runtime/pkg/client"

@@ -20,11 +20,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/yaml"

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change

@@ -20,12 +20,12 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/percona/percona-postgresql-operator/v2/internal/feature"
"github.com/percona/percona-postgresql-operator/v3/internal/feature"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change

Comment on lines 19 to 20
volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"

@@ -17,9 +17,9 @@ import (

"github.com/pkg/errors"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

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

Comment on lines 16 to 17
"github.com/pkg/errors"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
"github.com/pkg/errors"

Comment on lines 16 to 17
"github.com/pkg/errors"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
"github.com/pkg/errors"

"github.com/percona/percona-postgresql-operator/v3/internal/logging"
"github.com/percona/percona-postgresql-operator/v3/internal/naming"
v2 "github.com/percona/percona-postgresql-operator/v3/pkg/apis/pgv3.percona.com/v2"
"github.com/percona/percona-postgresql-operator/v3/pkg/apis/upstream.pgv3.percona.com/v1beta1"
"github.com/pkg/errors"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
"github.com/pkg/errors"

@@ -21,12 +21,12 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"

volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

apierrors "k8s.io/apimachinery/pkg/api/errors"
"github.com/pkg/errors"

@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
backup-enable-disable skipped 00:00:00
builtin-extensions skipped 00:00:00
cert-manager-tls skipped 00:00:00
custom-envs skipped 00:00:00
custom-tls skipped 00:00:00
database-init-sql skipped 00:00:00
demand-backup skipped 00:00:00
demand-backup-offline-snapshot skipped 00:00:00
dynamic-configuration skipped 00:00:00
finalizers skipped 00:00:00
init-deploy skipped 00:00:00
huge-pages skipped 00:00:00
major-upgrade-14-to-15 skipped 00:00:00
major-upgrade-15-to-16 skipped 00:00:00
major-upgrade-16-to-17 skipped 00:00:00
major-upgrade-17-to-18 skipped 00:00:00
ldap skipped 00:00:00
ldap-tls skipped 00:00:00
monitoring skipped 00:00:00
monitoring-pmm3 skipped 00:00:00
one-pod skipped 00:00:00
operator-self-healing skipped 00:00:00
pitr skipped 00:00:00
scaling skipped 00:00:00
scheduled-backup skipped 00:00:00
self-healing skipped 00:00:00
sidecars skipped 00:00:00
standby-pgbackrest skipped 00:00:00
standby-streaming skipped 00:00:00
start-from-backup skipped 00:00:00
tablespaces skipped 00:00:00
telemetry-transfer skipped 00:00:00
upgrade-consistency skipped 00:00:00
upgrade-minor skipped 00:00:00
users skipped 00:00:00
migration-from-crunchy-standby skipped 00:00:00
migration-from-crunchy-pv skipped 00:00:00
migration-from-crunchy-backup-restore skipped 00:00:00
Summary Value
Tests Run 0/38
Job Duration 00:05:02
Total Test Time N/A

commit: 1793a01
image: perconalab/percona-postgresql-operator:PR-1686-1793a01d5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants