minikube: Kubectl 1.8 broken for minikube - OpenAPI swagger file doesn't include `x-kubernetes-group-version-kind`
Environment:
Minikube version (use minikube version): v0.22.2
- OS (e.g. from /etc/os-release): Linux
- VM Driver (e.g.
cat ~/.minikube/machines/minikube/config.json | grep DriverName): VirtualBox - ISO version (e.g.
cat ~/.minikube/machines/minikube/config.json | grep -i ISOorminikube ssh cat /etc/VERSION): v0.23.4 - Install tools:
- Others:
What happened:
Swagger doesn’t have x-kubernetes-group-version-kind while it should.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
minikube start
kubectl proxy &
curl 127.0.0.1:8001/swagger.json | less
# Look for v1.Service definition, it doesn't have `x-kubernetes-group-version-kind` field
Output of minikube logs (if applicable):
Anything else do we need to know:
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (12 by maintainers)
Commits related to this issue
- Merge pull request #53152 from mbohlool/release-1.7 Automatic merge from submit-queue. Manually cherry-pick 4379bbd as it is part of a larger PR The commit 4379bbd fixes a bug in openapi spec that ... — committed to kubernetes/kubernetes by deleted user 7 years ago
- Merge pull request #53152 from mbohlool/release-1.7 Automatic merge from submit-queue. Manually cherry-pick 4379bbd as it is part of a larger PR The commit 4379bbd fixes a bug in openapi spec that ... — committed to sttts/apiserver by k8s-publish-robot 7 years ago
- Merge pull request #53152 from mbohlool/release-1.7 Automatic merge from submit-queue. Manually cherry-pick 4379bbd as it is part of a larger PR The commit 4379bbd fixes a bug in openapi spec that ... — committed to sttts/apiserver by k8s-publish-robot 7 years ago
- Merge pull request #53152 from mbohlool/release-1.7 Automatic merge from submit-queue. Manually cherry-pick 4379bbd as it is part of a larger PR The commit 4379bbd fixes a bug in openapi spec that ... — committed to sttts/apiserver by k8s-publish-robot 7 years ago
- Merge pull request #53152 from mbohlool/release-1.7 Automatic merge from submit-queue. Manually cherry-pick 4379bbd as it is part of a larger PR The commit 4379bbd fixes a bug in openapi spec that ... — committed to sttts/apiserver by k8s-publishing-bot 7 years ago
- Merge pull request #53152 from mbohlool/release-1.7 Automatic merge from submit-queue. Manually cherry-pick 4379bbd as it is part of a larger PR The commit 4379bbd fixes a bug in openapi spec that ... — committed to kubernetes/apiserver by k8s-publishing-bot 7 years ago
I’ve backported the fix to previous versions of localkube, and it should be fixed for the default version in the next release
Yes @sauravomar
Found the problem after a long debugging 😃 Short Answer: This is the fix: https://github.com/kubernetes/kubernetes/pull/53152 and you need to update your vendor folder after this gets into 1.7 You should not have any problem with 1.8 as this fix is already there.
Longer Answer: We do use full package name as the name of the OpenAPI definitions. The OpenAPI generator take the vendoring folder into account but (in 1.7 code) the extension in
staging/src/k8s.io/apiserver/pkg/endpoints/openapi/openapi.godid not. We were OK in kubernetes at the time, but when we moved packages out and vendor some part of APIs in, that became a problem and we fixed it in 1.8. All you need to do is to backport this fix (that seems safe and should not affect kubernetes itself at all) to 1.7 branch and update your vendor folder.