Commit Graph

47 Commits (f8024ab087b321190a3bdcd29e0d22ef7cbb4b45)

Author SHA1 Message Date
Jingfang Liu b38cf738d6 update kubectl subcommand with -k changes 2019-02-25 16:30:50 -08:00
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
Sean Sullivan 68cea87cfd kubectl: remove unnecessary internal->external conversion before PrintObj 2018-11-02 10:03:52 -07: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
Maciej Szulik 96d01da215
Fix panic in kubectl rollout commands 2018-09-27 15:10:52 +02:00
Maciej Szulik 5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
David Eads 0661216d9a switch rollout history to external 2018-08-02 07:57:14 -04:00
juanvallejo 2b0b605c80
wire PrintFlags through rollout commands
Binds PrintFlags to rollout commands.
Adds tests ensuring --template printing is supported by rollout cmds.
2018-07-06 17:32:42 -04:00
David Eads c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
juanvallejo f3a46cf626 move additional methods from factory 2018-05-18 11:49:02 -04:00
David Eads 16d6a6c52f move resource builder to generic options 2018-05-10 14:15:12 -04:00
David Eads 682e028516 stop pretending that we have statically known shortcuts 2018-05-08 08:11:56 -04:00
David Eads b8aa7baa7d simplify resource builder usage 2018-05-04 13:02:49 -04:00
David Eads 9a48066749 update restmapping to indicate fully qualified resource 2018-05-01 16:34:49 -04:00
David Eads 6fbcbc994f remove unnecessarily flexibiliy to simplify the resource builder 2018-04-27 09:27:51 -04: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
juanvallejo 90d76adb4b
add Local and Unstructured builder attributes
Moves DisabledClientMapperForMapping wrapper to new Local attribute.
Removes Factory#NewUnstructuredBuilder in favor of new Unstructured
builder attribute.
2017-09-05 11:57:00 -04:00
crimsonfaith91 ebdbafd2c5 statefulSet kubectl rollout command 2017-08-24 16:43:03 -07:00
ymqytw b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
Alexander Campbell 6fd36c10ad kubectl/cmd: many small refactors
* Rename variables and functions to match Go convention.
   For example, UsageError --> UsageErrorf.
 * Remove redundant or unreachable code.
 * Simplify some utility functions (no functionality changes).
 * Fix hanging 'if { return } else { return }' constructs.
 * Fix several incorrect printf verbs.
2017-06-27 16:25:20 -07:00
juanvallejo d036686185
fix --local flag for `kubectl set` commands 2017-06-13 12:57:05 -04:00
Janet Kuo edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
deads2k 8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
Brendan Burns 700b6b3b7b Extract strings from the rollout command. 2017-02-11 22:15:10 -08:00
Fabiano Franz f6d1ac72a0 Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
AdoHe b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
Michail Kargakis 75f30ec46f kubectl: add --revision flag in rollout status 2016-10-10 15:04:46 +02:00
Kubernetes Submit Queue 2941069307 Merge pull request #32894 from deads2k/cli-01-remove-arg
Automatic merge from submit-queue

make --include-extended-apis deprecated and remove plumbing

Marks a dead CLI parameter as deprecated and removes the plumbing for it.
2016-09-19 21:11:04 -07:00
deads2k 862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
ymqytw c67a62da49 Fixes #30562: Refactor kubectl command options to use common struct for common file params 2016-09-12 11:01:37 -07:00
Xing Zhou 80d6cd0a40 Added bash completion for several kubectl commands.
This path added/fixed bash completion for several
kubectl commands.

Fixes #25287
2016-08-30 13:12:09 +08:00
Michail Kargakis ad33c5c087 kubectl: refactor rollout history to be more configurable
ChangeCauseAnnotation is hardcoded in PrintRolloutHistory and it needs
to be overriden since other resources that may need to be added in
`kubectl rollout history` may not use it. Instead of adding one more
method in the factory, refactor the existing HistoryViewer interface
to accomodate the change.
2016-07-12 10:36:14 +02:00
k8s-merge-robot 2da247ffbc Merge pull request #26977 from joe2far/fix-help-strings
Automatic merge from submit-queue

Make kubectl help strings consistent
2016-07-07 00:12:22 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
joe2far 25b4341dc7 Make kubectl help strings consistent 2016-06-29 12:50:24 +01:00
Michael Rubin 760b04e294 Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline
is prepended to output, which will alter the yaml output.

Here we use dedent to format the code to match the output.

hack/update-generated-docs.sh has been run and the affected files have
been added.

Note: for describe.go we added a period to the end of an output message.
2016-06-26 22:51:14 -07:00
Mike Metral 30f21fd431 enable recursive processing in kubectl rollout 2016-05-12 01:27:17 -07:00
k8s-merge-robot 07929972a3 Merge pull request #18835 from brendandburns/3rdparty
Automatic merge from submit-queue

Add support for 3rd party objects to kubectl

@deads2k @jlowdermilk

Instructions for playing around with this:

Run an apiserver with third party resources turned on (`--runtime-config=extensions/v1beta1=true,extensions/v1beta1/thirdpartyresources=true`)

Then you should be able to:

```
kubectl create -f rsrc.json
```

```json
{
  "metadata": {
    "name": "foo.company.com"
  },
  "apiVersion": "extensions/v1beta1",
  "kind": "ThirdPartyResource",
  "versions": [
    {
      "apiGroup": "group",
      "name": "v1"
    },
    {
      "apiGroup": "group",
      "name": "v2"
    }
  ]
}
```

Once that is done, you should be able to:

```
curl http://<server>/apis/company.com/v1/foos
```

```
curl -X POST -d @${HOME}/foo.json http://localhost:8080/apis/company.com/v1/namespaces/default/foos
```

```json
{
  "kind": "Foo",
  "apiVersion": "company.com/v1",
  "metadata": {
    "name": "baz"
  },
  "someField": "hello world",
  "otherField": 1
}
```

After this PR, you can do:

```
kubectl create -f foo.json
```

```
kubectl get foos
```

etc.
2016-03-31 18:09:56 -07:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
k8s-merge-robot f36c44be79 Merge pull request #23279 from kargakis/export-volume-describer
Automatic merge from submit-queue

kubectl: enhance podtemplate describer

@kubernetes/kubectl 

@smarterclayton for the dc decsriber
2016-03-30 12:53:52 -07:00
Mike Metral 7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
Michail Kargakis 8477699055 kubectl: enhance podtemplate describer 2016-03-25 19:56:23 +01:00
Janet Kuo e93b855242 Update kubectl help for 1.2 resources 2016-03-22 14:14:35 -07:00
AdoHe 9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Janet Kuo 8fb86a3d3b Add kubectl rollout history 2016-02-01 15:32:43 -08:00