Closed kke closed 5 years ago
Yay! I can verify that with this workaround it runs with Rancher!
I assume it breaks using a path (prefix) like /api/api
though?
Yep, that's why that check was left out originally. I still don't understand why it gets added twice, and I have not been able to reproduce the problem in the console.
Included in 0.10.3 (https://rubygems.org/gems/k8s-client/versions/0.10.3)
Yeah, I tried to understand what's going on but quickly gave up. In K8s::Transport
everything seemed fine; when sending a request it builds the path with prefix.
But for some reason K8s::APIClient
also reaches into K8s::Transport
, adding the prefix a second time?
def path(*path)
@transport.path(self.class.path(@api_version), *path)
end
So I tried to change that to just:
def path(*path)
File.join self.class.path(@api_version), *path
end
The result seemed to be one request with a correct URL (not sure what's going on there, discovering available APIs or something?)—immediately followed by an exception with a path that was now missing the prefix. 🤯
Anyway, thanks a lot! I'll now try building a little Sinatra app listing all the Ingresses deployed on our cluster. :)
Fixes #157 See #110