-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Minikube openapi result does not contain kubernetes extensions #1365
Comments
More context on this. The tags exists in v1.6.0 onward: https://github.com/kubernetes/kubernetes/blob/v1.6.0/api/openapi-spec/swagger.json |
Do you have a pointer to any apiserver flags that control this behavior? |
It is not flag protected. It is one of the config setting one pass ApiServer creation. |
Ah thanks - do you happen to know which config setting? |
k8s.io/apimachinery/pkg/openapi.Config |
I looked at this a bit last night. This is the relevant part of kube-apiserver. https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go#L307-L310 This is where we set the server options for the apiserver in minikube Since kube-apiserver defaults to these options, I don't think we shouldn't have to explicitly set anything else. I was pretty confused with the go2idl/openapi-gen code, it seems like you worked on all of this stuff upstream @mbohlool maybe you could explain a little? |
What you referenced is on head but I assume you guys are using release 1.6 branch? The code has changed in app/server.go so I am referring to 1.6 branch: Here is where and definition namer is the one responsible for adding those The only explanation I have is for some reason That means the api types are not registered or not registered yet when we create this namer. |
Yup sorry, we use the 1.6 branch but the code path is the same. You're right, there seems to be a race condition where the OpenAPI is calling AllKnownTypes before they are registered. I added a deubgging line to |
Fixed with #1693 |
How to reproduce:
kubectl proxy
curl 127.0.0.1:8001/swagger.json
Result is missing
x-kubernetes
tags that are present here.@mbohlool said this is probably due to the apiserver being setup differently than the core server.
The text was updated successfully, but these errors were encountered: