Files
kubernetes/pkg/client/unversioned
k8s-merge-robot b4db89c457 Merge pull request #27644 from enj/dev/enj/issues/9307
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.
2016-06-26 21:11:12 -07:00
..
2016-02-29 12:05:13 -08:00
2016-05-12 08:21:11 +02:00
2016-05-04 18:39:17 -07:00
2016-05-21 15:48:40 +02:00
2016-05-16 13:12:32 +01:00
2016-05-04 18:39:17 -07:00
2016-05-04 18:39:17 -07:00
2016-02-29 12:05:13 -08:00
2016-05-11 18:07:35 -04:00
2016-05-11 18:07:35 -04:00
2016-05-13 17:27:58 -07:00
2016-02-08 15:33:31 -05:00
2016-05-21 15:48:40 +02:00
2016-02-29 12:05:13 -08:00