Commit Graph

54 Commits

Author SHA1 Message Date
Robert Rati
91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05: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
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
deads2k
518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
guangxuli
010bca6323 if test succ remove the tmp file 2016-09-28 16:52:55 +08:00
bindata-mockuser
e792d4117d Add return code support to kubectl-exec and -run 2016-08-20 15:58:47 +02:00
bindata-mockuser
6dcb0c9130 Rectify kubectl error output 2016-08-20 15:58:10 +02:00
juanvallejo
4b18f52fc9 add unit test for duplicate errors 2016-08-16 13:09:55 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Janet Kuo
4615d1e24c Add more information when throwing errors in discoverying 3rd party resources 2016-06-01 13:18:50 -07:00
Brendan Burns
dac09311b8 Add support for labelling 3rd party objects 2016-05-23 13:13:35 -07:00
Phillip Wittrock
1a3b133077 Delete unused helpers 2016-04-20 13:49:59 -07:00
deads2k
deb4d3ccca type RESTMapper errors to better handle MultiRESTMapper errors 2016-02-11 11:45:05 -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
Tim Hockin
0fecf965b4 Change how one-of blocks are validated
I took a hard look at error output and played until I was happier.  This now
prints JSON for structs in the error, rather than go's format.

Also made the error message easier to read.

Fixed tests.
2015-12-18 09:42:14 -08:00
deads2k
9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
Tim Hockin
7fb8f60735 Shorten names for better reading 2015-12-10 11:48:19 -08:00
Tim Hockin
87a35047dd Move FieldPath and errors to a sub-package
This makes the naming and reading a lot simpler.
2015-12-10 11:48:16 -08:00
deads2k
2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Tim Hockin
e6df0b1a24 Convert validation to use FieldPath
Before this change we have a mish-mash of ways to pass field names around for
error generation.  Sometimes string fieldnames, sometimes .Prefix(), sometimes
neither, often wrong names or not indexed when it should be.

Instead of that mess, this is part one of a couple of commits that will make it
more strongly typed and hopefully encourage correct behavior.  At least you
will have to think about field names, which is better than nothing.

It turned out to be really hard to do this incrementally.
2015-12-03 08:19:44 -08:00
Tim Hockin
ceee678b29 Rename validation 'New' funcs 2015-11-23 10:01:43 -08:00
Tim Hockin
48b49a5cae s/ValidationErrorList/ErrorList/ 2015-11-22 20:13:20 -08:00
Tim Hockin
0ff66da346 Move fielderrors into validation 2015-11-22 20:12:20 -08:00
Paul Morie
227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Clayton Coleman
02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04: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
Clayton Coleman
b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Kris Rousey
565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Chao Xu
18d32751fd improve the error message of update pod 2015-08-02 13:41:53 -07:00
Marcin Wielgus
866bd7b4e5 Dump stdin to a temporary file in kubectl replace --force 2015-07-23 15:22:23 +02:00
nikhiljindal
274792d7bb Stop exposing v1beta3 by default 2015-07-01 14:38:02 -07:00
Anastasis Andronidis
62c766d58d Add tests 2015-06-10 16:09:43 +02:00
Chao Xu
080da97e1c fix a comment 2015-06-04 10:35:10 -07:00
Chao Xu
8885025d25 add v1 tests to tests in kubectl/cmd/* 2015-06-03 13:57:54 -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
Kris
f4e2c738f6 Delete deprecated API versions
pkg/service:

There were a couple of references here just as a reminder to change the
behavior of findPort. As of v1beta3, TargetPort was always defaulted, so
we could remove findDefaultPort and related tests.

pkg/apiserver:

The tests were using versioned API codecs for some of their encoding
tests. Necessary API types had to be written and registered with the
fake versioned codecs.

pkg/kubectl:

Some tests were converted to current versions where it made sense.
2015-05-29 17:17:35 -07:00
Jeff Lowdermilk
90a5b8c845 Disable --patch for kubectl update 2015-05-29 09:31:49 -07:00
Chao Xu
9c1153322e update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go 2015-05-28 14:10:06 -07:00
Justin Santa Barbara
973c2e4819 Add Type to ServiceSpec: ClusterIP or LoadBalancer 2015-05-22 19:14:21 -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
Tim Hockin
186818d787 WIP: Implement multi-port Services 2015-03-30 19:28:11 -07:00
Dawn Chen
34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Brendan Burns
0ad6e5b48c Fix the test by using an even more bogus tld. 2015-03-09 14:31:39 -07:00
Brendan Burns
7c654a3d1b Expand test coverage in master, kubectl/cmd/util, pkg/registry/resourcequota, and api/rest. 2015-03-07 15:24:39 -08:00
Brendan Burns
fb90b56bf6 Embed VolumeSource in v1beta3 and internal. 2015-03-04 02:25:40 -08:00