feat: add internal Services for interserver and operator traffic - #286
Merged
Conversation
GrigoryPervakov
force-pushed
the
feature/internal-replica-services
branch
from
August 6, 2026 19:09
38985ba to
a6c4a89
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 20 changed files in this pull request and generated no new comments.
Suppressed comments (1)
test/testutil/dialer.go:170
- podForHostname() rejects internal Service names that appear truncated (63 chars with a 4-hex hash before "-internal-") by returning an error. This truncation pattern is produced by api/v1alpha1/common.go:resourceName() when the base name is too long, so long ClickHouseCluster names will make InternalServiceNameByReplicaID() hit this path and break port-forwarding (the dialer will fail before even attempting portforward). Consider resolving Service hostnames to Pods via the Kubernetes API (e.g., get Service -> use its selector or Endpoints to pick the target Pod) instead of relying on reconstructing the Pod name from the Service name, so truncated resource names still work.
hashStart := internalServiceIndex - resourceNameHashLength
if len(serviceName) == maxKubernetesResourceNameLength && hashStart > 0 && serviceName[hashStart-1] == '-' {
_, err := strconv.ParseUint(
serviceName[hashStart:internalServiceIndex], 16, resourceNameHashLength*4,
)
GrigoryPervakov
force-pushed
the
feature/internal-replica-services
branch
from
August 7, 2026 18:05
a6c4a89 to
22d368f
Compare
|
Docs PR opened: ClickHouse/ClickHouse#113871 Updated two AdditionalPort descriptions in the Kubernetes Operator API reference to say "public headless Service" instead of "operator-managed". |
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.
Why
It is the first stage for #266
Need to separate internal and client traffic to control it separately later.
It may make more sense to use a governing service for internal traffic, but it already exists and serves client traffic
What
Add per-replica services with internal-only ports and configure clickhouse to use it for internal replication and operator access