Commit Graph

446 Commits (18b896645cc4f5dc2e7212726b314ec9ad6b6db1)

Author SHA1 Message Date
Deyuan Deng 241f3d702b Exclude service itself when checking conflict. 2014-11-15 10:40:40 -05:00
Tim Hockin e987f11838 Merge pull request #2319 from brendandburns/external
Externalized services v2
2014-11-14 21:01:19 -08:00
Deyuan Deng 29a56c4f18 Use Service.Name for validation error. 2014-11-14 19:36:34 -05:00
Daniel Smith 9430bb38b8 Merge pull request #2282 from bgrant0607/docgen
Automatic API generation via go-restful
2014-11-14 13:12:25 -08:00
Brendan Burns 2aa52d043b Add external services v2 support. 2014-11-14 11:32:54 -08:00
Brendan Burns c25ef89b24 Merge pull request #2367 from lavalamp/fix3
Yet more non-controversial fixes from #2277
2014-11-14 10:25:04 -08:00
Daniel Smith de75e5a9bb Fix server-side namespace handling for events; add validation 2014-11-14 09:43:28 -08:00
Brian Grant 7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Dawn Chen f47f1da3d6 Merge pull request #2345 from yugui/lint/api
Fixes golint errors in pkg/api.
2014-11-13 23:21:42 -08:00
Yuki Yugui Sonoda 864bfb65da Fixes golint errors in pkg/api. 2014-11-14 13:14:23 +09:00
Dawn Chen d004939b74 Merge pull request #2362 from erictune/nousage
Remove todos about adding usage to Pods.
2014-11-13 17:13:34 -08:00
Eric Tune b195d982cd Remove todos about addin usage to Pods.
Usage in Pods would be quite noisy when watching pods.
People should get usage from heapster, or from
some other object TBD.
2014-11-13 16:11:10 -08:00
Dawn Chen 81107c3e98 Change the default Pull policy to PullIfNotPresent. 2014-11-13 15:23:44 -08:00
Dawn Chen ff68b75401 Merge pull request #2333 from derekwaynecarr/validate_uid
Set uid during object create
2014-11-13 13:56:25 -08:00
derekwaynecarr 15701ff403 Set uid during object create 2014-11-13 15:25:49 -05:00
bgrant0607 7cab32b41d Merge pull request #2185 from brendandburns/history
Add a human readable message to pod state.
2014-11-13 10:52:04 -08:00
Daniel Smith 178d0af795 Fix watch for events; add test for interface implementation so it won't break again. 2014-11-12 15:22:08 -08:00
Daniel Smith 0348a67413 Merge pull request #2195 from smarterclayton/prepare_pod_template_v1beta3
Allow an internal pod template reference or object
2014-11-12 10:55:08 -08:00
derekwaynecarr b326cbbe0c Centralize minion validation 2014-11-12 12:38:15 -05:00
Clayton Coleman 94c873e7a4 Remaining refactor for PodTemplateSpec and fixing test cases 2014-11-11 17:03:20 -05:00
Brendan Burns 3fdbb10255 Add a human readable message to pod state. 2014-11-10 21:05:27 -08:00
Dawn Chen 8ffbced280 Introduce terminationMessagePath to Container, and update conversion code
to assign the default path.

Move default setting for terminationMessagePath to conversion
from validation. Addressed other comments.
2014-11-10 10:55:56 -08:00
Clayton Coleman 72bf12c86d Update the validation logic to test PodTemplateSpec 2014-11-10 11:33:51 -05:00
Clayton Coleman a68a493e4b Alter the error message when an error list is put in an error list 2014-11-10 11:33:51 -05:00
Clayton Coleman 74c7914f7e Conversion functions to support PodTemplateSpec 2014-11-10 11:33:31 -05:00
Clayton Coleman e3be1e9e14 Changes to core types for introducing PodTemplateSpec 2014-11-10 11:33:31 -05:00
Dawn Chen 5342bb4306 Introduce application termination message to ContainerStatus 2014-11-07 09:32:39 -08:00
Sam Ghods cbd13b599d Fix two compilation errors when running go build ./... 2014-11-06 12:55:27 -08:00
Clayton Coleman 4acb8e5eaf Merge pull request #2189 from lavalamp/fix
Add self links to objects sent down the watch channel.
2014-11-06 12:57:07 -05:00
derekwaynecarr 56b6273dfb Fix json serialization consistency 2014-11-06 10:24:48 -05:00
Daniel Smith 4196780eda Add self links to objects sent down the watch channel. 2014-11-05 17:22:18 -08:00
Daniel Smith 25bd151d86 Make fieldPath part of getting a reference rather than part of making an event. 2014-11-05 15:09:14 -08:00
Daniel Smith ecebe958d2 Allow ObjectReferences to be passed to Eventf
... in place of the object they reference.
2014-11-05 15:07:40 -08:00
markturansky 119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
Brian Grant 535785e3b9 Update api/validation service validation with service fields moved by #2086 2014-11-05 06:52:06 +00:00
bgrant0607 fc0dab630c Merge pull request #2086 from markturansky/v1beta3_refactor
Refactor internal API for Services to match v1beta3
2014-11-04 21:48:02 -08:00
bgrant0607 c7ff31004b Merge pull request #2094 from brendandburns/svc
Add some validation for externalized service ports.
2014-11-04 13:04:56 -08:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Clayton Coleman f0c23d68f7 Add runtime.ObjectConvertor to RESTMapper 2014-11-04 10:38:00 -05:00
Clayton Coleman dc862ae463 Return the Kind of the object with the RESTMapper 2014-11-04 10:34:47 -05:00
Daniel Smith 7c2b7b55e7 Merge pull request #2059 from smarterclayton/rest_mapping
Define a mapping between REST resource name and kind/apiVersion
2014-11-03 15:08:21 -08:00
Clayton Coleman 191c1b975c Define a mapping between REST resource name and kind/apiVersion
Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md
2014-11-03 17:09:06 -05:00
Brendan Burns f556f2f82f Add some validation for externalized service ports. 2014-11-03 13:36:34 -08:00
Dawn Chen 81785d8cde Merge pull request #2124 from brendandburns/fix
Make endpoints return 400 instead of 500
2014-11-03 08:38:34 -08:00
markturansky 2260b241dc Removed 'Metadata' from all types 2014-11-03 08:47:22 -05:00
Brendan Burns 32a04e48fd Make endpoints return 400 instead of 500 2014-11-02 20:08:06 -08:00
Clayton Coleman 8a2d778248 Merge pull request #2066 from lavalamp/eventing2
Event fixes
2014-10-30 14:19:19 -04:00
Daniel Smith a7cc25f7ff Add namespaces to event creation path. 2014-10-29 18:03:14 -07:00
Clayton Coleman 2c10dd85c3 Merge pull request #2047 from smarterclayton/make_request_testable
Make client.Request/RESTClient more testable and fakeable
2014-10-29 19:33:36 -04:00
Daniel Smith ab9346d107 Use ID instead of Name in v1beta1 & 2 2014-10-29 15:13:44 -07:00
Clayton Coleman 71fecef6f6 Add test coverage and fix a few minor problems 2014-10-29 14:08:37 -04:00
Daniel Smith 94e736e286 Merge pull request #2009 from smarterclayton/unify_meta
Unify Accessor for ObjectMeta/TypeMeta/ListMeta
2014-10-29 09:58:46 -07:00
Clayton Coleman eac933eb44 Make client.Request more testable, break coupling with RESTClient
Moves polling to a function provided by the RESTClient, not innate
to Request. Moves doRequest from RESTClient to Request for clarity.
2014-10-28 23:00:24 -04:00
Dawn Chen f6db096741 Merge pull request #2022 from brendandburns/gc
Add container garbage collection.
2014-10-28 13:37:16 -07:00
Daniel Smith 55c9c06b81 Merge pull request #2001 from VojtechVitek/fix_scheme_panic
Fix reflect panic in runtime/conversion
2014-10-28 13:30:40 -07:00
Brendan Burns 51bf451932 Add container garbage collection. 2014-10-28 12:52:06 -07:00
Vojtech Vitek (V-Teq) 90809c270d Use conversion.EnforcePtr() where appropriate
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:09 +01:00
Tim Hockin 9a617344bf Merge pull request #1945 from brendandburns/tests
Add support for git volumes.
2014-10-27 16:55:37 -07:00
Brendan Burns b59e49fa13 Add support for git volumes. 2014-10-27 16:35:52 -07:00
Tim Hockin bb5ca0f91b Respect a requested PortalIP if possible 2014-10-27 14:03:52 -07:00
Clayton Coleman 66ace4c270 Begin to unify ResourceVersioner and SelfLinker
Create a new MetadataAccessor interface that combines both
and use it where previously latest.ResourceVersioner and SelfLinker
were being used.

Adds Namespace to the get/set interface. Adds TODO about future
fast path for metadata (as per thockin's comment)
2014-10-27 16:00:55 -04:00
Tim Hockin 37ffb41b81 Merge pull request #1830 from markturansky/label_validation
add RFC952 validation to labels
2014-10-27 09:54:18 -07:00
Brendan Burns 5d4d60783d Add requirements based scheduling. 2014-10-25 22:08:00 -07:00
Brendan Burns 87c77e5ba7 Start adding git volumes. 2014-10-24 20:44:08 -07:00
markturansky e2365b1f96 add RFC952 label validation 2014-10-24 16:01:52 -04:00
Tim Hockin d6effe3c6d Rename api ErrorList for clarity 2014-10-24 09:43:14 -07:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 2475eb06cb Remove use of embedded TypeMeta accessor 2014-10-24 11:22:20 -04:00
Clayton Coleman 0f011a055f Implement conversions for v1beta1/2 to internal ObjectMeta 2014-10-24 11:22:20 -04:00
Clayton Coleman 09800643e2 Change validation now that namespace is on ObjectMeta 2014-10-24 11:22:20 -04:00
Clayton Coleman 55163a7df1 Split TypeMeta into ObjectMeta and TypeMeta 2014-10-24 11:22:20 -04:00
Clayton Coleman 3df1c2f29d Use meta.Interface and meta.Accessor 2014-10-23 18:01:25 -04:00
Clayton Coleman e5c924585c Add support for ObjectMeta and ListMeta lookup 2014-10-22 23:56:49 -04:00
Clayton Coleman 35eaf90255 Add UID to MetaAccessor and Ref 2014-10-22 22:59:15 -04:00
Clayton Coleman 1ccb86c760 Rename methods in api/meta to be cleaner 2014-10-22 22:59:12 -04:00
Clayton Coleman 64d98cba73 Move typemeta.go to api/meta/meta.go
Prepares for the meta object to front multiple underlying types
when TypeMeta and ObjectMeta is split in internal and v1beta3, but
combined in v1beta1 and v1beta2
2014-10-22 22:28:06 -04:00
Clayton Coleman 91d9a90e4e Replace use of "id" in strings with "name" 2014-10-22 15:59:12 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith ad1212b9af Add client time to events 2014-10-22 11:12:17 -07:00
Daniel Smith 0c58ee98c8 Error instead of crash on GetRef of nil object 2014-10-17 10:49:43 -07:00
Clayton Coleman 6ae611aedd Write BoundPods to etcd instead of ContainerManifestList
Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
2014-10-16 19:29:08 -04:00
Clayton Coleman 892942af8f Read BoundPods from etcd instead of ContainerManifestList
There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
2014-10-16 19:29:08 -04:00
derekwaynecarr 085ca40291 Enforce unique constraint at namespace boundary in etcd, make client and server namespace aware 2014-10-16 13:02:52 -04:00
Tim Hockin e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -07:00
Eric Tune 6f577aa321 Merge pull request #1789 from lavalamp/eventing4
Add event creation library and implement in scheduler.
2014-10-15 15:55:26 -07:00
Daniel Smith 2987747a0f Merge pull request #1794 from brendandburns/e2e
Add a pod update e2e test in go. Also adjust validation logic a little.
2014-10-15 11:59:30 -07:00
Daniel Smith d4c750a878 Fix vet-go.sh and some things it complained about 2014-10-15 11:56:19 -07:00
Daniel Smith 10214457b7 Make scheduler emit events 2014-10-15 11:42:05 -07:00
Brendan Burns 8d38f8890e Add an e2e test in go. Also adjust validation logic a little to make it more reasonable.
Not integrated into existing e2e yet.
2014-10-14 16:43:00 -07:00
Eric Tune bb5a17488f Use Forbidden valdiation error when no capability 2014-10-14 16:14:28 -07:00
Daniel Smith 841e9e87ff Merge pull request #1713 from brendandburns/update
Add update to the pod etcd handler.
2014-10-13 17:42:30 -07:00
Brendan Burns 4380637be7 Add update to the pod etcd handler. 2014-10-13 17:27:31 -07:00
Daniel Smith d34914517f Shorten 'CodecForVersionOrDie' name, add 'ResourceVersioner' to testapi 2014-10-13 14:58:06 -07:00
Brendan Burns 695fbee343 Merge pull request #1742 from dchen1107/termination
Set EmptyDir when VolumeSource is absent.
2014-10-10 16:27:26 -07:00
Dawn Chen c511b7a0ce Fix #1683 2014-10-10 15:34:48 -07:00
Dawn Chen 5f97413dd5 Merge pull request #1663 from smarterclayton/separate_pod_state_for_health_check
Refactor HealthCheck to take podUUID as its own argument
2014-10-10 09:11:59 -07:00
Tim Hockin d84816aaec Merge pull request #1709 from erictune/move_line
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -07:00
Eric Tune 800284164a Fix format specifiers in Printf-type functions. 2014-10-09 17:06:32 -07:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
Clayton Coleman eea77a1449 Backport the BoundPods type to v1beta1/2/internal 2014-10-09 16:39:55 -04:00
erictune aa30423dc9 Merge pull request #1337 from brendandburns/Sarsate-pd-support
Taking over PD support from sarsate
2014-10-09 09:16:04 -07:00
Danny Jones 4ec25f3b81 Adds support for attaching GCEPersitentDisks
Adds GCEPersistentDisk volume struct
Adds gce-utils to attach disk to kubelet's VM.
Updates config to give compute-rw to every minion.
Adds GCEPersistentDisk to API
Adds ability to mount attached disks
Generalizes PD and adds tests.
PD now uses an pluggable API interface.
Unit Tests more cleanly separates TearDown and SetUp
Modify boilerplate hook to omit build tags
Adds Mounter interface; mount is now built by OS
TearDown() for PD now detaches disk on final refcount
Un-generalized PD; GCE calls moved to cloudprovider

Address comments.
2014-10-08 20:03:59 -07:00
Daniel Smith af5714da12 Fix v1beta2 types having been copied incorrectly. 2014-10-08 14:15:50 -07:00
Clayton Coleman 094bc3796a Update ObjectReference to use ResourceVersion string everywhere
Breaks backwards compat for anyone using older versions
2014-10-08 15:57:38 -04:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Daniel Smith 7ffe791486 fix error message in validation test 2014-10-07 13:54:41 -07:00
Daniel Smith 3a62089790 Fix malformed namespace json tag 2014-10-07 13:52:51 -07:00
Clayton Coleman 0a4d4b43f6 Move IsAnAPIObject() declarations to register.go
* Add Namespace, UID, Annotations to internal/v1beta1/v1beta2
* Update v1beta3 with minor consistency tweaks
2014-10-07 14:09:01 -04:00
Daniel Smith 0212c9b29a Merge pull request #1623 from smarterclayton/rename_jsonbase
Rename JSONBase -> TypeMeta in preparation for v1beta3
2014-10-07 10:50:28 -07:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Clayton Coleman 363d6554ae Move Policy test helpers into their own file
Since types.go should always be equal to latest API types.go, this
makes future cut and paste refactors easier.
2014-10-07 10:24:40 -04:00
Daniel Smith 6449b30ca4 Merge pull request #1593 from thockin/utilerrlist
Move ErrorList to util
2014-10-06 16:59:34 -07:00
Brendan Burns fca26ccc65 Merge pull request #1569 from dchen1107/termination
Initial support to propagating the termination reasons and image failures
2014-10-06 16:56:23 -07:00
Daniel Smith e26bdd0721 Merge pull request #1591 from smarterclayton/simple_test
Add a Log method on Scheme for better debugging
2014-10-06 15:39:51 -07:00
Dawn Chen 4fdfeaa30e Addressed comments. 2014-10-06 14:41:20 -07:00
Dawn Chen a86d496f9a Fix e2e tests. 2014-10-06 13:37:24 -07:00
Dawn Chen 9861eb7c8e Initial support of propogating the termination reasons and image failure
to apiserver. Deprecated docker.Container from API completely.

Conflicts:
	pkg/api/types.go
	pkg/kubelet/kubelet.go
2014-10-06 13:37:22 -07:00
Tim Hockin 7e83211840 Move ErrorList to util 2014-10-06 12:12:35 -07:00
Clayton Coleman 305db35422 Add a Log method on Scheme for better debugging 2014-10-05 17:17:25 -04:00
Meir Fischer 073940e66f minor comment change for grammar/consistency across v1beta* packages 2014-10-05 01:22:05 -04:00
Sam Ghods 3de1317c15 Remove JSONBase reference from v1beta3/types.go 2014-10-03 19:01:26 -07:00
Clayton Coleman 0ff77ffcb3 Some field names in validation.go not consistent
Fields are (for now) JavaScript style field accessors
2014-10-02 23:43:30 -04:00
Tim Hockin 1dda3072a4 Merge pull request #1525 from erictune/rename_dir
Directory renamed to Dir to match json property
2014-10-02 11:28:27 -07:00
erictune 883bb60b3a Merge pull request #1500 from smarterclayton/refactor_client_again
Refactor the client (again) to better support auth
2014-10-01 14:04:57 -07:00
Eric Tune 9c0769422d Directory renamed to Dir to match json property 2014-10-01 13:35:21 -07:00
Tim Hockin 710832b8b6 Merge pull request #1474 from brendandburns/resource
Add a resource fit predicate.
2014-10-01 13:12:28 -07:00
Tim Hockin db49dc0012 Merge pull request #1458 from brendandburns/dontpull
Add the ability to turn off image pulling.
2014-10-01 12:40:47 -07:00
Brendan Burns 39d03948e7 Add resource fit predicates. 2014-10-01 12:38:09 -07:00
Brendan Burns 4c456015b6 Add the ability to turn off image pulling. 2014-10-01 12:34:22 -07:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00
derekwaynecarr 016d394705 Remove redundant code in validation 2014-10-01 14:29:47 -04:00
derekwaynecarr 6625e58a20 Updates to review comments 2014-10-01 10:57:50 -04:00
derekwaynecarr 0312d80ffa Update test cases to use default context 2014-10-01 10:57:50 -04:00
derekwaynecarr e4ec49ee6b Require namespace on controller, pod, service objects 2014-10-01 10:57:50 -04:00
Tim Hockin 88bf01b008 Merge pull request #1225 from smarterclayton/v1beta3_proposals
Proposal: v1beta3 API overhaul
2014-09-30 16:12:13 -07:00
Dawn Chen e284e14222 Merge pull request #1475 from lavalamp/eventing3
Add GetReference()
2014-09-29 09:18:51 -07:00
Clayton Coleman c0247d92ce Proposal for v1beta3 API
* Separate metadata from objects
* Treat lists differently from resources
* Add UID and Annotations on Metadata
* Introduce BoundPod(s) as distinct from Pod to represent pods
  scheduled onto a host
* Use "spec" instead of "state" and "status" instead of "currentState"
  * Identify current status of objects consistently
  * Use "condition" as the string label for substatus
* All string constants should be PublicGoCapitalized
* Rename Minion -> Node
* Rename ServerOp -> Operation
* Remove ContainerManifest
* Add api-conventions.md document
* Replace PodTemplateSpec in ReplCtrl with ObjectReference
2014-09-29 12:10:36 -04:00
Tim Hockin f2cf958540 Caps for CauseType 2014-09-27 21:48:35 -07:00
Tim Hockin e73de49f81 Caps on StatusReason* 2014-09-27 21:38:51 -07:00
Tim Hockin 523731c509 Capitalize Status.Status 2014-09-27 21:23:51 -07:00
Tim Hockin 1c02af3d16 Kill LivenessProbe.Type 2014-09-27 21:16:30 -07:00
Tim Hockin 04cdf286a4 Make and use api.Protocol type 2014-09-27 20:31:37 -07:00
Daniel Smith 6ac7578699 Add GetReference() 2014-09-26 17:40:07 -07:00
Daniel Smith b972f72248 convert multiple return values into a struct, add SelfLinker 2014-09-26 14:52:16 -07:00
derekwaynecarr ee19ba186d Update to use api.Context 2014-09-26 11:50:34 -04:00
derekwaynecarr 3e685674e7 Add context object to interfaces 2014-09-26 11:50:34 -04:00
Clayton Coleman a5ed10235e Merge pull request #1354 from lavalamp/eventing
Add Event to api types
2014-09-25 16:20:49 -04:00
Daniel Smith 283eaf3931 Add new Event type
* replaces previous Event type, which is too limited.
* Remove writing of old event type.
* Fix serialiazation test to automatically test all types.
2014-09-25 11:31:35 -07:00
Brendan Burns 431caa93df Merge pull request #1335 from dchen1107/exit1
Convert existing kubernetes system to use ContainerStatus, instead of
2014-09-24 21:37:24 -07:00
Daniel Smith bb0cd95a83 fix non-gofmt'd things 2014-09-24 14:27:10 -07:00