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
Endpoints controller demands ports for headless services #32796
Comments
@thockin What did you expect to happen? It will skip creating any EndpointSubsets. It handles having no ports. |
I think it should create a Subset with a 0 port (or a dummy value). We On Thu, Sep 15, 2016 at 12:23 PM, Michael Fraenkel <notifications@github.com
|
correct, it should create a subset with the PodIP that match the service selector. 0 port would work (or even no port at all if endpoints could support that). |
Looking at RepackSubsets, it will drop out endpoints with no ports so going with the 0 port is what I did. |
Yeah, without trawling code (thanks!) It is not clear if a zero port would Simply trying it might be the best course, but we should audit kubectl, APi On Sep 16, 2016 10:57 AM, "Michael Fraenkel" notifications@github.com Looking at RepackSubsets, it will drop out endpoints with no ports so going — Reply to this email directly, view it on GitHub |
I just ran into this myself. A work around is to do something like this: apiVersion: v1
kind: Service
metadata:
name: my-svc
labels:
run: my-svc
spec:
clusterIP: None
selector:
run: my-svc
ports: |
Furthermore, kubectl needs some love:
P.S.: disregard the selector patching, that's an unrelated issue. |
I would like to work on this issue |
Any progress here? |
Can we get an update? |
Seems like @fraenkel PR #32875 had fixed this main issue. But the PR was closed due to inactive for 90 days. If @fraenkel doesn't have plan to reopen it again and @jianzi123 doesn't have new progress, I'd like to pick it up. What I can think the work might be polishing PR #32875 and fixing #32796 (comment). I will also try to find out if there is something more to do per #32796 (comment). @thockin WDYT? |
I send PR #47250. Hope we can fix this ASAP before 1.7. |
@dchen1107 move to next milestone. |
There is a pending pr to address this issue, not update if that is the right fix. |
yeah that PR is still under reviewing. |
I took a look at the PR and it looks like there are still some outstanding review comments and its does not have an LGTM. It feel like this should be moved to the next milestone to be safe. Please comment if you disagree. |
Moving to 1.8. |
Automatic merge from submit-queue (batch tested with PRs 47850, 47835, 46197, 47250, 48284) Populate endpoints for headless service with no ports **What this PR does / why we need it**: - populate endpoints with headless service (thanks @fraenkel for the original PR!) - allow ports with headless service - nits **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes#32796 kubernetes#32796 (comment) **Special notes for your reviewer**: /cc @thockin @fraenkel **Release note**: ```release-note NONE ```
API validation explicitly allows headless services to not have ports, but we seem to have not updated endpoints controller to know this:
https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2390
vs
https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/endpoint/endpoints_controller.go#L389
Superficially this seems like an easy fix. May be a candidate for 1.4.x
@sebgoa
The text was updated successfully, but these errors were encountered: