Skip to content

K8SPG-792 Make patroni check check respect default image settings#1167

Merged
hors merged 7 commits into
percona:mainfrom
Kajot-dev:fix/patroni-check-default-image
Jun 30, 2025
Merged

K8SPG-792 Make patroni check check respect default image settings#1167
hors merged 7 commits into
percona:mainfrom
Kajot-dev:fix/patroni-check-default-image

Conversation

@Kajot-dev

@Kajot-dev Kajot-dev commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

K8SPG-792 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
See #1148

Cause:
Makes pod with patroni version check respect default image if there is any

Solution:
Wrapped around builtin PGO function from upstream. Would be a problem importing pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go into PGO config module due to dependency cycle.

fixes: #1148

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?

Signed-off-by: Jakub Jaruszewski <jjaruszewski@man.poznan.pl>
@it-percona-cla

it-percona-cla commented Jun 10, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread internal/config/config.go Outdated
}
}

func (cr *PerconaPGCluster) PostgresImage() string {

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.

We can introduce a very basic unit test to verify in a consistent way the functionality in future iterations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added unit tests for the default image behaviour

Signed-off-by: Jakub Jaruszewski <jjaruszewski@man.poznan.pl>
Signed-off-by: Jakub Jaruszewski <jjaruszewski@man.poznan.pl>
@Kajot-dev
Kajot-dev requested a review from gkech June 13, 2025 13:06
Comment thread pkg/apis/pgv2.percona.com/v2/perconapgcluster_types_test.go
Signed-off-by: Jakub Jaruszewski <jjaruszewski@man.poznan.pl>
@Kajot-dev
Kajot-dev requested a review from gkech June 18, 2025 11:09
Kajot-dev and others added 2 commits June 25, 2025 20:58
Signed-off-by: Jakub Jaruszewski <jjaruszewski@man.poznan.pl>
@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
backup-enable-disable passed 00:00:00
custom-extensions passed 00:00:00
custom-tls passed 00:00:00
demand-backup passed 00:00:00
finalizers passed 00:04:30
init-deploy passed 00:00:00
monitoring passed 00:00:00
monitoring-pmm3 passed 00:00:00
one-pod passed 00:00:00
operator-self-healing passed 00:00:00
pitr passed 00:00:00
scaling passed 00:05:47
scheduled-backup passed 00:00:00
self-healing passed 00:00:00
sidecars passed 00:00:00
start-from-backup passed 00:00:00
tablespaces passed 00:00:00
telemetry-transfer passed 00:00:00
upgrade-consistency passed 00:00:00
upgrade-minor passed 00:00:00
users passed 00:00:00
We run 21 out of 21 00:10:17

commit: ad5c5a4
image: perconalab/percona-postgresql-operator:PR-1167-ad5c5a430

@hors
hors merged commit da41261 into percona:main Jun 30, 2025
14 checks passed
@hors

hors commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

@Kajot-dev thank you for your contribution. We will include this fix in PGO 2.7.0.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patroni Version check does not respect default images defined in env variables

6 participants