Commit Graph

14 Commits

Author SHA1 Message Date
Maciej Szulik 47f13bd18b Deprecate kubeconfig's preference field in favor of kuberc
Signed-off-by: Maciej Szulik <soltysh@gmail.com>

Kubernetes-commit: 8cf5e8db78deb186ef362f64ab779c09e9520156
2025-05-13 13:39:13 +02:00
TessaIO 25c985cf66 fix: add namespace autocompletion for kubectl config set-context command
Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>

Kubernetes-commit: 62be85249e27e58a92ab3a1caf672159dc3cfd7f
2024-05-20 14:44:54 +02:00
Claudiu Belu 0ee0d225f2 Replaces path.Operation with filepath.Operation (staging)
The path module has a few different functions:
Clean, Split, Join, Ext, Dir, Base, IsAbs. These functions do not
take into account the OS-specific path separator, meaning that they
won't behave as intended on Windows.

For example, Dir is supposed to return all but the last element of the
path. For the path "C:\some\dir\somewhere", it is supposed to return
"C:\some\dir\", however, it returns ".".

Instead of these functions, the ones in filepath should be used instead.

Kubernetes-commit: 856bb5c8f266f5276f1a576f47be622d7cb384e7
2022-06-15 15:17:24 +03:00
Arda Güçlü 7af2fcf712 kubectl config set-credentials: Add InteractiveMode and ProvideClusterInfo flags
`set-credentials` command can also be used to config kubeconfig with credentials
exec plugins. However, there is no flag provided by this command to set
`InteractiveMode` and `ProvideClusterInfo` fields in credentials exec plugins.
Since `InteractiveMode` is required field, this makes the command's output
is incomplete and invalid. This PR introduces 2 new flags in set-credentials
command to let users can configure these 2 fields in credentials exec plugins,
especially the one `InteractiveMode` which is required.

Kubernetes-commit: b088e65007761bda1aee0b5fb92f79d1aae82c05
2023-11-23 15:32:32 +03:00
HirazawaUi 08300912da fix fd leaks and failed file removing for pkg kubectl and pod-security-admission
Kubernetes-commit: b94c6daa0b7602e2d30e35cf2b94f9d1e8fde56e
2023-05-03 01:36:46 +08:00
Tim Hockin ece694d5d1 Replace uses of diff.ObjectDiff with cmp.Diff
ObjectDiff is already a shim over cmp.Diff, so no actual output or
behavior changes

Kubernetes-commit: 29c0b73d640b6e50c4f2dfeee7b07ca66a530dbd
2023-03-23 11:29:01 -07:00
Arda Güçlü 3f05cfcd78 Migrate genericclioptions.IOStreams usage to genericiooptions
Kubernetes-commit: 00c30941260a27e6929aef84c7fdbc8f1508518c
2023-04-05 14:07:46 +03:00
inosato 8272d71ba6 Remove ioutil from kubectl
Signed-off-by: inosato <si17_21@yahoo.co.jp>

Kubernetes-commit: 774ab1349bfd553c97a99b992e9f38659f541c84
2022-07-30 22:31:16 +09:00
21kyu 0bf778323e Change reflect.Ptr to reflect.Pointer
Kubernetes-commit: df168d5b5c2dab7414fc00ead1a51257ec326a98
2022-06-26 01:23:43 +09:00
navist2020 2128ec58c8 remove Factory that not used
Kubernetes-commit: 0a83041d4d3698d36ade2a310184248c61eec64f
2021-05-17 16:56:12 +08:00
Maciej Szulik e80cf9ce71 Use temporary directory when creating temporary file in tests
Kubernetes-commit: a7529f4cd90ea6f662e1398608eccd86e886026f
2020-07-17 10:41:16 +02:00
Brian Pursley 1a80e2e210 Changed kubectl config view to redact token
Kubernetes-commit: 6fad4ee5e5f5fa6fbf38e88f165b012fa0ae5795
2020-03-17 15:13:50 -04:00
Tim Allclair 6fca42a14a Ensure testing credentials are labeled as such
Kubernetes-commit: 9d3670f3586c98c02cdca93b7c98dd91fc0b87bd
2020-02-04 10:36:05 -08:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00