Commit Graph

48 Commits (82eeda0885851eb7f56fd30422d4b0b0afe9a270)

Author SHA1 Message Date
Maciej Szulik c7efab40b6 Fix kubectl explain for cronjobs 2018-01-25 16:10:31 +01: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
Marko Luksa c77d5d0f90 Kubectl explain now also prints the Kind and APIVersion of the resource 2017-11-14 11:05:19 +01:00
Clayton Coleman 93fed120fb
Move printing the valid resource types to a function
Should be calculated from discovery in the future. Also improve
descriptions on the affected commands.
2017-10-30 23:45:45 -04:00
ymqytw 4487cc5e15 switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Antoine Pelisse 249caa95b5 Rewrite `kubectl explain` to use openapi
This removes all dependencies on swagger 1.2 for explain.
2017-10-03 09:44:11 -07:00
Kubernetes Submit Queue 443f7e2af4 Merge pull request #50247 from tcharding/kubectl-explain
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Add whitespace to improve error msg clarity

**What this PR does / why we need it**:

Currently when `kubectl explain` is called without a resource the error message is tacked onto the end of the list of valid resources. The error is clearer if there is a new line after the valid resource list, this also causes the error to be left aligned instead of indented level with the valid resource list.

```release-note
NONE
```

/sig cli
/kind cleanup
2017-08-23 02:35:06 -07:00
ymqytw b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
tcharding 2070b3848e Add whitespace to improve error msg clarity 2017-08-07 17:05:21 +10: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
xilabao e0b4f3f73c remove --api-version 2017-05-19 10:56:35 +08:00
deads2k edd2d973a3 stop setting bad defaults that are indistinguishable from real values for clients 2017-05-17 07:18:34 -04:00
bruceauyeung ab4029c85b Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
rename variables to make sure that they conform to golang variable name convention
2017-04-25 15:07:01 +08:00
Brendan Burns 79f51923d3 Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
Brendan Burns d9c4a289a6 Extract strings for translation. 2017-02-06 22:32:01 -08:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06: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
deads2k 862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
lojies f5b7a6e2a3 add valid resources when args is nil 2016-08-23 09:40:57 +08:00
Kubernetes Submit Queue 5b5a4145da Merge pull request #30821 from ardnaxelarak/21076_change_isEmpty_to_Empty
Automatic merge from submit-queue

Rename IsEmpty to Empty

addresses #21076
2016-08-22 00:54:28 -07:00
Kara Alexandra d12a66a422 Rename IsEmpty to Empty
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-19 14:19:19 -07:00
lojies f81fef1f04 use valid_resources to replace kubectl.PossibleResourceTypes 2016-08-19 09:42:46 +08: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
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Janet Kuo e93b855242 Update kubectl help for 1.2 resources 2016-03-22 14:14:35 -07:00
deads2k 5bd161a9cc allow resource.version.group in kubectl 2016-03-11 10:21:50 -05:00
AdoHe 9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
deads2k 9c42d219bc allow disambiguation of resouces 2016-02-25 07:35:23 -05:00
Clayton Coleman 664d25ba5a Take GVK in SwaggerSchema()
This is needed for the legacy OpenShift API group (oapi) which is also
group: "", version: "v1", but needs to return a different swagger
schema.  Will in the future be replaced by group defaulting.
2016-02-06 21:24:33 -05:00
nikhiljindal 2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
deads2k 20f9c2c545 find partial resource matches 2015-12-21 09:26:06 -05:00
Clayton Coleman 151b4e5958 Tweak explain messages and abstract client 2015-12-18 00:27:22 -05:00
Abhishek Shah 6f63875165 Reverting 18442 2015-12-17 16:57:29 -08:00
deads2k 41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05:00
deads2k 66eecb963a update more kubectl bits for groupversion 2015-12-07 09:01:44 -05:00
Chao Xu 6e192760e3 refactoring latest.go GroupVersion;
clean up latest.go GroupVersions;
remove latest.GroupMeta.Group;
remove latest.GroupMeta.Version.
2015-11-30 11:30:21 -08:00
deads2k 5c4fb5bcbe make RESTMapper.KindFor 2015-11-25 14:02:37 -05:00
Jerzy Szczepkowski cac9e88c11 Updated kubectl help messages.
Updated kubectl help messages: added info about hpa. Fixes #17357.
2015-11-19 15:26:43 +01:00
Janet Kuo 1d37c549b1 Revert/disable the slash syntax for kubectl explain group/version 2015-10-21 13:58:54 -07:00
Chao Xu 6f0f87b629 make kubectl explain work for extensions API 2015-10-19 10:21:56 -07:00
Anastasis Andronidis e8b9dde623 new kubectl explain command 2015-09-26 14:25:53 +03:00