K8SPG-911: Fix enabling WAL encryption on a running cluster - #1774
Open
egegunes wants to merge 3 commits into
Open
K8SPG-911: Fix enabling WAL encryption on a running cluster#1774egegunes wants to merge 3 commits into
egegunes wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures pg_tde provider configuration waits until every database Pod is running and has pg_tde installed.
Changes:
- Gates provider setup on all Pods being ready.
- Checks pg_tde installation across every Pod before selecting the writable instance.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+575
to
+577
| for _, p := range pods { | ||
| // We need to configure pg_tde after volumes are mounted and extension is created | ||
| if _, ok := p.Annotations[naming.TDEInstalledAnnotation]; !ok { |
egegunes
marked this pull request as ready for review
August 24, 2026 07:52
egegunes
requested review from
gkech,
hors,
mayankshah1607,
nmarukovich,
oksana-grishchenko and
pooknull
as code owners
August 24, 2026 07:52
mayankshah1607
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGE DESCRIPTION
Problem:
If pg_tde and WAL encryption is enabled at the same time on a running cluster, some replicas fail to rejoin the cluster.
Cause:
Operator waits for primary to be rolled out with pg_tde installed before configuring providers and enabling WAL encryption but doesn't wait for replicas. Replicas might be in mid-rollout during these operations.
Solution:
Wait for all pods to be restarted with pg_tde mounts and extension is installed.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability