Commit Graph

17 Commits

Author SHA1 Message Date
Nick Santos
5ce7078061 client-go: fix panic in ConfirmUsable validation
Fixes https://github.com/kubernetes/client-go/issues/1108

Kubernetes-commit: 7d2c6096c212d9c31e7cd0bccb6dc2dec9a4ef6a
2022-06-07 15:53:16 -04:00
Margo Crawford
5fca705b7d --as-uid flag in kubectl and kubeconfigs.
This corresponds to previous work to allow impersonating UIDs:
* Introduce Impersonate-UID header: #99961
* Add UID to client-go impersonation config #104483

Signed-off-by: Margo Crawford <margaretc@vmware.com>

Kubernetes-commit: 7e079f5144474cae05802771f604df2b748d781f
2021-10-19 16:12:31 -07:00
Andrey Smirnov
8f8a83c908 fix: wrap errors correct when validating kubeconfig
This allows to check for specific errors using `errors.Is`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>

Kubernetes-commit: a5647fa417de6d17ba200f1b4bcd2bb28cceb22c
2021-09-16 22:56:08 +03:00
Andrew Keesler
37ed584bed exec credential provider: InteractiveMode support
The value here is that the exec plugin author can use the kubeconfig to assert
how standard input is treated with respect to the exec plugin, e.g.,
- an exec plugin author can ensure that kubectl fails if it cannot provide
  standard input to an exec plugin that needs it (Always)
- an exec plugin author can ensure that an client-go process will still call an
  exec plugin that prefers standard input even if standard input is not
  available (IfAvailable)

Signed-off-by: Andrew Keesler <akeesler@vmware.com>

Kubernetes-commit: cd83d89ac94c5b61fdd38840098e7223e5af0d34
2021-06-14 17:15:36 -04:00
Mike Danese
0caa50056a rest.Config: support configuring an explict proxy URL
With support of http, https, and socks5 proxy support. We already
support configuring this via environmnet variables, but this approach
becomes inconvenient dealing with multiple clusters on different
networks, that require different proxies to connect to. Most solutions
require wrapping clients (like kubectl) in bash scripts.

Part of: https://github.com/kubernetes/client-go/issues/351

Kubernetes-commit: f3f666d5f1f6f74a8c948a5c64af993696178244
2019-05-03 13:50:17 -07:00
zhouya0
1c7ee45b9b Fix kubectl version should print version info
Kubernetes-commit: 948f4de2dbba3affca2de460d836158cbde5db78
2020-04-07 15:18:38 +08:00
Alvaro Aleman
6b7675c693 Utilerrors.Aggregate: Allow using with errors.Is()
Kubernetes-commit: 212190e25e18600bbca2eb5c77aa3fe5bcc55af1
2020-02-24 15:15:04 +01:00
Maciej Szulik
3eda474fce Provide more verbose empty config error based on the context
Kubernetes-commit: 07dc17ffd9aadd9918511334e13b02dc817828a5
2020-03-03 18:42:19 +01:00
RainbowMango
532b6f676e Cleanup staticcheck issues for package in client-go.
Kubernetes-commit: c8c055b3163dd2661b3f9dd1b0ffb718a61aba24
2019-08-26 20:55:32 +08:00
Peter Swica
579ad46bdc Kubectl user exec should accept zero-length environment values #652 (#78875)
* Kubectl user exec should accept zero-length environment values #652

* Changing TestValidateAuthInfoExecInvalidEnv to allow for empty strings as Exec values

Kubernetes-commit: f30af9dd6da46f0f01e38b477d455907da9f1b6c
2019-07-25 19:01:41 -04:00
Eric Chiang
19c591bac2 client-go: add an exec-based client auth provider
Kubernetes-commit: 6463e9efd9ba552e60d2555a3e6526ef90196473
2018-02-07 15:43:12 -08:00
Di Xu
370f3b346b forbid unnamed context
Kubernetes-commit: 792a2299362ebadc9ca68c72347884330db23b2a
2017-12-04 14:39:05 +08:00
Cao Shufeng
29b5bff0fa add --as-group option to cli
The usecase of this change:
When a super user grant some RBAC permissions to a group, he can use
--as-group to test whether the group get the permissions.
Note that now we support as-groups, as-user-extra in kubeconfig file
after this change.

Kubernetes-commit: e541defd49d01024d17dddf8e966eba2c46a6db0
2017-05-16 17:20:28 +00:00
Andy Goldstein
634770b327 validateClusterInfo: use clientcmdapi.NewCluster()
Change validateClusterInfo to use clientcmdapi.NewCluster() instead of
clientcmdapi.Cluster{} when comparing against the passed in clusterInfo.
clusterInfo most likely will be a combination of
clientcmdapi.NewCluster() merged with potential overrides. This is
necessary because otherwise, the DeepEqual between what is supposed to
be an empty Cluster and clusterInfo will fail, resulting in an error
that doesn't allow fall-through to checking for in-cluster
configuration.

Kubernetes-commit: 266ba9ffdeeeeba8022ce94ae4e725d996c29363
2017-04-11 20:28:18 +00:00
Kubernetes Publisher
204f12b1f3 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is 616038db1b0d1e852b4a3d10c8c512a052f91fba
2017-01-14 15:19:47 +00:00
Kubernetes Publisher
75399f68c8 published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is e56cfc5322138aa23e6418ee30a6ab54c7c6fe8c
2016-10-21 04:44:19 +00:00
Chao Xu
a6d206121d remove the top-level folders for versions
remove scripts
2016-10-19 14:34:19 -07:00