Skip to content

Conversation

@pooknull
Copy link
Contributor

@pooknull pooknull commented Oct 1, 2025

K8SPG-833 Powered by Pull Request Badge

https://perconadev.atlassian.net/browse/K8SPG-833

DESCRIPTION

This PR fixes two issues:

  1. When a secret is specified in envFrom but does not exist, the operator proceeds to create the cluster and fails. With these changes the operator will not create or update a cluster until the secret exists.
  2. The operator does not reconcile when an envFrom secret is updated. Currently, it only watches secrets with the postgres-operator.crunchydata.com/cluster label. To call reconcile on envFrom secrets update, the field index was added that allows to list all clusters referencing a specific envFrom secret. Using this index, the new watchEnvFromSecrets function will call reconcile for clusters that depend on those secrets

There are no unit tests for this change, because it is difficult to test watch functions. All related tests were previously removed for this reason

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?

@pooknull pooknull marked this pull request as ready for review October 1, 2025 11:45
@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable passed 00:07:48
custom-extensions passed 00:14:10
custom-tls passed 00:05:42
database-init-sql passed 00:03:31
demand-backup passed 00:22:55
finalizers passed 00:03:49
init-deploy passed 00:03:04
monitoring passed 00:07:52
monitoring-pmm3 passed 00:08:13
one-pod passed 00:05:37
operator-self-healing passed 00:08:14
pgvector-extension passed 00:02:45
pitr passed 00:11:34
scaling passed 00:04:54
scheduled-backup passed 00:27:39
self-healing passed 00:09:23
sidecars passed 00:02:35
start-from-backup passed 00:11:40
tablespaces passed 00:06:54
telemetry-transfer passed 00:03:25
upgrade-consistency passed 00:08:23
upgrade-minor passed 00:06:02
users passed 00:04:27
We run 23 out of 23 03:10:51

commit: 95e01dc
image: perconalab/percona-postgresql-operator:PR-1306-95e01dc5c

@gkech gkech merged commit a1852ac into main Oct 3, 2025
18 checks passed
@gkech gkech deleted the K8SPG-833-fix branch October 3, 2025 09:31
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.

6 participants