Commit Graph

469 Commits (eefaafc2140ea508d4ae32959124b1539427cb33)

Author SHA1 Message Date
Daniel Smith 650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin 160f288832 Implement multi-port Endpoints
This is a part of multi-port services.
2015-02-22 09:35:12 -08:00
Tim Hockin e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -08:00
Tim Hockin ae0062d001 Part 2 of plural ports: make endpoints a struct
Includes conversions for v1b[12] and tests and fixups for call sites.
2015-02-18 19:54:15 -08:00
Tim Hockin 34eaa0dbd6 Part 1 of plural ports: Add protocol to Endpoints
This makes it easier to make the second step, which is moving endpoints
to a struct instead of a string.
2015-02-18 18:58:04 -08:00
Paul Morie a131a5e491 Add test for secret RESTStorage 2015-02-18 13:02:22 -05:00
Paul Morie fb001ada21 Secret API resource 2015-02-18 11:54:56 -05:00
Tim Hockin 876b0c4619 Merge pull request #4484 from jszczepkowski/load-balancer
Update for external load balancer.
2015-02-17 17:04:08 -08:00
Paul Weil 8d7d03a2f8 service NewList should return ServiceList 2015-02-17 16:30:29 -05:00
Jerzy Szczepkowski 397c1fc69a Update for external load balancer.
Implementation of updating external load balancer on service update. This partially fixes #4411.
2015-02-17 21:49:36 +01:00
Yu-Ju Hong 9e72ec023b Remove obsolete defaulting in service/rest.go 2015-02-17 10:34:50 -08:00
Clayton Coleman 72da3b4424 Move rest.Pods to pkg/registry/pod/rest.go 2015-02-16 10:09:28 -05:00
Clayton Coleman 7a93af57c0 Remove pods from pkg/registry/etcd/etcd.go since they are in their own type
Altered the master initialization code
2015-02-16 10:09:27 -05:00
Clayton Coleman 247e467217 Collapse pod REST+Registry to a single object using generic/etcd 2015-02-16 10:09:27 -05:00
Clayton Coleman 8440310ea0 Adapt to changes to generic etcd/registry 2015-02-13 13:11:33 -05:00
Clayton Coleman 23d199ded9 Make generic etcd more powerful and return operations from etcd
When we complete an operation, etcd usually provides a response
object.  Return that object up instead of querying etcd twice.
2015-02-13 13:11:33 -05:00
Saad Ali 3bc8f4e793 Merge pull request #4359 from erictune/no_bound_pod_envs
Stop putting env vars into BoundPods.
2015-02-12 09:12:19 -08:00
Clayton Coleman b2d50ce1cc Merge pull request #4329 from smarterclayton/bindings_incorrectly_removed
Bindings were not correctly removed across namespaces on pod update and delete
2015-02-12 11:43:22 -05:00
Eric Tune 5b4569697f Stop putting env vars into BoundPods.
They will still show up in etcd.  They never were available
through the API.

A subsequent PR(s) will rip out all BoundPods code.
Working in small increments.

This PR will cause users on lagging cloud providers
to not get env vars in their pods if they update to this code.
They have already been warned via email.

Removed unit tests of BasicBoundPodFactory.
There is adequate coverage in pkg/kubelet/kubelet_test.go.
2015-02-12 08:37:23 -08:00
Clayton Coleman 7d43971614 Merge pull request #4326 from yujuhong/phantom_pods
Allow AtomicUpdate() to surface the error when the key doesn't exist
2015-02-12 10:19:09 -05:00
Yu-Ju Hong 6813683ee2 Allow AtomicUpdate() to surface the error when the key doesn't exist
In some cases, when the key doesn't exist, AtomicUpdate should simply fail and
surface the error. This change adds a new function parameter "ignoreNotFound"
for this purpose.
2015-02-11 21:56:28 -08:00
Clayton Coleman 26f08b7807 RESTStorage should not need to know about async behavior
Also make sure all POST operations return 201 by default.
Removes the remainder of the asych logic in RESTStorage and
leaves it up to the API server to expose that behavior.
2015-02-11 16:26:08 -05:00
Clayton Coleman 6f85b655cc Bindings were not correctly removed across namespaces on pod update and delete
BoundPods must be checked for Name and Namespace equality, not just name
equality. In the future, we should also check for UID equality.
2015-02-11 14:35:28 -05:00
derekwaynecarr 0bd0e12bbc Add support for Namespace as Kind
Add example for using namespaces
2015-02-10 09:50:50 -05:00
derekwaynecarr 151be7773c Rename api.Namespace to api.NamespaceValue to avoid name collision 2015-02-10 09:44:29 -05:00
Brendan Burns 783e1de5bb Add some locking to prevent go data race logic from tripping. 2015-02-05 17:27:58 -08:00
Brendan Burns b08bd8671f Merge pull request #4157 from saad-ali/updateEventApi
Add "Update Event" to Kubernetes API
2015-02-05 14:50:48 -08:00
Tim Hockin a20fb598bc Merge pull request #4132 from jszczepkowski/master
Improve "constraint violation" error message.
2015-02-05 13:43:29 -08:00
Jerzy Szczepkowski 18c5fa1ae7 Applied comments. 2015-02-05 20:32:51 +01:00
Brian Grant 50b1034b6c Merge pull request #4122 from pmorie/comment
Clarify commenting in endpoints_controller
2015-02-05 07:09:56 -08:00
saadali a41f520bf0 Add "Update Event" to Kubernetes API 2015-02-05 00:07:51 -08:00
Jerzy Szczepkowski ad4c2ee630 Improve "constraint violation" error message. 2015-02-05 00:29:28 +01:00
Paul Morie 3229a634a0 Clarify commenting in endpoints_controller 2015-02-04 15:14:05 -05:00
Brian Grant 3f28badae3 Merge pull request #3854 from yujuhong/defaults
Migrate API defaulting to a centralized location
2015-02-04 11:41:23 -08:00
Tim Hockin 411666decb Get rid of ServiceSpec.ProxyPort
As far as I know, nobody uses it.  It was replaced by PublicIPs.  If I were
being very polite I would leave it in internal, but since I am 99.99% sure
nobody uses it, I am cutting it.  Let's argue about it.
2015-02-03 22:45:00 -08:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08: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 e485dc93ca Minions should have common logic with create
TODO: disable / document generate names for cluster scoped resources.
2015-02-02 14:46:25 -05:00
Clayton Coleman 0a87f0332b Add name generation to services 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
saadali e83fd7b8e7 Make master service IP static (no longer randomly assigned) 2015-01-30 16:07:19 -08:00
Deyuan Deng 662bcb9c3d Fix node hostip issue 2015-01-30 14:23:18 -05:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
Brian Grant 0345211e0c Merge pull request #3921 from nikhiljindal/OperationClean
Some more operations code cleanup
2015-01-29 14:54:05 -08:00
Tim Hockin d01ea11a6e Merge pull request #3856 from smarterclayton/validation_logic_needs_cleanup
Validation of ObjectMeta is inconsistently applied
2015-01-29 14:12:44 -08:00
Brendan Burns 2d4e72f1fa Add some extra checking around a call to list pods. 2015-01-28 22:22:54 -08:00
nikhiljindal dc92d3c7a2 Cleaning up the operations code in client 2015-01-28 21:04:16 -08:00
derekwaynecarr 829fa69527 Introduce a ResourceQuota object 2015-01-28 15:03:19 -05:00
Tim Hockin c8f61885df Merge pull request #3695 from mikedanese/ready
refactor pkg/health into more reusable pkg/probe
2015-01-28 11:00:32 -08:00