Commit Graph

21 Commits

Author SHA1 Message Date
Brian Pursley df7520c1f3 Fix inconsistent validation of -f or -k flag in kubectl create command
Kubernetes-commit: 4fddd6a3cda9c95c8ae5b4a36d3c3fb06aa1dce1
2024-05-22 15:36:28 -04:00
Arda Güçlü 3f05cfcd78 Migrate genericclioptions.IOStreams usage to genericiooptions
Kubernetes-commit: 00c30941260a27e6929aef84c7fdbc8f1508518c
2023-04-05 14:07:46 +03:00
Sean Sullivan e5c05deb7b Refactor to simplify factory Validator
Kubernetes-commit: 5e8648b9f1cdbcbb10f22fd46b6ac40dbc471de2
2022-12-11 18:20:28 -08:00
Sean Sullivan 6dde41fea6 Removes unnecessary dry run verifier
Kubernetes-commit: 530f65d6fd5af81c0691143fbf2c00d440476bb9
2022-12-05 16:25:12 -08:00
Arda Güçlü 81a25f37b5 Set validate functions requiring no parameters for all commands
Validate function is used to validate command options and should not get
any additional parameter. To preserve compatibility across all
kubectl commands, this PR removes all parameters in validate functions.

Kubernetes-commit: 8fb423bfabe0d53934cc94c154c7da2dc3ce1332
2022-05-17 11:38:20 +03:00
Rey Lejano b062628db1 updates for kubectl generated ref docs
Kubernetes-commit: 37a86e3e33349baa8fdfd25506dddb6009973337
2022-03-25 12:31:12 -07:00
Kevin Delgado 61f42e595f add server-side validation support to kubectl
Kubernetes-commit: fe3772890f650f9bcf020b43dc5a51fab0fa17f4
2022-03-09 14:52:32 +00:00
Kevin Delgado 7e681490ec Generalize dry run verify to arbitrary query param
Kubernetes-commit: d6c83281bc696474a76365a879f2255b8b568786
2022-03-09 14:51:50 +00:00
Jordan Liggitt 344e97b543 Add command to request a bound service account token
Kubernetes-commit: fca9b1d9fcc7288ecb93c969ff9907a5def2dc9e
2022-01-31 11:46:50 -05:00
Aram Peres 8e80d8fd7e Cleanup kubectl label selectors with 'cmdutil.AddLabelSelectorFlagVar'
Kubernetes-commit: 8f8138bc35f59ef04b77a3520d8d1065603ccdb7
2022-01-06 23:28:44 -05:00
Andrea Hoffer 09ed00ef49 Minor adjustments to descriptions and example text
Kubernetes-commit: 6b736f348483bb6b20d4633319305960f4d9e4c1
2021-07-06 15:05:26 -04:00
Julian V. Modesto 04f62ffb0b Cache the OpenAPI schema for server-side dry-run.
Currently, server-side dry-run fetches the OpenAPI schema for every
single object.

This change fetches the OpenAPI schema only once.

Kubernetes-commit: caa158610dfb53de3582ed6df0eb37359206fc66
2021-01-19 16:36:14 -05: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
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
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
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 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
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
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00