Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 30, 2025

Conversation

Kajot-dev
Copy link
Contributor

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

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
Copy link

it-percona-cla commented Jun 10, 2025

CLA assistant check
All committers have signed the CLA.

@@ -245,6 +246,12 @@ func (cr *PerconaPGCluster) Default() {
}
}

func (cr *PerconaPGCluster) PostgresImage() string {
Copy link
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
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
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
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
Copy link
Collaborator

hors commented Jun 30, 2025

@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