Commit Graph

104 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Darren Shepherd 297b309740 Remove kustomize 2019-08-19 08:33:22 -07:00
Ilya Dmitrichenko 6d7a9048b6
Move printers & resources packages
These packages deserve to live at the top level of `k8s.io/cli-runtime`,
as they are potentially of wider use than genericclioptions.
2019-03-07 23:00:24 +00:00
Jingfang Liu b38cf738d6 update kubectl subcommand with -k changes 2019-02-25 16:30:50 -08:00
juanvallejo e8df247597
fix --local panic in set commands 2019-02-07 16:56:32 -05:00
Jordan Liggitt 17aa60686e Deprecate and remove use of alpha metadata.initializers field, remove IncludeUninitialized options 2019-01-23 16:34:43 -05:00
Vikranth Thati f72072cd60 Allow setting images for initContainers through kubectl set command. 2019-01-10 22:28:26 +05:30
Yang Li 141d33a2a5 Fix some golint errors for packages in `pkg/kubectl/cmd`
Co-authored-by: Arijit Basu <sayanarijit@gmail.com>
2018-11-22 22:09:08 +08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Maciej Szulik 21789b85a6
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/temlpates 2018-10-11 22:01:03 +02:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Antoine Pelisse 967280b58e Add --server-dry-run flag to `kubectl apply` 2018-09-02 13:13:46 -07:00
Maciej Szulik 5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
David Eads c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
Kubernetes Submit Queue 7a7ab200ee
Merge pull request #64242 from WanLinghao/ctl_print_fix
Automatic merge from submit-queue (batch tested with PRs 63417, 64249, 64242, 64128, 64275). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix bugs that break processing when printing errors occur in kubectl

**What this PR does / why we need it**:
The process should continue when error happens, this patch fix the problem
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-24 20:49:15 -07:00
WanLinghao b020a4ba8c fix bugs that break processing when printing errors occur in kubectl 2018-05-24 09:57:25 +08:00
Kubernetes Submit Queue b143093a62
Merge pull request #64111 from juanvallejo/jvallejo/move-more-helpers
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move CanBeExposed helper from factory_client_access

**Release note**:
```release-note
NONE
```

Moves additional helpers from the "factory_client_access". Continues work from https://github.com/kubernetes/kubernetes/pull/63984 and https://github.com/kubernetes/kubernetes/pull/63884

Moves CanBeExposed from factory_client_access.

cc @soltysh
2018-05-23 13:50:02 -07:00
juanvallejo fb0794976a move Pauser and Resumer from the factory 2018-05-23 10:27:20 -04:00
juanvallejo 0d3e85608f move f.Command out of the factory 2018-05-22 13:31:01 -04:00
Kubernetes Submit Queue a0036fcae1
Merge pull request #64113 from juanvallejo/jvallejo/remove-uneeded-factory-methods
Automatic merge from submit-queue (batch tested with PRs 63151, 63795, 63553, 64068, 64113). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove LabelsForObject and ResolveImage from factory

**Release note**:
```release-note
NONE
```

Removes the `ResolveImage` and `LabelsForObject` methods from factory_client_access, which are not needed.

cc @soltysh
2018-05-21 21:41:24 -07:00
Kubernetes Submit Queue 8cccc022b0
Merge pull request #64118 from deads2k/cli-65-podspec
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

move updatepodspecforobject out of factory

Updating a podspec is a polymorphic helper, but it isn't a factory method.

@kubernetes/sig-cli-maintainers 
/assign @juanvallejo 

```release-note
NONE
```
2018-05-21 18:42:37 -07:00
David Eads 087140aee9 move updatepodspecforobject out of factory 2018-05-21 17:56:33 -04:00
juanvallejo 8fc0bfd287 remove LabelsForObject and ResolveImage from factory 2018-05-21 16:30:46 -04:00
juanvallejo d1603c9560 move PrintOptions to genericclioptions 2018-05-21 14:59:41 -04:00
David Eads 420dd9bf66 move type setting into an optional layer above normal printing 2018-05-17 17:22:12 -04:00
David Eads 3af9e75950 switch to versioned objects only for set 2018-05-14 11:40:11 -04:00
Kubernetes Submit Queue 143d3b8824
Merge pull request #63561 from juanvallejo/jvallejo/make-opinionated-print-flags-constructor
Automatic merge from submit-queue (batch tested with PRs 63669, 63511, 63561, 63289). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove legacyscheme dep from printFlags

**Release note**:
```release-note
NONE
```

Breaks PrintFlags dependency on legacyscheme
Prerequisite to https://github.com/kubernetes/kubernetes/pull/63402

cc @deads2k @soltysh
2018-05-10 14:25:16 -07:00
juanvallejo 40e52bf07d remove legacyscheme dep from printFlags 2018-05-10 14:51:12 -04:00
David Eads 16d6a6c52f move resource builder to generic options 2018-05-10 14:15:12 -04:00
David Eads c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
David Eads a53a72e238 udpate some examples to use external types 2018-05-04 13:02:49 -04:00
David Eads b8aa7baa7d simplify resource builder usage 2018-05-04 13:02:49 -04:00
David Eads 1e5372b620 get the resource.Info out of the conversion business 2018-05-01 07:58:42 -04:00
David Eads 6fbcbc994f remove unnecessarily flexibiliy to simplify the resource builder 2018-04-27 09:27:51 -04:00
David Eads 8c1b687356 update more commands for iostreams 2018-04-25 08:45:15 -04:00
David Eads ecd9a6be2e final record flag cleanup 2018-04-19 14:56:00 -04:00
David Eads 484d81ab01 use recordFlags 2018-04-19 08:50:01 -04:00
juanvallejo 8a7b2fdda3
begin wiring printopts through complete commands 2018-04-13 11:50:54 -04:00
David Eads 01609036c2 use standard interface functions for printers 2018-04-12 16:02:30 -04:00
juanvallejo 2a202cf49a
update PrintFlags#Complete to receive string template 2018-04-06 16:44:40 -04:00
juanvallejo b8dc20646c
wire printflags through set cmds 2018-04-06 10:48:36 -04:00
Di Xu 33b3fb9bed flag value bindings for kubectl create/get/set commands 2018-02-27 11:00:55 +08:00
David Eads d8a5420b7c remove unneeded factory codec methods 2018-02-21 15:20:20 -05:00
David Eads be04e7c1b1 collapse printing paths 2018-02-21 08:15:22 -05:00
David Eads dd6405681f cleanup printers some more 2018-02-20 12:59:40 -05:00
Kubernetes Submit Queue 15dbd4e2ae
Merge pull request #59227 from juanvallejo/jvallejo/remove-mapper-dep-printer
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove mapper dependency for cmdutil.Factory#PrintSuccess

**Release note**:
```release-note
NONE
```

Part of a series of patches removing printing stack dependency on mappings the rest mapper

**Before**
```
$ kubectl label pod/my-pod label=label
pod "my-pod" labeled
```

**After**
```
$ kubectl label pod/my-pod label=label
pods "my-pod" labeled
```

cc @deads2k
2018-02-07 08:39:15 -08:00
juanvallejo beb5ea641a
remove mapper dependency - PrintSuccess 2018-02-07 10:10:45 -05:00
Di Xu e45117856e kubectl: cannot set --all and --selector at the same time 2018-02-06 23:55:36 +08:00
Di Xu 1c715d51c4 some code change
fix wrong required flags

disable the addition of [flags] to the usage, use customized useline

fix function rename
2017-12-25 16:23:38 +08:00
Clayton Coleman 8f4b6c8771
All commands must declare Unstructured or Internal
Callers must take a dependency on one or the other set of conversions
and default client behavior. Future changes may add a Versioned() type,
but this is an accurate reflection of current code state.
2017-11-19 20:41:02 -05:00
Clayton Coleman 04ab96d2bd
Unify Object and UnstructuredObject
The unified RESTMapper and Typer follow the new rules, but on error will
fallback to the legacy path (while still supporting Unstructured
objects). This allows callers to handle the appropriate distinction
themselves if necessary.

Add a LocalParam() method to the resource.Builder that DRYs up a large
chunk of complicated code in set commands.
2017-11-19 19:16:50 -05:00