Conversation
egegunes
previously approved these changes
Feb 3, 2026
There was a problem hiding this comment.
Pull request overview
This pull request adds a new field clusterServiceDNSSuffix to both the PostgresCluster and PerconaPGCluster CRDs. This field allows users to override the DNS suffix used for internal cluster service connections, which is particularly useful in Kubernetes environments that use custom cluster domains different from the standard "cluster.local".
Changes:
- Added
ClusterServiceDNSSuffixfield to both PostgresCluster and PerconaPGCluster API types - Updated DNS name generation functions to accept and use the DNS suffix override parameter
- Modified all certificate generation code paths to pass through the DNS suffix for proper certificate subject alternative names
- Updated pgBackRest configuration to use the custom DNS suffix when constructing repository host FQDNs
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go | Added ClusterServiceDNSSuffix field to PostgresClusterSpec |
| pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go | Added ClusterServiceDNSSuffix field to PerconaPGClusterSpec and ToCrunchy conversion |
| internal/naming/dns.go | Updated DNS name generation functions to accept dnsSuffix parameter and modified KubernetesClusterDomain to handle override |
| internal/naming/dns_test.go | Updated tests to pass empty string for DNS suffix parameter |
| internal/controller/postgrescluster/pki.go | Updated certificate generation to pass DNS suffix to name resolution functions |
| internal/controller/postgrescluster/pki_test.go | Updated tests to pass empty DNS suffix parameter |
| internal/controller/postgrescluster/instance.go | Updated instance certificate reconciliation to pass DNS suffix |
| internal/pgbouncer/reconcile.go | Updated PGBouncer certificate generation to use DNS suffix |
| internal/pgbackrest/reconcile.go | Updated pgBackRest certificate generation and added formatting improvements |
| internal/pgbackrest/config.go | Updated pgBackRest configuration generation to use DNS suffix and code formatting |
| internal/pgbackrest/config_test.go | Updated tests and fixed code formatting |
| deploy/cr.yaml | Added commented example configuration for clusterServiceDNSSuffix |
| deploy/crd.yaml, deploy/bundle.yaml, deploy/cw-bundle.yaml | Added CRD schema for clusterServiceDNSSuffix field |
| config/crd/bases/*.yaml | Added CRD schema definitions for the new field |
| build/crd//generated/.yaml | Added generated CRD schema definitions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go
Show resolved
Hide resolved
config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml
Show resolved
Hide resolved
gkech
approved these changes
Feb 11, 2026
hors
approved these changes
Feb 11, 2026
mayankshah1607
approved these changes
Feb 12, 2026
egegunes
approved these changes
Feb 12, 2026
Collaborator
commit: fd89a00 |
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.
Due to the high volume of requests, we're unable to provide free service for this account. To continue using the service, please upgarde to a paid plan.
https://perconadev.atlassian.net/browse/K8SPG-694
DESCRIPTION
This PR adds a new field
.spec.clusterServiceDNSSuffixwhich allows overriding the DNS suffix for operator connectionsHelm PR: percona/percona-helm-charts#782
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability