Skip to content

K8SPG-694: add clusterServiceDNSSuffix#1417

Merged
hors merged 9 commits intomainfrom
K8SPG-694
Feb 13, 2026
Merged

K8SPG-694: add clusterServiceDNSSuffix#1417
hors merged 9 commits intomainfrom
K8SPG-694

Conversation

@pooknull
Copy link
Contributor

@pooknull pooknull commented Jan 21, 2026

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.clusterServiceDNSSuffix which allows overriding the DNS suffix for operator connections

Helm PR: percona/percona-helm-charts#782

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 January 28, 2026 11:28
egegunes
egegunes previously approved these changes Feb 3, 2026
Copilot AI review requested due to automatic review settings February 11, 2026 09:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ClusterServiceDNSSuffix field 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.

@egegunes egegunes added this to the v2.9.0 milestone Feb 12, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 05:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable passed 00:06:31
builtin-extensions passed 00:05:12
custom-envs passed 00:18:35
custom-extensions passed 00:13:41
custom-tls passed 00:04:56
database-init-sql passed 00:02:11
demand-backup passed 00:25:34
finalizers passed 00:03:40
init-deploy passed 00:02:44
huge-pages passed 00:02:46
monitoring passed 00:08:08
monitoring-pmm3 passed 00:07:41
one-pod passed 00:05:45
operator-self-healing passed 00:07:49
pitr passed 00:11:54
scaling passed 00:04:46
scheduled-backup passed 00:26:15
self-healing passed 00:08:58
sidecars passed 00:02:37
standby-pgbackrest passed 00:11:32
standby-streaming passed 00:09:09
start-from-backup passed 00:10:16
tablespaces passed 00:06:52
telemetry-transfer passed 00:03:28
upgrade-consistency passed 00:05:12
upgrade-minor passed 00:06:17
users passed 00:04:38
Summary Value
Tests Run 27/27
Job Duration 01:17:08
Total Test Time 03:47:20

commit: fd89a00
image: perconalab/percona-postgresql-operator:PR-1417-fd89a0054

@hors hors merged commit f9b2aa7 into main Feb 13, 2026
11 checks passed
@hors hors deleted the K8SPG-694 branch February 13, 2026 09:56
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