Commit Graph

192 Commits (0e8d51522586a5babaf96df3a185a5ed1d0967c5)

Author SHA1 Message Date
Fabiano Franz 717896eae3 Fixes get --show-all 2015-12-17 18:35:54 -02:00
deads2k 41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05:00
Chao Xu 5ba4f836f8 some small fix 2015-12-15 12:00:48 -08:00
deads2k d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
deads2k 519b4e80d1 update NewObject for groupversionkind 2015-12-09 08:13:15 -05:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
deads2k f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -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 8679925847 update RESTMapping API to be properly typed 2015-11-25 14:02:37 -05:00
deads2k 5c4fb5bcbe make RESTMapper.KindFor 2015-11-25 14:02:37 -05:00
deads2k 5077e9b644 make register.GroupVersion use GroupVersion 2015-11-24 09:45:36 -05:00
feihujiang ad79fa6e84 Move list functions from runtime to meta package 2015-11-20 09:20:55 +08:00
deads2k 303bcad398 use groupversion in RESTMapping 2015-11-16 09:22:11 -05:00
Kris eacf65ddce Renaming HTTPClientFunc to CreateHTTPClient 2015-11-11 11:54:58 -08:00
Kris 4a4d195419 Exposing http.Client for configurable timeouts 2015-11-10 13:40:51 -08:00
k8s-merge-robot a9534bfd33 Merge pull request #16441 from liggitt/helper_codec
Auto commit by PR queue bot
2015-10-30 11:29:17 -07:00
Fabiano Franz d9161cb3b5 stdin is not a valid file extension for bash completions 2015-10-29 00:00:34 -02:00
Jordan Liggitt b58e62e7d4 Pass runtime.Object to Helper.Create/Replace 2015-10-28 12:43:21 -04:00
Clayton Coleman be868e934c Revert resource.Builder changes from 57388f9
57388f9f94
2015-10-21 16:23:33 -04:00
k8s-merge-robot 77207d75e1 Merge pull request #15667 from JanetKuo/kubectl-watch-list
Auto commit by PR queue bot
2015-10-19 06:28:35 -07:00
eulerzgy f8f9afb874 alias local packagename for pkg/util/errors 2015-10-18 09:37:46 +08:00
Janet Kuo 33b9235312 Better error handling for watching a list of resources specified in a file 2015-10-14 16:38:03 -07:00
Chao Xu fe7b85f6ea run goimports 2015-10-12 13:33:13 -07:00
Chao Xu 8654227c08 run grep-sed 2015-10-12 13:33:13 -07:00
Chao Xu 58ed8fd6fe run goimports 2015-10-12 13:33:13 -07:00
Chao Xu 654ceb6e5a run grep-sed 2015-10-12 13:33:13 -07:00
Chao Xu 50a2c4c643 grep-sed 2015-10-12 13:31:45 -07:00
hurf e1b88c6942 Integrate convertion tool to kubectl
Added 'convert' subcommand to kubectl to convert config files
between different API versions.
2015-10-09 10:15:30 +08:00
k8s-merge-robot b0d748efb0 Merge pull request #14461 from JanetKuo/kubectl-api-group-cmd
Auto commit by PR queue bot
2015-10-07 07:29:10 -07:00
Janet Kuo 57388f9f94 Support kubectl group/resource name 2015-10-06 13:12:32 -07:00
Paul Morie 227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Kris f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
feihujiang ba38a8764b Remove useless codes about minion 2015-09-16 14:22:53 +08:00
Chao Xu ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Chao Xu 64bf839e9f refactor tests to use testapi rather than latest directly 2015-09-11 17:32:23 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -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
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Jeff Lowdermilk cb65cfa746 Print recognized file extensions in resource builder error 2015-09-03 11:01:13 -07: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
Janet Kuo 5823ef771b Make --validate default on and shows how to turn if off 2015-08-25 03:18:32 -07: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 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
hurf 5bec41d0b6 Fix docstring for InfoForObejct func 2015-08-24 21:46:49 +08:00
feihujiang 943c57ff4e Allow delete multiple resources with the same name 2015-08-24 15:14:01 +08: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
Clayton Coleman 02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04: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
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 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
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
Janet Kuo 44a7a52a94 Hide failed/succeeded pods in 'kubectl get pods' by default 2015-08-18 13:47:19 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Paul Weil f1d0835235 don't swallow bad request errors 2015-08-13 14:31:56 -04:00
feihujiang 4b9afc516e Kubectl label command accepts a filename param 2015-08-13 10:21:38 +08:00
Mike Danese 8326697055 rewrite all links to prs to k8s links 2015-08-05 21:11:11 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
feihujiang 4553e410d3 Remove the duplicate source (filename) in error message 2015-07-31 10:20:45 +08:00
Mike Danese 4c52257be3 Merge pull request #11571 from kargakis/handle-aliases-in-comma-sep-args
Handle aliases in comma-separated args
2015-07-24 13:08:28 -07:00
Mike Danese 52282b1a36 Merge pull request #11300 from mwielgus/kubectl_replace_tempfile
Dump stdin to a temporary file in kubectl replace --force
2015-07-24 11:23:25 -07:00
Marcin Wielgus 866bd7b4e5 Dump stdin to a temporary file in kubectl replace --force 2015-07-23 15:22:23 +02:00
kargakis 4fcb4b7f8d Handle aliases in comma-separated args 2015-07-23 09:32:33 +02:00
Jeff Lowdermilk 8d4167e7f6 kubectl resource builder: don't check extension for single files
`kubectl create -f filename` doesn't need to check the extension
of filename. This fixes that behavior.
2015-07-07 13:48:29 -07:00
Kris Rousey ffa764d60b Unify command line namespace resolution
This change allows the namespace in kubeconfig to be overridden by
specifying the namespace in the spec file. If namespace is explicitly
provided in the command line flags and the spec file has a different
namespace, this will cause an error.
2015-07-01 12:59:17 -07:00
Alex Robinson 764d34d363 Merge pull request #10468 from caesarxuchao/add-cmd-replace
Add command "kubectl replace"
2015-06-29 16:06:33 -07:00
Alex Robinson 68bbf6c129 Merge pull request #10447 from feihujiang/helpfulErrorForUnsupportedVersion
Provide more helpful error when using unsupported api version
2015-06-29 15:00:58 -07:00
Anastasis Andronidis 697e07f864 Correctly parse multiple resources from files
Refactored how files, directories and stdin are handled. Every file must pass
through the FileVisitor and then streamed through StreamVisitor. FileVisitor
takes care of opening/closing files and StreamVisitor is parsing multiple
resources.
2015-06-29 23:11:46 +02:00
Chao Xu 9b3d42c090 Add command "kubectl replace". "kubectl update" is still supported as an alias.
"kubectl replace --patch" is NOT supported. It's moved to "kubectl patch" as a separate command in another commit.
2015-06-29 12:14:24 -07:00
feihujiang 878a72228f Provide more helpful error when using unsupported api version 2015-06-29 15:32:54 +08:00
Mike Danese 0c8f71aa0b make rolling update check if the replication controller has been defaulted 2015-06-25 12:29:21 -07:00
Maxwell Forbes d90895adfd Merge pull request #10221 from feihujiang/addSourceForErrorFromServerMessage
Add source in “error from server” message when using kubectl
2015-06-25 10:56:46 -07:00
feihujiang b41b53122a Add source in “error from server” message when using kubectl 2015-06-25 14:20:09 +08:00
Chao Xu 59b654c996 fix tests for 22f1b07858 2015-06-22 17:10:09 -07:00
Satnam Singh a3ffb05004 Merge pull request #9972 from smarterclayton/split_versioned_object
Split AsVersionedObjects so it can be reused
2015-06-19 08:04:23 -07:00
Mike Danese 3de11e2fa8 reenable patch serverside using strategic-merge-patch 2015-06-18 12:06:46 -07:00
Clayton Coleman 1707c5d28c Split AsVersionedObjects so it can be reused 2015-06-17 16:33:53 -04:00
krousey 687e866d80 Merge pull request #9418 from mikedanese/kubectl-version-err
kubectl should error if versionless yaml is passed to resource builder
2015-06-09 11:55:48 -07:00
krousey ff474e5d7e Merge pull request #9376 from feihujiang/createValidateCrash
kubetcl create --validate crashes when no apiVersion or kind is provided
2015-06-09 09:59:42 -07:00
feihujiang 37abe11f8a kubetcl create --validate crashes when no apiVersion or kind is provided 2015-06-09 10:38:43 +08:00
Mike Danese 627b2f9a24 kubectl should use UnstructuredJSONScheme to decode version and kind, as it throws errors if either are missing] 2015-06-08 11:51:37 -07:00
Mike Danese 7b7d8ccb77 print various errors which is useful when ContinueOnError is set on the Resource struct 2015-06-06 15:47:01 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Masahiro Sano 8ce64ec69e add --all-namespaces flag to request across all namespaces 2015-05-22 23:25:12 +09:00
Clayton Coleman 0a28e50511 Revert "Revert "Enhance error message from kubectl when 'kind' is empty"" 2015-05-20 17:32:23 -04:00
Clayton Coleman 633c56f8c0 Revert "Enhance error message from kubectl when 'kind' is empty" 2015-05-20 10:32:56 -04:00
feihujiang 6c8a1cdb17 Enhance error message from kubectl when 'kind' is empty
Enhance error message from kubectl when 'kind' is empty

Enhance error message
2015-05-20 15:23:47 +08:00
Jeff Lowdermilk 46bd6f298a Merge pull request #8237 from smarterclayton/continue_on_error
Make ContinueOnError actually work
2015-05-15 12:57:29 -07:00
Clayton Coleman a47716e66d Make ContinueOnError actually work
In resource.Builder ContinueOnError() should actually do so.

Reorganized util.CheckErr() to make it display bulk errors more
effectively and be more reusable. Clarified that CheckErr is not
specific to kubectl in Godoc. Changed the "Error: " prefix to
"error: " to more closely match Unix conventions.
2015-05-15 14:26:14 -04:00
Brendan Burns ea3852ec69 Fix a bug where IgnoreErrors was inverted.
Also make an error message a little more verbose.
2015-05-13 16:26:01 +01:00
Clayton Coleman 964bc8afda Verify namespace is not set on root objects 2015-05-11 15:51:04 -04:00
Brendan Burns 7f11585972 Fix validation by moving it into the resource builder.
Also always print an error for unknown field.
2015-05-08 14:00:33 -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
Clayton Coleman 12ba4e2452 Do not automatically decode runtime.RawExtension
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.

Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Brian Grant 38ea531487 Merge pull request #7194 from nikhiljindal/example
Updating the guestbook example to v1beta3
2015-04-23 15:26:47 -07:00
nikhiljindal 1e323d77bc Updating the guestbook example to v1beta3 2015-04-23 14:34:36 -07:00
Mark Maglana 4927d70dd0 Add .yml to the list of recognized file extensions 2015-04-23 08:57:45 -07:00
Clayton Coleman 1bc4912f51 Merge pull request #7030 from liggitt/skip_fetch_delete
Skip fetching from server when deleting a named resource
2015-04-20 19:38:10 -04:00