Open goyalankit opened 11 months ago
We have multiple Kubernetes servers behind a proxy and the current logic removes the URL prefix which causes a Bad Request.
For example: According to the current logic:
self.endpoint = "https://hostname/cluster-1" parts.uri = "/api/v1/namespaces/default/pods" // strips the cluster-1 prefix self.endpoint.join(&parts.uri.to_string())?; // https://hostname/api/v1/namespaces/default/pods
Error:
[cluster-1] [default] [none] > pods Parse Error: Got unexpected status 400 Bad Request (Other(Err(Error("expected value", line: 1, column: 1))), 0)
The commit fixes the above situation by preserving the prefix url
I think this line needs the change as well:
https://github.com/databricks/click/blob/bcf32999229cd86fef60d08115a49d51c6431924/src/k8s.rs#L383
We have multiple Kubernetes servers behind a proxy and the current logic removes the URL prefix which causes a Bad Request.
For example: According to the current logic:
Error:
The commit fixes the above situation by preserving the prefix url