Commit Graph

58 Commits

Author SHA1 Message Date
Janet Kuo
c1596e6711 Update guestbook examples; replace RC concepts with Deployment 2016-03-30 14:16:52 -07:00
Mike Metral
7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
Avesh Agarwal
ad6dfa0370 Fix kubectl create to create all resources in a url.
https://github.com/kubernetes/kubernetes/issues/18751 .
2016-03-02 18:08:24 -05:00
Clayton Coleman
2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
David Oppenheimer
8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Fabiano Franz
717896eae3 Fixes get --show-all 2015-12-17 18:35:54 -02:00
deads2k
2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05: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
Clayton Coleman
be868e934c Revert resource.Builder changes from 57388f9
57388f9f94
2015-10-21 16:23:33 -04:00
eulerzgy
f8f9afb874 alias local packagename for pkg/util/errors 2015-10-18 09:37:46 +08:00
Chao Xu
50a2c4c643 grep-sed 2015-10-12 13:31:45 -07: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
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01: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
e690f3b3e8 Merge pull request #12900 from feihujiang/deleteMultipleResourcesWithTheSameName
Allow delete multiple resources with the same name
2015-08-24 10:40:41 -07: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
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
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
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07: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
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
Chao Xu
59b654c996 fix tests for 22f1b07858 2015-06-22 17:10:09 -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
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
Clayton Coleman
964bc8afda Verify namespace is not set on root objects 2015-05-11 15:51:04 -04: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
nikhiljindal
1e323d77bc Updating the guestbook example to v1beta3 2015-04-23 14:34:36 -07:00
Jordan Liggitt
feb8ba9c4e Allow resource builder to avoid fetching objects 2015-04-20 15:00:52 -04:00
kargakis
9d056c6bd8 Support setting up aliases for groups of resources
Closes #5278
2015-04-17 16:31:59 +02:00
Daniel Smith
44bc29631e compute query parameter names in the client. 2015-04-06 16:54:26 -07:00
Kris Rousey
6904c4d585 Fixing a lot of string formatting issues with regards to:
* Improper format specifier (e.g. %s for bools or %s for ints)
  * More or less parameters than format specifiers
  * Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
Clayton Coleman
1e496696ca Merge pull request #5903 from smarterclayton/support_resources_by_type_and_name
Allow resource.Builder commands to take arguments by type/name
2015-03-26 14:23:03 -04:00
gmarek
5a11748018 Move Capacity from NodeSpec to NodeStatus 2015-03-26 15:28:48 +01:00
Clayton Coleman
581d7cd789 Allow resource.Builder commands to take arguments by type/name
Will allow xarg behavior to fetch resources across multiple types.
Changes 'create', 'get', 'update', 'stop', and 'delete' to output
<resourceType>/<name>.
2015-03-25 20:39:22 -04:00
Dawn Chen
34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00