Commit Graph

59 Commits

Author SHA1 Message Date
juanvallejo
0c4bb64304
expose default LogsForObject consumeRequest func 2018-08-06 16:23:18 -04:00
juanvallejo
3a3633a32e
update logs 2018-08-01 10:44:44 -04:00
juanvallejo
94fbb48dfc
switch logs to use external versions 2018-07-23 14:40:16 -04:00
David Eads
5ba07364ee fix logs command to be generic for all resources again 2018-07-20 15:10:44 -04:00
David Eads
c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
WanLinghao
7026f23cd2 convert Duration into seconds by go library function 2018-05-22 10:50:47 +08:00
David Eads
eabfcfaa2b start splitting polymorphic functions out of the factory 2018-05-17 08:55:31 -04:00
Di Xu
e8ef744493 fix missing flag value bindings in kubectl 2018-05-14 14:38:54 +08:00
David Eads
facd04be43 use IOStreams for cli commands 2018-05-08 09:02:34 -04:00
David Eads
b8aa7baa7d simplify resource builder usage 2018-05-04 13:02:49 -04:00
David Eads
6fbcbc994f remove unnecessarily flexibiliy to simplify the resource builder 2018-04-27 09:27:51 -04:00
juanvallejo
27bd4ded04 wire printflags through additional cmds 2018-04-25 16:07:32 -04:00
David Eads
f01e16bb3e remove flags deprecated in 1.5 2018-04-19 08:08:44 -04:00
Cao Shufeng
a06f0077bd Support multi-container pod for "kubectl logs"
kubectl logs -l will print logs for pods with the same label, however
it doesn't support pods with multi containers. This change adds support
to it with --all-containers.

Ussage:
$ kubectl logs my-pod --all-containers
$ kubectl logs -laa=bb --all-containers
$ kubectl logs my-pod my-container --all-containers (err: --all-containers=true should not be specifiled with container name my-container)
2018-03-27 11:44:31 +08:00
Maciej Szulik
2935fd69e9
Change printDeprecationWarning to use fmt.Fprintf instead of glog 2018-02-21 22:38:39 +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
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
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Di Xu
057b7bf767 rename selector to labelSelector 2017-11-06 14:30:20 +08: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
zhengjiajin
28746831e1 fix issue(51027)kubect logs --selector ignoring --tail=-1 2017-08-22 12:26:38 +08:00
ymqytw
b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
Kubernetes Submit Queue
bce32b66cd Merge pull request #47217 from CaoShuFeng/trival_fix
Automatic merge from submit-queue

[trivial]fix function name in comment

**Release note**:

```
NONE
```
2017-07-05 03:21:30 -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
Kubernetes Submit Queue
48d263d3bf Merge pull request #44282 from derekwaynecarr/fix-kubectl-logs
Automatic merge from submit-queue (batch tested with PRs 38751, 44282, 46382, 47603, 47606)

kubectl logs with label selector supports specifying a container name

**What this PR does / why we need it**:
Allows `kubectl logs` to take both a label selector and container name.  This allows me to fetch logs from pods by selector whose pods have multiple containers with a common name.  This is a common action when debugging components like the service-catalog that ship more than one container in their pod.  With this change, the following command lets me get logs for service-catalog.

```
$ kubectl logs -l app=sc-catalog-apiserver --namespace=service-catalog --container=apiserver
```
2017-06-16 18:05:48 -07:00
juanvallejo
d036686185
fix --local flag for kubectl set commands 2017-06-13 12:57:05 -04:00
Cao Shufeng
a70ec5ba40 [trivial]fix function name in comment 2017-06-09 11:26:06 +08:00
Jeffrey Regan
5a9b06b717 **What this PR does / why we need it**:
Remove kubectl's dependence on pkg/api/helper, as part of
broader effort to isolate kubectl from the rest of k8s.
In this case, the code becomes private to kubectl; nobody else uses it.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-05-21 20:44:21 -07: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
Chao Xu
08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
Derek Carr
9c956c2170 Allow the usage of kubectl logs with label selector and container name 2017-04-10 13:14:47 -04:00
Brendan Burns
79f51923d3 Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
Kubernetes Submit Queue
f14618a56b Merge pull request #43622 from deads2k/cli-10-category
Automatic merge from submit-queue (batch tested with PRs 42087, 43383, 43622)

move category expansion out of restmapper

RESTMapping isn't related to CategoryExpansion (the bit that expands "all" into items to be RESTMapped).  This provides that separation and simplifies the RESTMapper interface.

@kubernetes/sig-cli-pr-reviews
2017-03-27 16:08:20 -07:00
deads2k
8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
shiywang
52e4be2578 Be able to specify the timeout to wait for pod for kubectl logs/attach 2017-03-14 23:00:31 +08:00
Maciej Szulik
5472a5e0a5 Allow getting logs directly from deployment, job and statefulset 2017-02-27 13:13:09 +01:00
Brendan Burns
f1de40b448 Extract some flag description strings to be translated. 2017-02-21 22:07:30 -08:00
Brendan Burns
d9c4a289a6 Extract strings for translation. 2017-02-06 22:32:01 -08:00
deads2k
ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue
e3b9546028 Merge pull request #32752 from fraenkel/logs_selector
Automatic merge from submit-queue (batch tested with PRs 36071, 32752, 37998, 38350, 38401)

Allow a selector when retrieving logs

#19873

initial commit to see if I am headed in the right direction.
Its missing all the test cases, but the selector path works.
2016-12-08 16:25:54 -08:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Fabiano Franz
f6d1ac72a0 Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
Michael Fraenkel
acb032fc72 Allow a selector when retrieving logs 2016-10-15 18:28:55 +08: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
Brendan Burns
d1fa7ff7a8 Address comments. 2016-08-31 21:16:46 -07:00
Brendan Burns
155fb9f4be improve some error messages. 2016-08-29 22:27:22 -07: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