Skip to content

fix: construct delayed downscale pod FQDN using both service and sts name #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 11, 2025

Conversation

andyasp
Copy link
Collaborator

@andyasp andyasp commented Aug 5, 2025

Fixes #251

The DNS entry for a pod of a StatefulSet is (docs):

$(statefulset name)-(ordinal).$(service name).$(namespace).svc.cluster.local

createPrepareDownscaleEndpoints assumed a StatefulSet's .metadata.name was equal to its .spec.serviceName. That works in Mimir's Jsonnet deployment, but does not for Mimir's Helm chart. This is similar to the fix in #221.

I pulled the FQDN construction into a common method to hopefully reduce the chance of this drifting again in the future. A consequence of doing that was the prepare downscale path now specifies a trailing . as well when it did not before. That is not a required change for this particular fix, but it seemed right to do anyway (reduces DNS lookups).

@andyasp andyasp marked this pull request as ready for review August 5, 2025 22:19
@andyasp andyasp changed the title fix: construct delay downscale pod FQDN using both service and sts name fix: construct delayed downscale pod FQDN using both service and sts name Aug 5, 2025
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

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

LGTM. I imagine we're going to need to make the cluster domain configurable at some point but it doesn't need to be today.

@andyasp andyasp merged commit 48b0e5c into main Aug 11, 2025
10 checks passed
@andyasp andyasp deleted the aasp/delay-pod-fqdn branch August 11, 2025 21:12
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.

Prepare Downscale endpoint uses statefulset name instead of service name
2 participants