juanvallejo
25a4932653
add --template tests for commands
...
Adds --template printing test-cmd tests for the following commands:
kubectl annotate, kubectl apply, kubectl autoscale, kubectl
convert, kubectl create, kubectl expose, kubectl get, kubectl label,
kubectl patch.
2018-07-03 13:53:06 -04:00
Di Xu
acabdcb96a
apply global flag "context" for kubectl config view
2018-06-02 13:31:58 +08:00
juanvallejo
40e52bf07d
remove legacyscheme dep from printFlags
2018-05-10 14:51:12 -04:00
juanvallejo
a74b28d961
rm GetStandardPrinter
2018-05-07 15:37:55 -04:00
juanvallejo
5a34e4f594
remove printer helpers
2018-05-07 15:37:55 -04:00
zhengjiajin
457a7e76d9
add kubectl config view --raw example help user use
2018-03-23 09:51:47 +08:00
Di Xu
33b3fb9bed
flag value bindings for kubectl create/get/set commands
2018-02-27 11:00:55 +08: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
juanvallejo
c53120e6b9
ensure PrinterForCommand is consumed through cmdutil.Factory
2017-12-05 13:39:29 -05:00
juanvallejo
f5ab356043
pass printOpts by pointer
2017-11-20 14:49:23 -05:00
juanvallejo
d3773b4b06
consolidate printer OutputOpts w PrintOpts
...
This patch removes the use of printers.OutputOptions in favor of only
having a single struct for setting / passing printer options set by user
flags.
2017-11-20 14:49:23 -05:00
ymqytw
b776df8a20
move i18n to kubectl/util
2017-08-16 12:27:36 -07:00
tcharding
be04ad4aca
Correct case for starting character of option string
2017-08-11 07:24:08 +10:00
Sunil Arora
f768a63fb0
Get cmd uses print-column extn from Openapi schema
...
Get command now uses metadata x-kubernetes-print-columns, if present, in Openapi schema
to format output for a resource. This functionality is guarded by a boolean
flag 'use-openapi-print-columns'.
2017-06-06 13:30:24 -07:00
Waseem Ahmad
8442a118ea
Denote if a printer is generic.
...
This fixes #38779 .
This allows us to avoid case in which printers.GetStandardPrinter
returns nil for both printer and err removing any potential panics that
may arise throughout kubectl commands.
Please see #38779 and #38112 for complete context.
Add comment explaining adding handlers to printers.HumanReadablePrinter
also remove an unnecessary conversion of printers.HumanReadablePrinter
to printers.ResourcePrinter.
2017-05-31 13:02:23 +05:30
Clayton Coleman
2aa4abb73b
Refactor commands to use new factory method
2017-02-23 00:28:32 -05:00
deads2k
d3da1d102d
deprecate and disconnect --output-version
2017-02-16 13:23:59 -05:00
Brendan Burns
25ba561702
Extract strings for translation for the kubectl config family.
2017-01-27 20:31:49 -08:00
Dr. Stefan Schimanski
82826ec273
pkg/util/flag: move to k8s.io/apiserver
2017-01-24 20:56:03 +01:00
deads2k
335ef747d6
mechanical
2017-01-23 10:03:55 -05:00
deads2k
cdb2934bbc
remove kubernetes copy of clientcmd types
2017-01-19 07:39:19 -05:00
Fabiano Franz
f6d1ac72a0
Use our own normalizers for cmd examples and descriptions
2016-10-17 11:49:55 -02:00
YuPengZTE
83cdfba0e0
It is better to add "\n" in printf
...
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-08-26 11:58:26 +08:00
Daniel Smith
f1fd638962
fix register.go files up + add test import
2016-08-11 17:06:54 -07:00
Andrey Kurilin
91cace347d
Fix various typos in kubectl
2016-08-02 19:51:51 +03: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
CJ Cullen
86293810af
Move ModifyConfig (and some related functions) into the clientcmd pkg.
2016-05-07 18:15:18 -07:00
AdoHe
6958db9c16
fix config view output bug
2016-04-28 23:04:57 -04:00
harry
bc422f077a
Refactor bool_flag into sub pkg
2016-03-21 14:50:57 +08:00
AdoHe
9cc668f7c6
update commented examples just remove $
2016-02-29 09:41:09 -05:00
Jeff Lowdermilk
734a8c0602
Change kubectl help/examples to use jsonpath instead of template
2016-01-28 16:10:48 -08:00
Eric Paris
aad4b4477d
Make "BoolFlag" booleans not require =true
2016-01-14 09:07:00 -05:00
deads2k
66eecb963a
update more kubectl bits for groupversion
2015-12-07 09:01:44 -05:00
Janet Kuo
4d92268212
Better error handling for output format when "kubectl config view"
2015-11-02 16:25:52 -08:00
hurf
c4dc056105
Improve message from kubectl config
...
1.use Fprintf instead of Printf
2.output simple success messages
3.lowercase all error messages
2015-09-23 16:10:21 +08:00
Kris Rousey
ae6c64d9bb
Moving everyone to unversioned client
2015-08-18 10:23:03 -07:00
Peeyush Agarwal
05e069d038
Use bash comments in kubectl examples
...
Comments in kubectl examples should use bash comments, not Go comments.
So, replaces // by # for example strings.
2015-08-12 19:56:23 +00:00
Mike Danese
8e33cbfa28
rewrite go imports
2015-08-05 17:30:03 -07:00
Mike Danese
401d3c43fd
remove removed flags from usage examples
2015-06-09 12:56:58 -07:00
Eric Paris
6b3a6e6b98
Make copyright ownership statement generic
...
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Jeff Lowdermilk
fa6ce7b7bf
Add a --raw flag to kubectl config view
...
Defaults to false, unless --flatten is specified. Default behavior
(--raw=false) is that byte data (Client{Certificate,Key}data,
CertificateAuthorityData) is redacted for a more human-readable view.
Useful for manually inspecting files that have embeded data.
2015-04-23 09:19:45 -07:00
deads2k
de4be5422c
change kubeconfig loading order
2015-04-16 13:05:09 -04:00
deads2k
bac5cbbe82
add flattening and minifying options to config view
2015-04-14 10:23:10 -04:00
deads2k
b2e3f2185e
make kubectl config behave more expectedly
2015-04-09 15:43:57 -04:00
deads2k
5c4b6583e4
fix kubectl config view to respect serialization formats
2015-04-07 08:07:24 -04:00
deads2k
8555ed3ede
allow any number of kubeconfig files
2015-03-17 08:49:34 -04:00