Commit Graph

92 Commits

Author SHA1 Message Date
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
lixiaobing1 d674eb771e fix func name NewCreateCreateDeploymentOptions
Kubernetes-commit: bd17ef4f767a21868edafa19d7596e8df914b2db
2020-06-09 14:35:15 +08:00
Ricardo Pchevuzinske Katz 4ba72b5c67 Add support for create ingress in kubectl
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>

Kubernetes-commit: 73aa0a92f8c79d18a53dd39d3064ac3b0257f11b
2020-10-13 15:22:00 -03:00
Amir Mofasser 77e9a6f47f Add `create ingress` command to `cmd/kubectl`
Add `create ingress` unit tests

Move src code to staging dir

Update create command to reflect new API

Replaced deprecated `extensions` api with `networking`

Fix `missing strict dependencies`

Update BUILD

Update BUILD

Fix commit conflict with upstream

Update after review

* Removed obsolete files
* Moved v1beta to v1 api

Fixed gofmt

Fixed deps imports

Merge with PR #94327

Revert changes

Revert go.mod

Revert BUILD

No need to update generated BUILD

Add required deps to BUILD

Update BUILD

Kubernetes-commit: be45584a03aa9f3a3fd73e3d9cc69545da92616e
2020-10-13 16:54:17 +02:00
Sai Harsha Kottapalli 58a00a6dde Remove the dependency between create quota command and generators
Kubernetes-commit: 0222f2d033e8bef5e9b0657cf50e1bcd39b43a57
2020-10-03 03:04:09 +05:30
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
Jordan Liggitt 197605389f Fix int->string casts
Kubernetes-commit: 124a5ddf725c4862520d8619017cac9db7a03522
2020-07-24 11:13:07 -04:00
Aurélien Baumann bef6c5ee32 Remove the dependency between create clusterrolebinding command and generators
Kubernetes-commit: 484361a1d1eb1e7d37569d0bbe7f3a6ca0de986b
2020-05-15 00:07:01 +02:00
Alex Wang f00cf71393 Promote NonPreempt feature gate to beta (#91899)
* update nonpreempt featuregate to beta

* update

Kubernetes-commit: 209117413f32ec64e800dc32f69055ef2af75d54
2020-06-30 09:39:05 +00:00
Maciej Szulik f5762887af Fix --save-config for kubectl create commands, where it was missing
Kubernetes-commit: 42ee2068384dd47d684121db8f92e593af1f50fc
2020-06-08 14:02:33 +02:00
zhouya0 c825cb5a2f Support kubectl create deployment with replicas
Kubernetes-commit: b6213ed931930eba27b4a53db54b4b4d224a1c59
2020-05-29 14:52:07 +08:00
zhouya0 635dca932f Fix create deployment port not working
Kubernetes-commit: 24766024c17e6090b694b0f57d0b051884a2dac1
2020-05-27 15:56:35 +08:00
Maciej Szulik 0fc32c9e63 Refactor create deployment and add --port flag
Kubernetes-commit: ed1a0e945649095618bd3484c82b58046bcbd60c
2020-05-14 18:34:40 +02:00
Maciej Szulik 731925c63c Set schedule and image flags required for create cronjob
Kubernetes-commit: 9e7ca872b4e2c9c95f7e7c224bc79c1b698789b9
2020-05-14 18:34:27 +02:00
zhouya0 c027f981b2 Fix kubectl create secret docker-registry
Kubernetes-commit: bbf41448f6c5494d5adabc4954d7230522b28d2e
2020-05-11 11:05:37 +08:00
Aurélien Baumann 3c8dea227e Refactor kubectl create deploy: isolate obj construction logic
Kubernetes-commit: c43f62c10b55a8722f1cd5c0547307da388d6b23
2020-05-18 11:32:23 +02:00
zhouya0 2ece9ead67 Fix dry run client ignore namespace
Kubernetes-commit: 2f117260fb50926cf0967dfa2817728eb75e1e90
2020-04-26 15:13:20 +08:00
Aurélien Baumann d55dfd5661 Remove the dependency between create deploy command and generators
Kubernetes-commit: 0cbb2087dab0791956ac9233d9554399fd472bb5
2020-05-01 18:04:37 +02:00
Davanum Srinivas 445ad1366b switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Julian V. Modesto 415a73888a Set kubectl field manager names
Kubernetes-commit: 360c348d0eb5be8c7c9720d5bfda16dbe04e8d15
2020-03-04 22:04:01 -05:00
Maciej Szulik 9f4fb540db Set appropriate owner references when creating a job from cronjob
Kubernetes-commit: b1a068b0fcfeac586df28a8b3d65db33dc3e1aa5
2020-05-13 12:59:49 +02:00
Maciej Szulik b0e673d0df Fix create cronjob help message
Kubernetes-commit: b2b59527964a3629f5d50e4b724aa027b4c36cc5
2020-05-12 10:35:50 +02:00
zhouya0 425b3d2e14 Remove *cobra.command from options
Kubernetes-commit: 1ef5732c436463f405b8224c6885a50716bfc39b
2020-04-09 12:15:43 +08:00
d-kuro 3cbb4ef3ee Fix ownerReferences.apiVersion for kubectl create job --from=cronjob
Kubernetes-commit: b78ab3515e85bb391e6cadc3374da7ac1992db1f
2020-02-28 14:28:27 +09:00
Jordan Liggitt 0c62c9a83a client-go dynamic client: add context to callers
Kubernetes-commit: b7c2faf26c2a25427794478c6265e6d55e8acb5a
2020-03-06 10:17:41 -05:00
Julian V. Modesto b6cbb3bd6c Clean up --dry-run values.
- Clean up --dry-run values in tests, docs, and scripts
- Fix --dry-run for auth reconcile and add a test

Kubernetes-commit: d97169f59ad11f2d2ffd8ef14446bbec5ffc881b
2020-02-13 16:28:22 -05:00
Julian V. Modesto f9460c5333 Use --dry-run=client,server in kubectl.
- Support --dry-run=server for subcommands apply, run, create, annotate,
expose, patch, label, autoscale, apply set-last-applied, drain, rollout undo
- Support --dry-run=server for set subcommands
  - image
  - resources
  - serviceaccount
  - selector
  - env
  - subject
- Support --dry-run=server for create subcommands.
  - clusterrole
  - clusterrolebinding
  - configmap
  - cronjob
  - job
  - deployment
  - namespace
  - poddisruptionbudget
  - priorityclass
  - quota
  - role
  - rolebinding
  - service
  - secret
  - serviceaccount
- Remove GetClientSideDryRun

Kubernetes-commit: 13b80b48cd02b8263d910f2423a1f5b92cdf7644
2020-01-30 20:23:33 -05:00
Mike Danese 29cd24b6cc generated: run refactor
Kubernetes-commit: 25651408aeadf38c3df7ea8c760e7519fd37d625
2020-02-08 12:30:21 -05:00
Mike Danese 71d8052cb0 generated: run refactor
Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894
2020-02-07 18:16:47 -08:00
Julian V. Modesto c0b11fa131 Extend --dry-run to support string values.
* Extend --dry-run to support string values for dry run strategies
  'client', 'server', and 'none'
* Ensure --dry-run is set and accessed via cmdutil
* Deprecate --dry-run (unset), --dry-run=true, and --dry-run=false

Kubernetes-commit: af52beda260257e81cc9e19e9e5108b682ee93d6
2019-12-15 18:29:27 -05:00
Julian V. Modesto a3f7877cd1 Support DryRun in cli-runtime REST Helper.
- Move TestSupportsDryRun to cli-runtime
- Move TestDryRunVerifier to cli-runtime
- Add OpenAPI schema for testdata to cli-runtime
- Use Helper.DryRun and DryRunVerifier for Apply
- Add WithOptions methods to Helper

Kubernetes-commit: 6bea0e469bcfe4967cbf2656a998d60e0b684747
2019-12-18 22:00:34 -05:00
zhouya0 0833d7cba2 kubectl change podSecurityPolicy group
Kubernetes-commit: 7947b6ce6d8a498000d81b68fa674f88b1d7680a
2019-11-18 15:00:33 +08:00
Clayton Coleman 4ca8f5ecfe test: kubectl unit tests should be using codecs without conversion
Tests are also refactored to use the simpler RESTClient code path.

Kubernetes-commit: 8a9b8c87c40ee65751828d9dd02f4f642588f0ce
2019-11-03 15:20:10 -05: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
clarklee92 87db492820 Modify the status code number to HTTP status semantics
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>

Kubernetes-commit: f86f5ee14ef3c8adf9855ce16dcc57beca949719
2019-11-06 00:45:35 +08:00
Sean Sullivan 3ec9685c39 Rename test/data directory to testdata
Kubernetes-commit: 4ce97d6c48ae4735463f020430dd20539a03e8c5
2019-10-31 13:40:02 -07:00
tanjunchen 588a48c6ab remove the repeat word in documents
Kubernetes-commit: de3cf23414efb2eb4d94e821996cd4c93e6534e4
2019-10-04 15:32:48 +08:00
AllenZMC 7f06f2436c fix typos in create_namespace.go
Kubernetes-commit: e9da014de9f5a1a717c885d2b5108d0a39acacc1
2019-08-06 20:45:12 +08:00
Sean Sullivan 1cba7858ad Update test data to reflect code move to staging
Kubernetes-commit: 58b59ae4e07f9d3718271a43740a4de9508d8688
2019-08-01 15:17:53 -07: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