![]() Automatic merge from submit-queue Use preferred group version when discovery fails due to 403 ``` kubectl get pods --as bob ``` Returns: ``` error: failed to negotiate an api version; server supports: map[], client supports: map[autoscaling/v1:{} rbac.authorization.k8s.io/v1alpha1:{} federation/v1alpha1:{} batch/v1:{} v1:{} authentication.k8s.io/v1beta1:{} apps/v1alpha1:{} componentconfig/v1alpha1:{} authorization.k8s.io/v1beta1:{} batch/v2alpha1:{} extensions/v1beta1:{} policy/v1alpha1:{}] ``` It should return: ``` User "deads" cannot "impersonate" "users" with name "bob" in project "" ``` `serverVersions` is empty when discovery fails, thus we fallback to the `preferredGV`. See openshift/origin#9307 and [openshift/origin/pull/9389](https://github.com/openshift/origin/pull/9389) for further details. |
||
---|---|---|
.. | ||
discovery | ||
dynamic |