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

potential bug, get endpoints method #1368

Open
yashjaind11 opened this issue Jul 25, 2024 · 0 comments
Open

potential bug, get endpoints method #1368

yashjaind11 opened this issue Jul 25, 2024 · 0 comments

Comments

@yashjaind11
Copy link

endpoints, err := c.kubeClient.CoreV1().Endpoints(service.ObjectMeta.Namespace).Get(context.Background(), service.Name, metav1.GetOptions{})
if err != nil {
log.Errorf("Error getting endpoints for service %s: %v\n", service.Name, err)
}

if the service.ObjectMeta.Namespace is empty string i.e. "" it will return endpoint object instead of error returned object:
Screenshot 2024-07-25 at 7 19 39 PM

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

No branches or pull requests

1 participant