This repository was archived by the owner on Jul 11, 2023. It is now read-only.
Allow all headless services, not just those backed by Statefulsets with subdomains #5250
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.
The existing logic requires
hostname
to be set before aMeshService
is created from a headless service's endpoint. However,hostname
is only populated on the endpoint when that endpoint is generated from a StatefulSet.This PR creates a MeshService for every service so that it's still resolvable via DNS (instead of kube-proxy like ClusterIP services).Creating a
MeshService
for every headless service creates an issue if there is indeed a subdomain statefulset behind the headless service. Therefore, we only created a separate MeshService if the headless service it came from doesn't have a hostName in at least one of its endpoints