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

fix: services without selector return all cluster pods #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

holysoles
Copy link

As detailed in #113, services without a selector, often externalName services, render as being associated with all pods in the cluster. This is returned as well from requests directly to the /api/services endpoint.

The issue appears to be occurring at this point in the api call.

labelsMatchSelectors doesnt have a check for if the selectors parameter is empty, so it never iterates and just returns true for every pod. This MR ensures comparing a selectors map against a map of labels returns false when there were no selectors specified.

Closes #113

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.

ExternalName Service - all pods wrongly are assigned to it in the UI
1 participant