Skip to content
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

The kube resolver should set the endpoints when the subsets json structure is not present #16

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

vietj
Copy link
Member

@vietj vietj commented Jan 14, 2025

Motivation:

The kube resolver sets the list of endpoints (pods) from the subsets member of the endpoints json object.

When the service does not have any pods, the subsets member is absent and causes an NPE downstream in the resolver assuming the endpoints list is never null.

Changes:

Always set the list of endpoints to consistently populate the list.

…cture is not present.

Motivation:

The kube resolver sets the list of endpoints (pods) from the subsets member of the endpoints json object.

When the service does not have any pods, the subsets member is absent and causes an NPE downstream in the resolver assuming the endpoints list is never null.

Changes:

Always set the list of endpoints to consistently populate the list.
@vietj vietj added the bug Something isn't working label Jan 14, 2025
@vietj vietj added this to the 5.0.0 milestone Jan 14, 2025
@vietj vietj linked an issue Jan 14, 2025 that may be closed by this pull request
@vietj vietj self-assigned this Jan 14, 2025
@vietj vietj merged commit 792141b into main Jan 14, 2025
4 checks passed
@vietj vietj deleted the kube-resolver-empty-pods branch January 14, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes resolver in invalid state
1 participant