-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
controller: Don't panic when ready condition in a endpointslice is missing #9550
controller: Don't panic when ready condition in a endpointslice is missing #9550
Conversation
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @schoentoon! |
Hi @schoentoon. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@schoentoon I was implementing slices, and yes, ready is optional according docs, sorry for problem. But read the docs
so the fix shoud be
Now, you are skipping this unknown state endpoints which is against docs ( in most cases <- whatever this means). Could you test it, share results and better describe your setup? Thx |
ea2fec0
to
0dab706
Compare
You're absolutely right and I must have read over that. I modified my pull request accordingly. |
perfect, but Im still wondering about your setup and actual backends map from nginx in both cases. |
So, as I mentioned in the other issue. I manually create an EndpointSlice pointing to an IP address outside my cluster. Below is basically a direct copy from my ansible playbook to set that up. I initially ran into this crash when setting up the EndpointSlice without any conditions at all. The only reason I went this route to begin with, was that my previous setup (a Service with type ExternalName) kept giving a certain warning in I believe ingress-nginx (I would have to double check that) when in use with an IP address rather than a domain name.
|
ok, and why not to use |
I simply didn't run into that option really. But thanks, I'll have a look at that tonight. |
I've check the code, service-upstream will just use svc ClusterIp as upstream backend address,this will not help. But you can create svc and endpoint, endpointslices are autogenereted for you by controller from endpoint. Endpoint api is far more simpler then slices, and there is no mention that it's going to be deprecated/removed.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: schoentoon, strongjz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
While I was setting up an EndpointSlice it wasn't instantly obvious that conditions->ready was actually required as shown in https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/
Rather than the ingress that pointed to the service that used this endpointslice just not working, I found ingress-nginx in a CrashBackoffLoop instead. With a panic in the logs. Stacktrace being the following:
What this PR does / why we need it:
This will make it so that invalid EndpointSlice (or at least, the once missing ready) are handled just like handle: false rather than it crashing.
Types of changes
Which issue/s this PR fixes
I was going to make an issue for this, then I looked at the source and realized how easy the fix would be.
How Has This Been Tested?
I quite frankly didn't test this as the change is so trivial.
Checklist:
Does my pull request need a release note?
Any user-visible or operator-visible change qualifies for a release note. This could be a:
No release notes are required for changes to the following:
For more tips on writing good release notes, check out the Release Notes Handbook