Commit Graph

326 Commits (d8aa57872ae6a374923ea7ceb7f97da299dfe32e)

Author SHA1 Message Date
Dan Mace 3d7f5cc642 Backport annotations to PodTemplateSpec
Backport annotation support to v1beta1 and v1beta2 PodTemplateSpec. This
allows ReplicationController users to specify annotations for Pods in
addition to labels.
2015-02-02 15:26:32 -05:00
Clayton Coleman 1588970ec4 Turn 409 into 500 Try Again Later when using generateName
If a client says they want the name to be generated, a 409 is
not appropriate (since they didn't specify a name). Instead, we
should return the next most appropriate error, which is a 5xx
error indicating the request failed but the client *should* try
again.  Since there is no 5xx error that exactly fits this purpose,
use 500 with StatusReasonTryAgainLater set.

This commit does not implement client retry on TryAgainLater, but
clients should retry up to a certain number of times.
2015-02-02 14:46:25 -05:00
Clayton Coleman 5603714df8 Use name generation on pods via replication controllers
The generated name is '<controllerName>-%s', unless controllerName-
would be long enough to cause a validation error.
2015-02-02 14:44:53 -05:00
Clayton Coleman a7c9a12286 Add name generation and normalize common create flows
Adds `ObjectMeta.GenerateName`, an optional string field that defines
name generation behavior if a Name is not provided.

Adds `pkg/api/rest`, which defines the default Kubernetes API pattern
for creation (and will cover update as well). Will allow registries
and REST objects to be merged by moving logic on api out of those places.

Add `pkg/api/rest/resttest`, which will be the test suite that verifies
a RESTStorage object follows the Kubernetes API conventions and begin
reducing our duplicated tests.
2015-02-02 14:44:53 -05:00
Vishnu Kannan 5e36f63f8b Adding ResourceRequirementSpec to v1beta1, v1beta2, and v1beta3 APIs. The old resource
quantities 'CPU' and 'Memory' will be preserved until support for v1beta1 and v1beta2 APIs are
dropped.
Improved resource validation in the process.
2015-02-01 02:19:55 +00:00
Ye Yin 248624fc1f Add docker's add/drop capabilites 2015-01-30 15:09:31 +08:00
nikhiljindal dc92d3c7a2 Cleaning up the operations code in client 2015-01-28 21:04:16 -08:00
Eric Tune bba01c7a54 Merge pull request #3796 from derekwaynecarr/resource_quota
Admission Control: Resource Quota
2015-01-28 13:17:08 -08:00
derekwaynecarr 0ff20c84dd Rebase errors 2015-01-28 15:09:42 -05:00
derekwaynecarr 829fa69527 Introduce a ResourceQuota object 2015-01-28 15:03:19 -05:00
Mike Danese 78f33e950a rename api.LivenessProbe to api.Probe and break out Actions 2015-01-28 11:20:44 -08:00
Clayton Coleman 5117189e03 Merge pull request #3707 from nikhiljindal/preOperations
Removing support for asynchronous server requests
2015-01-28 13:02:52 -05:00
nikhiljindal de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
derekwaynecarr b19a8a61a8 Simplify min/max evaluation, make limitType a type 2015-01-27 16:54:50 -05:00
derekwaynecarr 74f368f50e Modified LimitRangeItem.Kind to LimitRangeItem.Type, added example files 2015-01-27 16:41:28 -05:00
derekwaynecarr 091cbe5fa2 Add a limit range resource 2015-01-27 16:41:27 -05:00
Brendan Burns 33ee41090e Add NodeSelector to the PodTemplate in v1beta1 and v1beta2 2015-01-26 20:30:48 -08:00
Tim Hockin 30219f8dfa Merge pull request #3664 from thockin/pull-if
Pull if
2015-01-21 13:05:28 -08:00
Tim Hockin 81343aac63 Change PullPolicy constants to match 2015-01-21 12:48:56 -08:00
Tim Hockin 819803b79f Make VolumeSource not be a pointer
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
Tim Hockin 60ec08db93 Rename HostDir to HostPath in v1beta3 2015-01-20 15:56:44 -08:00
Dawn Chen 15e9fa8a9d Introduce PodStatusResult, and deprecate PodContainerInfo. 2015-01-16 09:10:40 -08:00
Tim Hockin 1be3de895c Move util.UID to pkg/types 2015-01-14 15:22:21 -08:00
Daniel Smith c13ae34b02 Merge pull request #3445 from saad-ali/fix3172
Remove CONDITION from event object completely
2015-01-14 15:03:06 -08:00
Daniel Smith 8a764c02d5 Merge pull request #3478 from thockin/uid_type
Use a strong type for UID fields
2015-01-14 14:20:22 -08:00
saadali 90dfdcecd5 Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd.  To fix these
# errors, run gofmt -s -w <file>, or cut and paste the following:
#   gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go
#
# Your commit will be aborted unless you override this warning. To
# commit in spite of these format errors, delete the following line:
#   COMMIT_BLOCKED_ON_GOFMT
2015-01-14 14:17:16 -08:00
Tim Hockin d28b51f89f Document fields, fix presubmit 2015-01-14 14:01:18 -08:00
Tim Hockin e86d4cd3c6 Use a strong type for UID fields 2015-01-14 13:53:43 -08:00
Daniel Smith bd7b457d9c Fix error messages; add tests 2015-01-08 17:34:53 -08:00
Daniel Smith 35f54addca Update more packages, tests, binaries for quantity
make etcd registry pass test
fix kubelet config for quantity
fix openstack for quantity
fix controller for quantity
fix last tests for quantity
wire into binaries
fix controller manager
fix build for 32 bit systems
2015-01-07 15:21:35 -08:00
Daniel Smith 894a3e6d3f Wire resource.Quantity into api 2015-01-07 15:21:34 -08:00
Dawn Chen e3c019128e Add EventSource to api to have both Component and Host information. 2015-01-06 16:08:20 -08:00
Daniel Smith 53a9d106c4 Merge pull request #3167 from thockin/affinity
Don't use pointers for session affinity
2014-12-30 17:43:47 -08:00
saadali e8d30f019d Modify "kubectl get events" to print FieldPath so BoundPod events for the same Pod but different containers can be differentiated 2014-12-29 21:32:49 -08:00
Tim Hockin ca27fb259c Don't use pointers for session affinity 2014-12-29 14:43:17 -08:00
Tim Hockin 652479a3b1 Add kubelet DNS flags & api disable for DNS
This adds --cluster_dns and --cluster_domain flags to kubelet.  If
non-empty, kubelet will set docker --dns and --dns-search flags based on
these.  It uses the cluster DNS and appends the hosts's DNS servers.
Likewise for DNS search domains.

This also adds API support to bypass cluster DNS entirely, needed to
bootstrap DNS.
2014-12-29 09:18:12 -08:00
Dawn Chen bbaff08991 Fixed #2632 2014-12-19 17:23:47 -08:00
Daniel Smith 9fee1b0503 Merge pull request #3051 from brendandburns/flake
Add a PodUnknown phase and make ListPods return even when there are errors
2014-12-19 16:45:44 -08:00
Brendan Burns 5e8490d5fe Add a PodUnknown phase and make ListPods return even when there are errors
obtaining info for some pods.
2014-12-19 15:08:48 -08:00
Brendan Burns 2e17193161 Add Host to PodSpec and add a predicate to make the scheduler work. 2014-12-18 20:12:29 -08:00
Brendan Burns 4427672cde Merge pull request #2875 from foleymic/master
add SessionAffinity type to ServiceSpec
2014-12-17 21:53:35 -08:00
Clayton Coleman 7fde4583f2 v1beta1 should return Minion as kind, rather than Node
This changes the internal name logic (for conversion) to prefer the
internal registered preferred name for a resource, and then makes
v1beta1 and v1beta2 prefer Minion.

Fixes #3010
2014-12-17 19:55:56 -05:00
Mike Foley 569ce87f0e Updated types API to include session affinity. …
- changed CLIENT-IP and NONE to be ClientIP and None respectively
 - updated conversions to support translating between api versions.
 - updated validations to validate session affinity type if specified.
2014-12-17 15:59:20 -05:00
Clayton Coleman 88715cc6ef Rename Event.Status to Event.Condition to match v1beta3 agreement
Question - should this be a phase?  Seems like no, since phase implies
defined lifecycle and this field is explicitly not defined.
2014-12-16 09:43:10 -05:00
Clayton Coleman d9ad8cfac0 Conversions missing from v1beta1
They were in v1beta2, not sure how they got removed.
2014-12-15 16:50:05 -05:00
bgrant0607 9b40c52c24 Merge pull request #2910 from smarterclayton/small_v1beta3_refactors
Fix internal -> v1beta3 round trip issues
2014-12-15 13:21:12 -08:00
Brendan Burns d345dda1e5 Fix the kubelet uses api encode/decode by actually adding PodContainerInfo to v1beta1 2014-12-15 11:38:55 -08:00
Brendan Burns a6f967b6e7 Revert "Revert "Add an api object for the kubelet, and a versioned endpoint.""
This reverts commit dcfcf315e5.
2014-12-15 09:29:04 -08:00
Brendan Burns dcfcf315e5 Revert "Add an api object for the kubelet, and a versioned endpoint."
This reverts commit d4b9979382.
2014-12-12 21:13:44 -08:00
Brendan Burns d4b9979382 Add an api object for the kubelet, and a versioned endpoint. 2014-12-12 15:26:28 -08:00
Clayton Coleman eb906f2993 PodStatus Message needs to be round-trippable 2014-12-12 18:08:41 -05:00
Clayton Coleman 904d0d46c3 Rename ServerOp to Operation in v1beta3 and internal
Add the appropriate rename logic internally.
2014-12-12 18:08:41 -05:00
Vojtech Vitek (V-Teq) 87263b4380 Remove duplicated assignment from API conversion 2014-12-12 01:37:15 +01:00
bgrant0607 ecbb6c45d0 Merge pull request #2315 from ddysher/node-status
Add node status to API object.
2014-12-11 10:19:17 -08:00
bgrant0607 2232a29af7 Merge pull request #2833 from liggitt/util_time
Use util.Time consistently in types.go
2014-12-11 09:17:50 -08:00
bgrant0607 473376b085 Merge pull request #2820 from ravigadde/master
MountPath in VolumeMount is a required field. Removing the omitempty.
2014-12-11 08:55:40 -08:00
Jordan Liggitt 51bfb50698 Use util.Time consistently in types.go 2014-12-11 11:14:25 -05:00
Deyuan Deng 0332c8d4d1 Add node status to API object (all versions). 2014-12-11 08:12:27 -05:00
Dawn Chen 5865ab750e Merge pull request #2808 from simon3z/master
api: add container's id to ContainerStatus
2014-12-10 16:30:08 -08:00
Daniel Smith f81ec248d0 Merge pull request #2786 from smarterclayton/load_opaque_objects
Allow runtime.Object to be encoded as runtime.RawExtension
2014-12-10 16:24:05 -08:00
Ravi Gadde 66f21b0b8b MountPath in VolumeMount is a required field. Removing the omitempty for
json/yaml.

Removed omitempty for mountpath
2014-12-10 12:45:31 -08:00
Federico Simoncelli 4af64b8911 api: add container's id to ContainerStatus
Sometimes for external applications it is useful to correlate the pod
containers to the real docker instances.

This patch adds a new entry in the container status (containerID) which
is used to identify the instance.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-12-10 20:38:41 +00:00
Clayton Coleman d1d7505272 Rename client Minions->Nodes, select the correct path for v1beta3
Replaces the client public interface but leaves old references to "minions"
for a later refactor.  Selects the path "nodes" for v1beta3 and "minions"
for older versions.
2014-12-10 12:08:19 -05:00
Clayton Coleman 19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Clayton Coleman 650aead4c4 Support Node/NodeList as a valid name in all versions
Also refactor v1beta1/conversion_test.go `v1beta` -> `current` to allow
easier cut and paste of tests.
2014-12-10 11:53:38 -05:00
Clayton Coleman 5447e74129 Node/Nodelist 2014-12-10 11:48:41 -05:00
Clayton Coleman 2c27f7d332 Allow an empty service 2014-12-09 12:48:53 -05:00
Clayton Coleman 8a833ca701 Add a List type that can contain arbitrary objects
Supports objects that the core schema may not recognize and
preserves them unmodified as runtime.Unknown
2014-12-09 10:31:17 -05:00
Sam Ghods 6399854240 Remove unused YAML tags and GetYAML/SetYAML methods
Unneeded after move to ghodss/yaml.
2014-12-02 16:25:28 -08:00
Brendan Burns a5bc6301a4 Revert "Using util.Time for ContainerStatus" 2014-11-24 21:32:31 -08:00
Daniel Smith 610ab9a0db Merge pull request #2586 from dchen1107/cleanup
Using util.Time for ContainerStatus
2014-11-24 15:35:07 -08:00
Dawn Chen acb0f1198b Using util.Time for ContainerStatus 2014-11-24 15:15:33 -08:00
Daniel Smith 8d762c996a Remove boilerplate coversion functions 2014-11-24 12:57:34 -08:00
markturansky 8159c8fd25 Refactor PodCondition to PodPhase 2014-11-21 15:28:38 -05:00
Deyuan Deng a4e7604266 Merge pull request #2478 from smarterclayton/refactor_minion_to_match_v1beta3
Move the internal minion representation to match v1beta3
2014-11-20 21:37:43 -05:00
Clayton Coleman 156000ef6d Move the internal minion representation to match v1beta3
Moves to 'Spec' and 'Status' internally and removes duplicate
fields.  Moves Capacity into Spec and drops use of NodeResources
2014-11-20 20:53:08 -05:00
Tim Hockin 95a9098311 fix 'go vet' warnings 2014-11-21 09:45:28 +08:00
Clayton Coleman 1c524607d8 Merge pull request #2097 from markturansky/v1beta3_podrefactor
Refactor internal API for Pods to match v1beta3
2014-11-18 15:28:58 -05:00
Brian Grant 821c8542b6 Add descriptions to all v1beta1 API fields. 2014-11-18 17:53:57 +00:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Brendan Burns 2aa52d043b Add external services v2 support. 2014-11-14 11:32:54 -08: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
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
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 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
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 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
derekwaynecarr 56b6273dfb Fix json serialization consistency 2014-11-06 10:24:48 -05:00
markturansky 119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Daniel Smith ab9346d107 Use ID instead of Name in v1beta1 & 2 2014-10-29 15:13:44 -07:00
Brendan Burns 51bf451932 Add container garbage collection. 2014-10-28 12:52:06 -07: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
Brendan Burns 5d4d60783d Add requirements based scheduling. 2014-10-25 22:08:00 -07:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 0f011a055f Implement conversions for v1beta1/2 to internal ObjectMeta 2014-10-24 11:22:20 -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
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
Tim Hockin e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -07: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
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 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
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04: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
Meir Fischer 073940e66f minor comment change for grammar/consistency across v1beta* packages 2014-10-05 01:22:05 -04: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
derekwaynecarr e4ec49ee6b Require namespace on controller, pod, service objects 2014-10-01 10:57:50 -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
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
Dawn Chen 0e6ec3cbfc Convert existing kubernetes system to use ContainerStatus, instead of
docker.Container directly.

Conflicts:
	pkg/kubelet/dockertools/docker.go
	pkg/registry/pod/rest.go
2014-09-24 11:16:46 -07:00
Clayton Coleman fece926e2b Remove unnecessary EmbeddedObjects
Clarify the tests in embedded_test.go to indicate that unmarshalling
of an internal object (runtime.EmbeddedObject) will not work.  Instead,
consumers should decode raw external objects.
2014-09-22 16:03:07 -04:00
Clayton Coleman 61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Tim Hockin 9f275c81ac add a 'protocol' field to api.Service 2014-09-12 16:38:17 -07:00
Dan Mace 3a3fab3f82 FEATURE: Support privileged containers in a pod
Add a Privileged field to containers in a pod, in order to facilitate pods
performing administrative tasks such as builds via Docker-in-Docker.

Discussion: https://github.com/GoogleCloudPlatform/kubernetes/issues/391
2014-09-12 09:38:11 -07:00
Dawn Chen 7b46d8c9c5 typo 2014-09-11 16:07:56 -07:00
Dawn Chen 25fbe210f6 Clean up 2014-09-11 15:30:06 -07:00
Daniel Smith 48913672d9 Merge pull request #1248 from brendandburns/replicas
Make replica controllers return current state.
2014-09-09 16:27:21 -07:00
Brendan Burns 4ba4762827 Insert the current state of a replica controller. 2014-09-09 15:23:34 -07:00
Dawn Chen 15cab4d053 Introduce the simplest RestartPolicy and handling. 2014-09-08 22:41:38 -07:00
Dawn Chen 7ace5a3e83 Passing pod UUID to Kubelet. 2014-09-08 14:24:09 -07:00
Daniel Smith 828b70abb9 api and api/v1beta1 pass tests again 2014-09-07 22:19:24 -07:00
Daniel Smith 77edb91032 Add Object type to runtime, make runtime test pass. 2014-09-07 22:19:24 -07:00
Daniel Smith 2ba6503511 Add continuation to conversion routines 2014-09-07 22:19:24 -07:00
brendandburns 8e10ee5169 Merge pull request #1197 from lavalamp/fixApi
Rename Object to EmbeddedObject
2014-09-05 21:39:37 -07:00
Daniel Smith 7790961011 Rename Object to EmbeddedObject 2014-09-05 14:43:35 -07:00
Francisco Souza 6d0f84c700 api/v1beta1: use go-dockerclient instead of docker-api-structs
This involves updating go-dockerclient and removing the patched code.

Related to #692 and fsouza/go-dockerclient#146.
2014-09-05 17:31:13 -03:00
Clayton Coleman 01e668187c Services and Endpoints weren't properly sync'ing
They need incremental changes and a resync on start.
2014-09-03 16:04:55 -04:00
Brendan Burns dd9ecf5b79 Add types for lifecycle events. 2014-09-02 15:14:13 -07:00
Daniel Smith a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith 6121e61f99 Split api into api, api/common, api/validation & apitools 2014-09-02 10:40:52 -07:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Daniel Smith aa9b9b9fa8 Invert api and api/v1beta1 dependencies
This is some cleanup that has been needed for a while.
There's still one more step that could usefully be done, which is to
split up our api package into the part that provides the helper
functions and the part that provides the internal types. That can come
later.

The v1beta1 package is now a good example of what an api plugin should
do to version its types.
2014-08-29 12:15:30 -07:00
Daniel Smith a2b03ea93b Fix incorrect tag in MinionList 2014-08-28 20:06:17 -07:00
Clayton Coleman 0a841a49fd Naming of Reason constants is inconsistent
Changed ReasonType to StatusReason (to match the field) and
changed CauseReason to CauseType and renamed StatusCause.Reason to
Type.
2014-08-26 13:39:21 -04:00
Clayton Coleman d326ba2976 Add a Causes array to status details for validation errors
Uses the same constant values as api/errors for each nested
reason.
2014-08-26 13:30:55 -04:00
Satnam Singh 3f0f119e42 Very minor change to use camelCase for ReasonType as suggested in issue #914. 2014-08-25 16:57:13 -07:00
Dawn Chen 5a2365b323 Fix #926
Make HostPort a real option without being set to ContainerPort if absent.
2014-08-19 15:44:50 -07:00
Brendan Burns 05ab1e49fb Address some follow up comments. 2014-08-18 12:49:52 -07:00
Brendan Burns 0caae9c1d4 Add a in container exec based health check. 2014-08-18 12:00:11 -07:00
Paul Morie c69160059b Change CreationTimestamp to a util.Time and set in each storage implementation
Because time.Time doesn't work correctly with our YAML package, it is necessary
to introduce a type, util.Time, which serializes correctly to JSON and YAML.

Eventually we would like timestamping to cut across storage implementations;
for now, we set it in each storage.
2014-08-14 16:26:29 -04:00
Nan Monnand Deng 41b0e5f34c move go-dockerclient-copiedstructs to third_party/docker-api-structs 2014-08-13 14:49:03 -04:00
Daniel Smith c372b74bc8 Merge pull request #847 from thockin/health
Use IntOrString for health checks
2014-08-11 16:28:24 -07:00
brendandburns 3222f61bca Merge pull request #557 from lavalamp/podLocation
Prepare for external scheduler
2014-08-11 15:27:24 -07:00
Daniel Smith b7752a86d4 Add debugging info printing to etcd fake
And make tests pass again.
2014-08-11 13:09:24 -07:00
Tim Hockin c67c1edfb4 Use IntOrString for TCP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in TCP health checks.  Improve tests.
2014-08-10 23:44:42 -07:00
Tim Hockin 7201227cb1 Use IntOrString for HTTP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in HTTP health checks.  Improve tests.
2014-08-10 23:26:42 -07:00
Daniel Smith 7d605467dc New scheduler API
This commit adds a Binding object. The idea is that schedulers can write
these to cause pods to be asssigned to hosts. I'll provide an implementation
along with a rudimentary scheduler plugin.

This continues k8s' tradition of phrasing all APIs as RESTful handlers.
2014-08-10 19:05:03 -07:00
Daniel Smith 5cdce0e35a Prepare for external scheduler
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
   the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Clayton Coleman 4f88b778a6 Evolve the api.Status object with Reason/Details
Contains breaking API change on api.Status#Details (type change)

Turn Details from string -> StatusDetails - a general
bucket for keyed error behavior.  Define an open enumeration
ReasonType exposed as Reason on the status object to provide
machine readable subcategorization beyond HTTP Status Code. Define
a human readable field Message which is common convention (previously
this was joined into Details).

Precedence order: HTTP Status Code, Reason, Details. apiserver would
impose restraints on the ReasonTypes defined by the main apiobject,
and ensure their use is consistent.

There are four long term scenarios this change supports:

1. Allow a client access to a machine readable field that can be
   easily switched on for improving or translating the generic
   server Message.

2. Return a 404 when a composite operation on multiple resources
   fails with enough data so that a client can distinguish which
   item does not exist.  E.g. resource Parent and resource Child,
   POST /parents/1/children to create a new Child, but /parents/1
   is deleted.  POST returns 404, ReasonTypeNotFound, and
   Details.ID = "1", Details.Kind = "parent"

3. Allow a client to receive validation data that is keyed by
   attribute for building user facing UIs around field submission.
   Validation is usually expressed as map[string][]string, but
   that type is less appropriate for many other uses.

4. Allow specific API errors to return more granular failure status
   for specific operations.  An example might be a minion proxy,
   where the operation that failed may be both proxying OR the
   minion itself.  In this case a reason may be defined "proxy_failed"
   corresponding to 502, where the Details field may be extended
   to contain a nested error object.

At this time only ID and Kind are exposed
2014-08-05 16:17:53 -04:00
brendandburns e52c62565b Merge pull request #692 from lavalamp/dockerObjWrap
Copy docker client structs into v1beta1
2014-08-04 09:10:57 -07:00
Daniel Smith 828aed4cc8 Copy docker client structs, adding yaml/json tags.
Use these in our v1beta1 package so that we can pass fuzz test encode/decode.
2014-08-01 15:31:39 -07:00
Brendan Burns 490bb28bf9 Add TCP socket based health checking. 2014-08-01 14:13:56 -07:00
Dawn Chen 2740fb0abf Add RestartPolicy to Pod and PodTemplate 2014-07-30 15:31:27 -07:00
Daniel Smith 2396bdfa1b Incorporate new types into versioned api system.
* Made externalize/internalize generic to prevent boilerplate.
* Add fuzz testing.
* All objects pass fuzz tests now.
* This turned up some things we'll need to fix eventually. Left TODOs.
2014-07-29 15:46:57 -07:00
Brendan Burns bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00