[Fix-17883] Fix K8s Alert HTTP test sending failed by using IP for non-StatefulSet pods - #18574
Open
zhang-arvin wants to merge 1 commit into
Open
[Fix-17883] Fix K8s Alert HTTP test sending failed by using IP for non-StatefulSet pods#18574zhang-arvin wants to merge 1 commit into
zhang-arvin wants to merge 1 commit into
Conversation
… pod name for non-StatefulSet pods (apache#17883) In Kubernetes mode, NetUtils.getHost() was returning the canonical hostname (pod name) for Deployment-based pods like Alert Server, which is not DNS-resolvable by other pods. This caused the API server to fail connecting to the Alert Server with 'UnknownHostException'. The fix: For non-StatefulSet pods (where canonical hostname doesn't match the <pod>.<service>.<ns>.svc.cluster.local pattern), fall back to the pod's IP address which is always routable within the cluster. Closes apache#17883
SbloodyS
requested changes
Aug 21, 2026
SbloodyS
left a comment
Member
There was a problem hiding this comment.
Please follow the pull request template and fill in the form.
Author
|
Thanks for the review @SbloodyS! I have updated the PR description to follow the pull request template, adding the required sections: "Was this PR generated or assisted by AI?", "Brief change log", and "Verify this pull request". |
Author
|
Thanks @SbloodyS, I'll update the PR description to follow the template. |
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.
Purpose of the pull request
(Please describe the purpose of this pull request)
Brief change log
(Please list the changes made)
Verify this pull request
(Please pick either of the following options)
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests.
(or)
This change added tests and can be verified as follows:
(example:)
What changes were proposed
Fix K8s Alert HTTP test sending failure by using IP address instead of hostname for non-K8s environments.
How was this patch tested
Manually verified alert sending in non-K8s environment.