Skip to content

K8SPG-1055 Adopt test infrastructure for running upstream PostgreSQL containers#1612

Open
hors wants to merge 8 commits into
mainfrom
community-images
Open

K8SPG-1055 Adopt test infrastructure for running upstream PostgreSQL containers#1612
hors wants to merge 8 commits into
mainfrom
community-images

Conversation

@hors

@hors hors commented May 23, 2026

Copy link
Copy Markdown
Collaborator

CHANGE DESCRIPTION

Problem:
Many PostgreSQL users and organizations have a strong preference for upstream, unmodified container images and actively avoid vendor-specific builds to prevent lock-in and maintain full control over their database software supply chain. By enabling the Percona Operator for PostgreSQL to work with community PostgreSQL images, Percona removes a key adoption barrier for teams with strict open-source or procurement policies.

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 review requested due to automatic review settings May 23, 2026 19:16

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.

Pull request overview

This PR updates E2E execution to run with community PostgreSQL image defaults.

Changes:

  • Sets PG_DISTRIBUTION=community in the Jenkins KUTTL test runner.
  • Adds community-specific default images for PostgreSQL, pgBouncer, pgBackRest, and upgrade jobs.
  • Updates PostgreSQL version extraction from IMAGE_POSTGRESQL.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Jenkinsfile Enables community image distribution for Jenkins E2E test runs.
e2e-tests/vars.sh Adds community image defaults and adjusts PostgreSQL version parsing.

Comment thread e2e-tests/vars.sh
export IMAGE=${IMAGE:-"${IMAGE_BASE}:${VERSION}"}
if [[ ! $PG_VER && $IMAGE_POSTGRESQL ]]; then
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*:(.*ppg)?([0-9]+).*/\2/')
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*-(ppg|postgres)([0-9]+).*/\2/')
Copilot AI review requested due to automatic review settings June 5, 2026 08:45

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread e2e-tests/vars.sh
Comment on lines 34 to 39
if [[ ! $PG_VER && $IMAGE_POSTGRESQL ]]; then
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*:(.*ppg)?([0-9]+).*/\2/')
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*-(ppg|postgres)([0-9]+).*/\2/')
export PG_VER="${pg_version_value}"
else
export PG_VER="${PG_VER:-18}"
fi
Comment on lines +8 to +9
# community images do not ship pg_stat_monitor; keep the patch so the
# cluster generation still increments and 06-assert.yaml passes.
Copilot AI review requested due to automatic review settings June 11, 2026 13:46

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread Jenkinsfile
Comment on lines 258 to 266
sh """
if [ ! -d "e2e-tests/logs" ]; then
mkdir "e2e-tests/logs"
fi
export KUBECONFIG=/tmp/$CLUSTER_NAME-$clusterSuffix
export PATH="\${KREW_ROOT:-\$HOME/.krew}/bin:\$PATH"
export PG_DISTRIBUTION=community
set -o pipefail
kubectl kuttl test --config e2e-tests/kuttl.yaml --test "^${testName}\$" |& tee e2e-tests/logs/${testName}.log
Copilot AI review requested due to automatic review settings June 13, 2026 17:21
@hors hors changed the title use community images K8SPG-1055 Adopt test infrastructure for running upstream PostgreSQL containers Jun 13, 2026

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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread e2e-tests/vars.sh
Comment on lines +35 to 36
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*-(ppg|postgres)([0-9]+).*/\2/')
export PG_VER="${pg_version_value}"
@hors hors marked this pull request as ready for review June 13, 2026 17:38
Copilot AI review requested due to automatic review settings June 13, 2026 17:38

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread e2e-tests/vars.sh
Comment on lines 34 to 36
if [[ ! $PG_VER && $IMAGE_POSTGRESQL ]]; then
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*:(.*ppg)?([0-9]+).*/\2/')
pg_version_value=$(echo "$IMAGE_POSTGRESQL" | sed -E 's/.*-(ppg|postgres)([0-9]+).*/\2/')
export PG_VER="${pg_version_value}"
@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
backup-enable-disable passed 00:12:33
builtin-extensions passed 00:05:36
cert-manager-tls passed 00:08:41
custom-envs passed 00:17:51
custom-tls passed 00:07:07
database-init-sql passed 00:02:19
demand-backup passed 00:22:35
demand-backup-offline-snapshot passed 00:13:24
dynamic-configuration passed 00:03:17
finalizers passed 00:03:26
init-deploy passed 00:02:53
huge-pages passed 00:03:00
major-upgrade-14-to-15 passed 00:10:08
major-upgrade-15-to-16 passed 00:10:39
major-upgrade-16-to-17 passed 00:10:43
major-upgrade-17-to-18 passed 00:09:19
ldap passed 00:03:38
ldap-tls passed 00:05:28
monitoring passed 00:07:51
monitoring-pmm3 passed 00:08:57
one-pod passed 00:05:40
operator-self-healing passed 00:10:10
pitr passed 00:11:33
scaling passed 00:04:45
scheduled-backup passed 00:26:48
self-healing passed 00:08:58
sidecars passed 00:02:46
standby-pgbackrest passed 00:19:27
standby-streaming passed 00:12:34
start-from-backup passed 00:10:45
tablespaces passed 00:06:57
telemetry-transfer passed 00:04:12
upgrade-consistency passed 00:07:08
upgrade-minor passed 00:06:12
users passed 00:04:41
Summary Value
Tests Run 35/35
Job Duration 01:41:44
Total Test Time 05:12:16

commit: 56d4ab1
image: perconalab/percona-postgresql-operator:PR-1612-56d4ab144

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.

4 participants