Skip to content

Conversation

@gkech
Copy link
Contributor

@gkech gkech commented Oct 2, 2025

K8SPG-866 Powered by Pull Request Badge

DESCRIPTION

Problem:
v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice

Solution:
Before this PR, the operator created only the -primary Endpoints resource. All other Endpoints resources are created by patroni. Patroni currently does not support creating EndpointSlices in place of the deprecated Endpoints.

This PR adds a feature gate EndpointSlices which replaces the -primary Endpoints resource with an EndpointSlice once version 2.9.0 is reached. As part of the migration, the deprecated Endpoints resource and the mirrored EndpointSlice created by endpointslicemirroring-controller.k8s.io from the deprecated Endpoints resource are deleted.

This PR also addresses the fact that EndpointSlices are not supported on GKE out of the box. The default DNS provider on GKE is kube-dns, which does not support EndpointSlices. To use EndpointSlices, users must manually deploy CoreDNS or use Cloud DNS. To fix tests, every test deploys CoreDNS in the kube-system namespace if it is not already present.

Please note that Endpoints resources are mirrored to EndpointSlices by endpointslicemirroring-controller.k8s.io, which is why the upgrade-consistency test includes assertions for EndpointSlices.

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?

Copy link
Contributor

@egegunes egegunes left a comment

Choose a reason for hiding this comment

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

This PR also addresses the fact that EndpointSlices are not supported on GKE out of the box. The default DNS provider on GKE is kube-dns, which does not support EndpointSlices. To use EndpointSlices, users must manually deploy CoreDNS or use Cloud DNS. To fix tests, every test deploys CoreDNS in the kube-system namespace if it is not already present.

this worries me. this means we are breaking GKE installations out of the box. and we don't know when will Endpoints support be dropped. maybe we need make using EndpointSlices optional for now by introducing a cr field. wdyt @hors ?

@mayankshah1607
Copy link
Member

mayankshah1607 commented Jan 20, 2026

maybe we need make using EndpointSlices optional for now by introducing a cr field

It looks more like a system-wide preference. Do we imagine a use-case where some clusters use Endpoints and some use EndpointSlices? Maybe it should be a CLI / feature flag?

@egegunes
Copy link
Contributor

maybe we need make using EndpointSlices optional for now by introducing a cr field

It looks more like a system-wide preference. Do we imagine a use-case where some clusters use Endpoints and some use EndpointSlices? Maybe it should be a CLI / feature flag?

yes, you have a point. maybe we need a feature flag

@hors
Copy link
Collaborator

hors commented Jan 22, 2026

maybe we need make using EndpointSlices optional for now by introducing a cr field

It looks more like a system-wide preference. Do we imagine a use-case where some clusters use Endpoints and some use EndpointSlices? Maybe it should be a CLI / feature flag?

yes, you have a point. maybe we need a feature flag

Let's use a feature flag and disable it by default.

@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable failure 00:00:00
custom-envs failure 00:00:00
custom-extensions failure 00:00:00
custom-tls failure 00:00:00
database-init-sql skipped 00:00:00
demand-backup skipped 00:00:00
finalizers skipped 00:00:00
init-deploy skipped 00:00:00
monitoring skipped 00:00:00
monitoring-pmm3 skipped 00:00:00
one-pod skipped 00:00:00
operator-self-healing skipped 00:00:00
pgvector-extension skipped 00:00:00
pitr skipped 00:00:00
scaling skipped 00:00:00
scheduled-backup skipped 00:00:00
self-healing skipped 00:00:00
sidecars skipped 00:00:00
start-from-backup skipped 00:00:00
tablespaces skipped 00:00:00
telemetry-transfer skipped 00:00:00
upgrade-consistency skipped 00:00:00
upgrade-minor skipped 00:00:00
users skipped 00:00:00
Summary Value
Tests Run 4/24
Job Duration 00:18:02
Total Test Time N/A

commit: 2f2baa3
image: perconalab/percona-postgresql-operator:PR-1307-2f2baa3a9

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.

7 participants