Commit Graph

1160 Commits

Author SHA1 Message Date
Janet Kuo
2e5aeaff52 Add percentage of total limits and a help doc to explain why it may be over 100% 2015-09-10 18:21:50 -07:00
Janet Kuo
5ffe46d376 Use resource.Quantity string representation to print requests and limits 2015-09-10 18:21:50 -07:00
Janet Kuo
22a794cc22 List resource QoS tier of each container when describing pods; Re-order resource table 2015-09-10 18:21:50 -07:00
Janet Kuo
6e76f1aef7 Show more information in describe node/pod 2015-09-10 18:21:50 -07:00
k8s-merge-robot
e46c940cae Merge pull request #13545 from brendandburns/kubectl
Auto commit by PR queue bot
2015-09-10 17:23:11 -07:00
k8s-merge-robot
381a723814 Merge pull request #13532 from JanetKuo/kubectl-dont-use-specific-printer
Auto commit by PR queue bot
2015-09-10 14:39:02 -07:00
Brendan Burns
2b3bb33569 Address comments. 2015-09-10 13:07:13 -07:00
Brendan Burns
56a1cd76cb Address changes. 2015-09-10 13:05:32 -07:00
Brendan Burns
b485821bb1 Enable custom columns printing in kubectl 2015-09-10 13:05:32 -07:00
tummychow
78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Michal Fojtik
fb14c8cdf3 Allow to replace os.Exit() with panic when CLI command fatal error 2015-09-10 09:42:22 +02:00
Chao Xu
002dcc6343 Merge pull request #13737 from wojtek-t/switch_to_node_in_registry
Rename "minion" to "node" in few places.
2015-09-09 17:49:22 -07:00
kargakis
c9268e1faf expose: Avoid selector resolution if a selector is not needed 2015-09-09 21:30:23 +02:00
Brendan Burns
682c68c2fb Address comments, and fix some bugs in kubectl. 2015-09-09 11:48:04 -07:00
Avesh Agarwal
6d6f338fac Adds servicesaccounts to kubectl get/describe cli help and docs. 2015-09-09 12:15:25 -04:00
Wojciech Tyczynski
cd1ac360de Rename "minion" to "node" in few places. 2015-09-09 16:18:23 +02:00
Jan Chaloupka
70c74fbe4b Commit cd7d78b696 replaced use of
util.CheckErr(err)

with

if err != nil {
	return err
}

One replacement is incorrent. The current call of resource.NewBuilder is returned in r variable. Which was tested with util.CheckErr(r.Err()) before cd7d78b696 commit. It was replaced by

if err != nil {
	return err
}

which is incorrect as err is not set by resource.NewBuilder call. The correct use is

err := r.Err()
if err != nil {
	return err
}
2015-09-09 12:40:55 +02:00
Chao Xu
a6566031be Merge pull request #13422 from feihujiang/supportSettingEnvInKubectlRun
Support setting env vars in kubectl run
2015-09-08 10:32:48 -07:00
feihujiang
84e94e39cd Support setting env vars in kubectl run 2015-09-08 14:31:29 +08:00
feihujiang
008a26f690 Get the terminated pod by name 2015-09-08 14:15:36 +08:00
hurf
8efc62bcce Simplify default output of "expose" command
Use simple output string such as "rc nginx exposed" to show the
result. Users can still use options like "-o yaml" to view detailed
result.

IP will be printed with detailed result now.
2015-09-07 15:17:17 +08:00
Dai Zuozhuo
2e2ef3e830 change -o template to -o go-template=... 2015-09-05 22:30:47 +08:00
k8s-merge-robot
2e2def36a9 Merge pull request #13581 from caesarxuchao/APIGroup-testapi-2
Auto commit by PR queue bot
2015-09-04 20:38:45 -07:00
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Quinton Hoole
be19554bae Merge pull request #13383 from hurf/label_drun
Add --dry-run option for label command
2015-09-04 14:03:14 -07:00
Quinton Hoole
ded8569524 Merge pull request #12908 from mwielgus/kubectl_get_hpa
HorizontalPodAutoscaler in kubectl get
2015-09-04 09:07:08 -07:00
Quinton Hoole
e5e2bc9580 Merge pull request #10833 from markturansky/loosen_binding
Allow PV/Claim matching on inexact access modes
2015-09-04 09:06:31 -07:00
Piotr Szczesniak
de92c9bac2 Merge pull request #13482 from jlowdermilk/resource-builder-err-msg
Print recognized file extensions in resource builder error
2015-09-04 13:45:41 +02:00
Piotr Szczesniak
7fc1fe2dd9 Merge pull request #13444 from hurf/run_out
Change default output of `run` command
2015-09-04 13:43:00 +02:00
Piotr Szczesniak
57e35b794f Merge pull request #13445 from hurf/ru_out
Make -o option working for rolling-update
2015-09-04 09:11:28 +02:00
Piotr Szczesniak
b2cfb8cb8e Merge pull request #13486 from JanetKuo/kubectl-rolling-generateName
Fix the bug that rolling-update throws error when using generateName
2015-09-04 09:07:45 +02:00
Timothy St. Clair
2b7e758c3c Fixes the experimental api, which appeared to be completely broken.
Fix for rebase with nikhiljindal/deploymentController
2015-09-03 21:56:45 -05:00
Abhi Shah
0758a298db Merge pull request #13366 from feihujiang/printValidContainersNames
Print valid container names when the command not specify the container
2015-09-03 16:36:27 -07:00
Abhi Shah
7dd85cb51b Merge pull request #13490 from feihujiang/changeVariablesToEnvionmentVariablesWhenDescribeContainers
Change variables to environment variables when describe containers
2015-09-03 15:39:24 -07:00
Jeff Lowdermilk
cb65cfa746 Print recognized file extensions in resource builder error 2015-09-03 11:01:13 -07:00
hurf
46e7f5684c Add --dry-run option for label command
With --dry-run option, label command will print the object locally
without update it on server side.
2015-09-03 21:37:11 +08:00
hurf
65bfd3541f Make -o option working for rolling-update
Use simple message to show the result. If -o is specified, print
updated rc.
2015-09-03 20:29:58 +08:00
Marcin Wielgus
3f21071064 HorizontalPodAutoscaler in kubectl get 2015-09-03 13:49:06 +02:00
feihujiang
0427711c42 Fixes upper case letters in kubectl examples 2015-09-03 12:00:21 +08:00
Janet Kuo
96031aaca5 Get printer from factory instead of using NewHumanReadablePrinter to retrieve handled resources 2015-09-02 15:38:40 -07:00
Abhi Shah
13784bf9ca Merge pull request #13047 from JanetKuo/kubectl-label-bash-completion
Enable kubectl label resource type bash completion
2015-09-02 15:16:54 -07:00
Abhi Shah
642ebb4994 Merge pull request #13099 from JanetKuo/kubectl-expose-deprecate-create-external-load-balancer
Deprecated kubectl flag "create-external-load-balancer"
2015-09-02 15:16:08 -07:00
Abhi Shah
b6aac3633d Merge pull request #13415 from JanetKuo/kubectl-rolling-bash-completion
Enable kubectl rolling-update rc name bash completion
2015-09-02 15:14:21 -07:00
Janet Kuo
c9beb5b39c Fix the bug that rolling-update throws error when using generateName 2015-09-02 13:30:14 -07:00
Dan Mace
347b9334e2 Refactor test to use new fake reactors
Fix a test compilation error by refactoring the test code to use
the latest fake reactor framework.
2015-09-02 13:45:32 -04:00
Brendan Burns
3e407aebb2 Diable a broken unit test 2015-09-02 10:39:17 -07:00
Brendan Burns
31454d0f46 Merge pull request #12705 from brendandburns/kubectl
Add a printer that knows how to print user-defined columns
2015-09-02 09:47:34 -07:00
hurf
af1d7de874 Change default output of run command
Use simple message instead of print result in `get` form.
2015-09-02 14:11:20 +08:00
feihujiang
02206bed61 Print valid container names when the command not specify the container 2015-09-02 14:06:46 +08:00
feihujiang
e7592b1c99 Change variables to environment variables when describe containers 2015-09-02 10:02:07 +08:00
k8s-merge-robot
0a062c5b24 Merge pull request #11942 from ironcladlou/rolling-update-availability
Auto commit by PR queue bot
2015-09-01 16:51:13 -07:00
k8s-merge-robot
51d7f85636 Merge pull request #13406 from nikhiljindal/kubectlDeployment
Auto commit by PR queue bot
2015-09-01 13:33:23 -07:00
Daniel Smith
cfe2bf10f2 Merge pull request #13426 from feihujiang/aggregateErrorsWhenValidateParams
Aggregate errors when validate kubectl required parameters and labels
2015-09-01 12:26:45 -07:00
Daniel Smith
10efd9806a Merge pull request #13227 from kargakis/fix-exposing-from-file
expose: Don't query the server for input objects
2015-09-01 12:23:01 -07:00
Janet Kuo
b673920ccf Get printer from factory to retrieve handled resources 2015-09-01 10:20:51 -07:00
Janet Kuo
23740d9080 Enable kubectl label resource type bash completion 2015-09-01 10:19:51 -07:00
Brendan Burns
de14623775 Add a printer that knows how to print user-defined columns 2015-09-01 10:11:13 -07:00
Dan Mace
da5e4d7bd5 Rolling updater availability enhancements
Enhance the rolling updater to support maintaining minimum pod
availability for the duration of the update process.
2015-09-01 12:54:08 -04:00
deads2k
f1b81ff678 bind filenames var instead of looking up 2015-09-01 08:35:57 -04:00
k8s-merge-robot
a4d953f4b3 Merge pull request #13131 from hurf/anno_unused
Auto commit by PR queue bot
2015-09-01 04:32:13 -07:00
feihujiang
da03746b22 Aggregate errors when validate kubectl required parameters 2015-09-01 14:34:31 +08:00
Janet Kuo
94b4659b7b Enable kubectl rolling-update rc name bash completion 2015-08-31 16:37:44 -07:00
nikhiljindal
ac0b060e62 Adding a kubectl resource printer for deployments 2015-08-31 14:57:02 -07:00
k8s-merge-robot
08668d7d94 Merge pull request #13309 from kubernetes/revert-13246-revert-12492-limit_range_api
Auto commit by PR queue bot
2015-08-28 21:03:49 -07:00
k8s-merge-robot
f1acdbe3c6 Merge pull request #13188 from hurf/label_printer
Auto commit by PR queue bot
2015-08-28 18:04:01 -07:00
k8s-merge-robot
4c56d4962f Merge pull request #13179 from feihujiang/showClientVersionAtLeastWhenCouldNotReadServerVersion
Auto commit by PR queue bot
2015-08-28 17:32:57 -07:00
Prashanth B
52f7833cd3 Revert "Revert "LimitRange updates for Resource Requirements Requests"" 2015-08-28 09:26:36 -07:00
Janet Kuo
18e87724c5 Deprecated kubectl flag "create-external-load-balancer" 2015-08-28 00:54:33 -07:00
markturansky
0b6030f50c added better matching for PV access modes 2015-08-27 15:34:07 -04:00
kargakis
e86bb1aeca expose: Don't query the server for input objects
Signed-off-by: kargakis <mkargaki@redhat.com>
2015-08-27 15:52:22 +03:00
Piotr Szczesniak
6e05b9e3a3 Revert "LimitRange updates for Resource Requirements Requests" 2015-08-27 10:50:50 +02:00
hurf
961d7f995a Remove unused parameters and flags
Some params and flags are set but not used, remove them.
2015-08-27 10:40:40 +08:00
Yu-Ju Hong
b00c04c497 Merge pull request #12845 from hurf/o_name
Add -o name for commands which use printer to output results
2015-08-26 13:03:52 -07:00
Yu-Ju Hong
1bae2b677d Merge pull request #12492 from derekwaynecarr/limit_range_api
LimitRange updates for Resource Requirements Requests
2015-08-26 13:02:57 -07:00
Marcin Wielgus
55cd0d565e Kubectl describe for experimental HorizontalPodAutoscaler 2015-08-26 16:28:50 +02:00
hurf
d2d96ff6e1 Add -o name for commands which use printer to output results
Added a new printer which prints 'resource/name' pair of a given
object.
2015-08-26 17:04:23 +08:00
hurf
6ccc438169 Use exsiting print function in label command
Instead of getting printer in the code, use exsiting function.
2015-08-26 16:45:11 +08:00
feihujiang
6b394e7212 Kubectl version should show client version at least
when couldn't read server version
2015-08-26 15:00:28 +08:00
markturansky
c0aa62eb38 Added PersistentVolumeSource to describer output 2015-08-25 14:18:28 -04:00
Yu-Ju Hong
5dfc904c18 Merge pull request #10979 from kargakis/resource-builder-name-method
Support default types in the resource builder
2015-08-25 10:08:00 -07:00
Marek Grabowski
ad41904121 Merge pull request #12837 from JanetKuo/kubectl-validate-on
Make --validate default on and shows how to turn if off
2015-08-25 17:41:23 +02:00
Janet Kuo
5823ef771b Make --validate default on and shows how to turn if off 2015-08-25 03:18:32 -07:00
Salvatore Dario Minonne
8e4d74988a to add tests for RC selector overlapping and fix few comments 2015-08-25 10:02:20 +02:00
kargakis
f3c63ba16b Support default types in the resource builder
Right now there is no method in the resource builder for specifying just the name of a resource. NameParam is useful when a default type is already specified with ResourceTypes.

Signed-off-by: kargakis <mkargaki@redhat.com>
2015-08-25 10:36:37 +03:00
Nikhil Jindal
5c0725a26a Merge pull request #13089 from JanetKuo/kubectl-exec-bash-completion
Enable kubectl exec pod name bash completion
2015-08-24 14:06:35 -07:00
derekwaynecarr
3ee66f358f Update kubectl describer for LimitRange 2015-08-24 15:19:29 -04:00
Nikhil Jindal
4c88aeeda2 Merge pull request #13093 from hurf/nit
Fix docstring for InfoForObejct func
2015-08-24 11:37:50 -07:00
Nikhil Jindal
e690f3b3e8 Merge pull request #12900 from feihujiang/deleteMultipleResourcesWithTheSameName
Allow delete multiple resources with the same name
2015-08-24 10:40:41 -07:00
Nikhil Jindal
4ffb59fa79 Merge pull request #12813 from JanetKuo/kubectl-deprecate-t
Deprecated -t for --template to make it --tty
2015-08-24 10:37:55 -07:00
hurf
5bec41d0b6 Fix docstring for InfoForObejct func 2015-08-24 21:46:49 +08:00
Janet Kuo
46eb607677 Enable kubectl exec pod name bash completion 2015-08-24 05:25:48 -07:00
Marcin Wielgus
9ad982ef77 Merge pull request #12844 from hurf/label_out
Simplify output of 'kubectl label' command
2015-08-24 14:00:56 +02:00
Janet Kuo
0bcb3147f6 Deprecated -t for --template to make it --tty 2015-08-24 02:16:01 -07:00
Marcin Wielgus
66309325f8 Merge pull request #13015 from feihujiang/kubectlAnnotationAcceptFileNameParam
Kubectl annotate command accepts a filename param
2015-08-24 10:57:30 +02:00
feihujiang
943c57ff4e Allow delete multiple resources with the same name 2015-08-24 15:14:01 +08:00
hurf
ddf090d824 Change default output of 'label' command
Using simple, human understandable output instead of the form of
'kubectl get' command.
2015-08-23 18:27:48 +08:00
hurf
36987e9dce Move formatLabels function to labels package
As the TODO above the function instructed, move formatLables
function to labels package.
2015-08-23 18:27:48 +08:00
Brendan Burns
5d664892f2 Add a storage implementation for thirdpartyresources. 2015-08-21 17:21:40 -07:00
Zach Loafman
5ca0ca3d3f Merge pull request #9787 from feihujiang/acceptErrorLikeGoPath
Make a change to visitor to allow it to accept an error, like Go's pa…
2015-08-21 15:17:58 -07:00
feihujiang
7291bde309 Kubectl annotate command accepts a filename param 2015-08-21 15:08:29 +08:00
k8s-merge-robot
f3c566fa46 Merge pull request #13011 from smarterclayton/flexible_run
Auto commit by PR queue bot
2015-08-20 22:21:38 -07:00
k8s-merge-robot
44c76d5319 Merge pull request #12957 from smarterclayton/handle_terminating_pods
Auto commit by PR queue bot
2015-08-20 21:47:00 -07:00
Clayton Coleman
32aebc42cc Run should be flexible to type
OpenShift would like to use its own types as generator arguments
2015-08-20 22:35:28 -04:00
Abhishek Shah
b6b8e99393 External IPs support. 2015-08-20 16:10:01 -07:00
Eric Paris
7162baa4b8 Drop some of our flag stuff which isn't needed 2015-08-20 15:01:36 -07:00
Eric Paris
bcf912667b Use pflag functions instead of ours. 2015-08-20 15:00:55 -07:00
Saad Ali
489e75e073 Merge pull request #12202 from daizuozhuo/kubectl
add jsonpath to kubectl
2015-08-20 14:31:45 -07:00
Clayton Coleman
2aaf8bddc2 Update controllers and client to handle terminating pods 2015-08-20 11:04:39 -04:00
Clayton Coleman
02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04:00
Wojciech Tyczynski
bf306d6598 Merge pull request #12622 from JanetKuo/kubectl-describe-rc-pod-volume
Describe volumes in rc and pod
2015-08-20 16:47:30 +02:00
Wojciech Tyczynski
44fa48e5af Merge pull request #12635 from hurf/null_age
fix AGE error when resource has no creationTimeStamp
2015-08-20 13:09:41 +02:00
feihujiang
29dc7f6ec2 Make a change to visitor to allow it to accept an error, like Go's path walker 2015-08-20 10:57:28 +08:00
Dai Zuozhuo
85972c44a4 jsonpath user guide docs 2015-08-20 09:11:04 +08:00
Dai Zuozhuo
b61a905b19 add jsonpath to kubectl 2015-08-20 08:57:24 +08:00
Saad Ali
49a569a457 Merge pull request #12675 from pweil-/dont-swallow-errors
don't swallow bad request errors
2015-08-19 17:01:51 -07:00
Saad Ali
14eadcccac Merge pull request #12521 from feihujiang/kubectlScaleAcceptFileNameParam
Kubectl scale command accepts a filename param
2015-08-19 15:00:26 -07:00
Saad Ali
d42864b0ad Merge pull request #12112 from JanetKuo/update-kubectl-get-pods-running
Hide terminated pods in 'kubectl' Printer by default
2015-08-19 12:51:18 -07:00
Piotr Szczesniak
86e0c386d7 Merge pull request #12875 from uluyol/fix-exp-client
Create an experimental client cache.
2015-08-19 15:02:07 +02:00
hurf
c20ed0344a Enhance shortHumanDuration to handle more situation
Allow 2 seconds deviation of current time. For time more than 2
seconds from current time, output as '<invalid>'.
2015-08-19 16:34:15 +08:00
hurf
501594f8c7 fix AGE error when resource has no creationTimeStamp
If the resource doesn't contain creationTimeStamp, report AGE as
unknown. This usually happens when the resouces is created locally
or is not accually created at server side.
2015-08-19 16:08:36 +08:00
Robert Bailey
08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Muhammed Uluyol
7c58f94edc Create an experimental client cache.
Previously, we would initialize the experimental client at factory creation
time. This is problematic because the clientConfig loader has values populated
from the command-line flag parsing, and these are not populated until after
Factory creation. Introduce an ExperimentalClientCache to create (and reuse)
ExperimentalClients.
2015-08-18 14:25:38 -07:00
Janet Kuo
44a7a52a94 Hide failed/succeeded pods in 'kubectl get pods' by default 2015-08-18 13:47:19 -07:00
Robert Bailey
5000252e46 Merge pull request #12669 from deads2k/tolerate-missing-template-flag
tolerate output without template file
2015-08-18 11:49:53 -07:00
Robert Bailey
6e94e44d9c Merge pull request #12860 from nak3/exec-help
Modify kubectl exec help to set -c CONTAINER as optional
2015-08-18 11:48:26 -07:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Kenjiro Nakayama
c50d7dd1d5 Modify kubectl exec help to set -c CONTAINER as optional 2015-08-18 23:14:24 +09:00
Clayton Coleman
89f1f3b1b8 Alter graceful deletion to not use TTL
Avoid TTL by deleting pods immediately when they aren't
scheduled, and letting the Kubelet delete them otherwise.

Ensure the Kubelet uses pod.Spec.TerminationGracePeriodSeconds
when no pod.DeletionGracePeriodSeconds is available.
2015-08-18 09:08:43 -04:00
deads2k
969d526ca5 tolerate output without template file 2015-08-18 08:58:04 -04:00
Clayton Coleman
b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Robert Bailey
17c005bb6a Merge pull request #12730 from eparis/bash-completions-delete-label
bashcompletions: suggest resources to delete in kubectl delete
2015-08-17 13:52:53 -07:00
Janet Kuo
bff0cab7ce Describe volumes in rc and pod 2015-08-17 13:42:50 -07:00
Brendan Burns
eed655a6e6 Merge pull request #12511 from feihujiang/kubectlGetAcceptFileNameParam
Kubectl get command accepts a filename param
2015-08-14 14:21:56 -07:00
Eric Paris
9b2ac7538d bashcompletions: suggest resources to delete in kubectl delete
Before this patch if you type `kubectl delete [tab][tab]` you would get
nothing.  `kubectl delete pod [tab][tab]` would show the list of pods.
This patch causes `kubectl delete [tab][tab]` to show the list of
resources like pod, service, podtemplate, serviceaccount, etc
2015-08-14 10:35:26 -04:00
Jerzy Szczepkowski
f29d52114b Merge pull request #12326 from feihujiang/kubectlLabelAcceptFileNameParam
Kubectl label command accepts a filename param
2015-08-14 12:38:37 +02:00
Brendan Burns
22a2a76ab8 Merge pull request #12571 from brendandburns/kubectl2
Auto commit by PR queue bot
2015-08-13 13:56:14 -07:00
Paul Weil
f1d0835235 don't swallow bad request errors 2015-08-13 14:31:56 -04:00
Brendan Burns
586931fe16 Add optional arguments to kubectl run ... 2015-08-13 09:41:51 -07:00
feihujiang
1e10a7cc59 Kubectl scale command accepts a filename param 2015-08-13 14:26:25 +08:00
feihujiang
18a1400928 Kubectl get command accepts a filename param 2015-08-13 14:12:29 +08:00
feihujiang
0110f3176b Kubectl patch command accepts a filename param 2015-08-13 11:13:31 +08:00
feihujiang
4b9afc516e Kubectl label command accepts a filename param 2015-08-13 10:21:38 +08:00
CJ Cullen
a6148e79c3 Merge pull request #12610 from mikedanese/rewrite-kubectl
rewrite kubectl command references to GoogleCloudPlatform
2015-08-12 17:17:23 -07:00
Brendan Burns
99b8df1812 Add field based sorting to the kubectl command line. 2015-08-12 16:51:36 -07:00
Mike Danese
fe0e758d4d rewrite kubectl command references to GoogleCloudPlatform 2015-08-12 14:52:13 -07:00
CJ Cullen
59da05efdf Merge pull request #12405 from uluyol/kubectlexp
Add experimental api support to kubectl
2015-08-12 14:24:56 -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
markturansky
f37113aa25 Improved CLI for PVClaims 2015-08-12 11:31:54 -04:00
feihujiang
c0b2098844 Kubectl expose command accepts a filename param 2015-08-12 16:16:37 +08:00
hurf
1d1f1fd97c Synchronize help message between describe and get
small nits, change 'resources' to 'resource types'
2015-08-12 15:27:11 +08:00