Commit Graph

12 Commits

Author SHA1 Message Date
alingse 92bb3cdeda fix: fix miss makezero bug (#125132)
* fix: fix miss makezero bug

Signed-off-by: alingse <alingse@foxmail.com>

* add testcase for new verb

* Update create_role_test.go

---------

Signed-off-by: alingse <alingse@foxmail.com>

Kubernetes-commit: 5b06498cb24ee68dbc2815a1d9fa505da3452d98
2024-12-12 10:56:37 +08:00
Tim Hockin c131fb884e Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes

Kubernetes-commit: bc302fa4144d21a338683cd83701661f97be4aba
2023-03-23 11:34:03 -07:00
Arda Güçlü 3f05cfcd78 Migrate genericclioptions.IOStreams usage to genericiooptions
Kubernetes-commit: 00c30941260a27e6929aef84c7fdbc8f1508518c
2023-04-05 14:07:46 +03:00
Maciej Szulik 9ca2ff9172 Allow adding new verbs in AddSpecialVerb
Kubernetes-commit: 790396caba63f18ac529cf381b405390b62ad3e7
2022-03-28 12:49:02 +02:00
Ross Peoples 88ea823a7a Allow create.specialVerbs to be customized
Kubernetes-commit: 9b2f24aee0668ef54e7f51acc79e51b93f1aedb3
2021-12-16 13:08:28 -06:00
Masashi Honma 309d0ee885 test: Fix deprecated --dry-run parameter
Some unit tests throw this warning.

W1013 09:06:21.581870  176998 helpers.go:567] --dry-run=true is deprecated (boolean value) and can be replaced with --dry-run=client.

This patch removes the warning by using --dry-run=client instead of --dry-run=true.

The unit tests that are affected are:

make test WHAT=./vendor/k8s.io/kubectl/pkg/cmd/apply GOFLAGS=-v
make test WHAT=./vendor/k8s.io/kubectl/pkg/cmd/create GOFLAGS=-v

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>

Kubernetes-commit: ad7cbac16354e19981e986bbc2b3fd9cfa930d45
2020-10-14 10:00:08 +09:00
Eddie Zaneski 1ac77cf17d Warn when creating roles with custom verbs kubectl
Remove errors when using custom verbs

Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>

Kubernetes-commit: c9420cd703b9431528e91a78428bb982d3b20b67
2020-06-24 16:20:13 -06:00
zhouya0 2ece9ead67 Fix dry run client ignore namespace
Kubernetes-commit: 2f117260fb50926cf0967dfa2817728eb75e1e90
2020-04-26 15:13:20 +08:00
ritho b0cd1c2290 Do some Kubectl optimizations suggested by the golangci linter
The tool golangci-lint gives a bunch of warnings. This PR solves the easier/less controversial ones, so the code is simpler and a little bit more optimal, since it removes some if conditions.

Kubernetes-commit: cd2adbe760641f844d84d411f9adcf17fb6982ff
2019-06-04 01:25:43 -05:00
Sean Sullivan 1483769081 Update gofmt
Kubernetes-commit: e2cae2344486af198f8ab38e4dd97d4f24dfd190
2019-08-01 13:14:06 -07:00
Sean Sullivan 5b48717f2d Update import statements to reflect code move
Kubernetes-commit: acece3c2964115a4f29a43e368ad5de59dbbc258
2019-08-01 11:10:05 -07:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00