Commit Graph

2972 Commits (48a98f97a1af0d7d7db8ab454076d6601f992ed7)

Author SHA1 Message Date
Dawn Chen 4da829ef20 comment. 2015-02-05 15:57:26 -08:00
Mike Danese 14bfec92f2 rename probe.Status to probe.Result. 2015-02-05 15:49:58 -08:00
Dawn Chen f762e062f2 Kubelet decides podStatus 2015-02-05 15:49:41 -08:00
Clayton Coleman 698e8dd06f Kubectl should be able to display endpoints directly and for service
kubectl get endpoints <servicename>
    kubectl describe service <servicename>

should have printers for endpoints
2015-02-05 18:46:09 -05:00
Brendan Burns 8e6f5c7201 Merge pull request #3593 from commonlisp/master
Add timeouts to HealthChecks and retry checks
2015-02-05 15:40:22 -08:00
Brendan Burns 50e855953f Merge pull request #4131 from a-robinson/validate
Add a few extra test cases for API validation of labels
2015-02-05 15:37:45 -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
Brendan Burns f153a27235 Merge pull request #4147 from jlowdermilk/kubeconfig-view
Allow output formatting for kubectl config view
2015-02-05 14:48:02 -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
Brian Grant 7a13c2f0e3 Merge pull request #4169 from brendandburns/shell_sucks
Fix a regression where we never cleared out failed nodes.
2015-02-05 13:41:11 -08:00
Jerzy Szczepkowski 18c5fa1ae7 Applied comments. 2015-02-05 20:32:51 +01:00
Brendan Burns 6d0b8ea7a7 Fix a regression where we never cleared out failed nodes. 2015-02-05 10:55:57 -08:00
Jeff Lowdermilk 5a702ad123 Allow --output formatting of kubectl config view, make merge default 2015-02-05 10:44:16 -08:00
Brendan Burns 8b25b43039 Merge pull request #4117 from wojtek-t/validate_docker_version
Check Docker version in Kubelet /healthz handler
2015-02-05 10:06:33 -08:00
Jeff Lowdermilk d46ae5d841 Refactor kubectl/cmd helpers into pkg/kubectl/cmd/util
Allows helpers to be used by config commands.
2015-02-05 09:39:42 -08:00
Brian Grant 50b1034b6c Merge pull request #4122 from pmorie/comment
Clarify commenting in endpoints_controller
2015-02-05 07:09:56 -08:00
Brian Grant 2c9e620d43 Merge pull request #4102 from brendandburns/rc
Make the replication controller more resilient to event expiration in watch.
2015-02-05 07:08:35 -08:00
Brian Grant 42fec8ec4e Merge pull request #4110 from jimmidyson/proxy-tweaks
kubectl proxy: make static prefix configurable
2015-02-05 07:08:07 -08:00
Brian Grant 251348122c Merge pull request #4136 from yujuhong/fixvalidationtests
Fix tests in validation_test
2015-02-05 07:07:16 -08:00
Brian Grant 4e0ef6fda4 Merge pull request #4150 from nikhiljindal/cleanOperationAPI
Deleting the API objects related to /operations
2015-02-05 07:07:02 -08:00
George Kuan e8c33b7916 Add timeouts to HealthChecks and retry checks
Fixes issue #3532. Added timeouts for HTTP and TCP checks
and enabled kubelet/probe to kubelet#maxRetries times
before declaring Failure.

Added Probe.TimeoutSecs to API

Probe variants now check container.LivenessProbe.TimeoutSeconds
Also added a test for timeouts in http_test.go.
2015-02-05 06:04:45 -08:00
saadali a41f520bf0 Add "Update Event" to Kubernetes API 2015-02-05 00:07:51 -08:00
nikhiljindal 19f7ecf31b Deleting the API objects related to /operations 2015-02-04 20:50:45 -08:00
nikhiljindal 68271eb689 Adding swagger files which got left out of last PR 2015-02-04 18:28:13 -08:00
Wojciech Tyczynski 1a3419f970 Fix the min allowed Docker version. 2015-02-05 02:34:04 +01:00
Brendan Burns cfe5b14114 Wait until containers actually finish running before trying to clean up
volumes or pods.
2015-02-04 17:28:41 -08:00
Wojciech Tyczynski 524cdba101 Fix hack/test-cmd.sh test. 2015-02-05 01:58:26 +01:00
Jerzy Szczepkowski 0010e02148 Fixed formatting. 2015-02-05 00:52:34 +01:00
Brian Grant 849596c4a9 Merge pull request #4134 from nikhiljindal/swagger-ui
Updating swagger-ui code to the latest version and removing the 'Try it out' buttons
2015-02-04 15:51:32 -08:00
Yu-Ju Hong 283919e8b1 Fix tests in validation_test
Some tests expect the error cases to fail for a specific reason, but they could
fail for other reasons and still pass. This caused some changes to break the
tests without noticing the breakage. Example are the recent defaulting PR

This change fixes such tests and also updates some obsolete tests.
2015-02-04 15:44:46 -08:00
Jerzy Szczepkowski ad4c2ee630 Improve "constraint violation" error message. 2015-02-05 00:29:28 +01:00
Nikhil Jindal 63c07ad58b Merge pull request #4129 from smarterclayton/add_user_agent
Add user agent string to all client requests
2015-02-04 15:05:31 -08:00
nikhiljindal 6684d962df Updating swagger-ui code to the latest version and removing the 'Try it out' buttons 2015-02-04 15:01:18 -08:00
Clayton Coleman 0307d7ba98 Set a default user agent on all client.Client calls
Form:
  kube-controller-manager/v0.10.0 (linux/amd64) kubernetes/550b98e

  <basename(os.Argv)>/<gitVersion> (<GOOS>/<GOARCH>) kubernetes/<shortGitCommit>

Can be set by other clients
2015-02-04 17:45:53 -05:00
Brendan Burns 6e897524be Merge pull request #4093 from nelcy/master
Fix orphaned pod & volume cleanup order. Volumes need to be unmounted before pod cleanup.
2015-02-04 14:38:20 -08:00
Alex Robinson 6bb374ca54 Add a few extra test cases for API validation of labels that would have
caught a bug that was in past versions. Also, copy the label key format
requirements from the API types.go comments into the labels doc.
2015-02-04 22:24:46 +00:00
Tim Hockin e6e67e2662 Merge pull request #4124 from brendandburns/e2e2
Fix service generation and add tests I should have included in the first place.
2015-02-04 12:52:51 -08:00
Brendan Burns 550b98ebf4 Merge pull request #3931 from deads2k/deads-pull-more-info-from-request
pull more complete information from request
2015-02-04 12:23:20 -08:00
Brendan Burns fa6ddf13e5 Fix service generation and add tests I should have included in the first place. 2015-02-04 12:14:53 -08:00
Paul Morie 3229a634a0 Clarify commenting in endpoints_controller 2015-02-04 15:14:05 -05:00
Wojciech Tyczynski ead67108ce Use existing method to get Docker version. 2015-02-04 20:50:21 +01: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
deads2k 889c4cc755 update admission control to properly indicate resource 2015-02-04 13:36:01 -05:00
deads2k 8a2fe9bd2b modify policy to correctly identify resource versus kind 2015-02-04 13:36:01 -05:00
deads2k 1c9216a45e clarify api request information 2015-02-04 13:36:01 -05:00
Brendan Burns 7ffbe1444a Merge pull request #4105 from thockin/kill_proxy_port
Get rid of ServiceSpec.ProxyPort
2015-02-04 09:34:20 -08:00
Brendan Burns 65e4964bc2 Merge pull request #4087 from enisoc/apiserver-proxy-redirect
Rewrite "Location" header in apiserver proxy.
2015-02-04 09:33:34 -08:00
Wojciech Tyczynski 78f66a6ce9 Check Docker version in Kubelet /healthz handler 2015-02-04 18:31:24 +01:00
Jeff Lowdermilk 6acac8f761 Merge pull request #3754 from deads2k/deads-remove-ns-path
remove --ns-path option from .kubeconfig file
2015-02-04 08:10:21 -08:00
Jimmi Dyson e2baf049c0 kubectl proxy: make static prefix configurable 2015-02-04 15:57:21 +00: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
Brendan Burns 874859f6d3 Make the replication controller more resilient to event expiration in watch. 2015-02-03 22:15:12 -08:00
chakri 9508b2bf12 Fix orphaned pod & volume cleanup order. Volumes need to be unmounted before pod cleanup. 2015-02-04 01:46:28 +00:00
Brian Grant be310ac8c3 Merge pull request #4085 from ddysher/fix-node-name
Lower case node names before registering
2015-02-03 17:10:50 -08:00
Tim Hockin 3b5ea74a48 Fix a race in kube-proxy causing runaways
It was an ABA problem where the proxy loop might see its own service as
"existing" when it had been destroyed and recreated (as in an update).

To prove this I added a counter of running ProxyLoop goroutines and check that
in tests.  If I undo my main change, the tests fail.  This makes the
proxier_test significantly slower (3 seconds vs 0.5 seconds).  Sorry.
2015-02-03 17:08:09 -08:00
nikhiljindal 18609e1706 Moving /watch, /proxy and /redirect registration to go-restful 2015-02-03 15:47:48 -08:00
Anthony Yeh 6a0dec0e99 Rewrite "Location" header in apiserver proxy.
So that redirects work correctly.
2015-02-03 15:14:28 -08:00
Deyuan Deng de51527a28 Lower case node names before registering 2015-02-03 18:07:12 -05:00
Jeff Lowdermilk 1f2c907991 Merge pull request #4053 from deads2k/deads-add-envvar-flag
add flag to manage $KUBCONFIG files
2015-02-03 14:49:05 -08:00
deads2k affa85fab0 add flag to manage $KUBECONFIG files 2015-02-03 16:12:02 -05:00
Alex Robinson a31cc679bf Merge pull request #4059 from brendandburns/rel10
Rel10
2015-02-03 11:28:00 -08:00
deads2k bc93de314a remove --ns-path option from .kubeconfig file, kick tests 2015-02-03 14:22:55 -05:00
Brian Grant 4eb41b2330 Merge pull request #3592 from brendandburns/cli
Add a service generator and a command to easily expose services.
2015-02-03 09:07:05 -08:00
Brian Grant 6040cabf11 Merge pull request #4045 from smarterclayton/remove_logging
Remove logging on apiserver startup
2015-02-03 09:05:42 -08:00
Brendan Burns dbbdaaaf6d Kubernetes version v0.10.0-dev 2015-02-03 08:30:19 -08:00
Brendan Burns 71e26cbeb9 Kubernetes version v0.10.0 2015-02-03 08:30:13 -08:00
Brendan Burns ab0acae7d3 fix build on non-linux hosts. 2015-02-03 08:13:09 -08:00
Martin Nagy e18fc8e840 Add TODO comment for kubectl update patching 2015-02-03 13:56:39 +01: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
Tim Hockin 1ddb68d8d7 Sketch: a third take on defaulting values 2015-02-02 22:35:58 -08:00
Clayton Coleman 9263a8f627 Remove logging on apiserver startup
Now that we return errors on startup there's not much value in the
startup log for anyone except a few developers.  Nuke
2015-02-03 00:02:07 -05:00
Alex Robinson 2ac6bbb7eb Merge pull request #4032 from ddysher/remove-ip-cache
Remove ip cache, use node status cache instead.
2015-02-02 18:58:49 -08:00
Brian Grant 2903fce2b8 Merge pull request #4031 from jbeda/hyperkube-kubelet
Convert kubelet and proxy to hyperkube
2015-02-02 18:08:59 -08:00
Alex Robinson 449e4b2cab Merge pull request #4038 from enisoc/apiserver-proxy-rewrite
Fix apiserver proxy path rewriting.
2015-02-02 17:07:18 -08:00
Tim Hockin 1ee1702be0 Merge pull request #3808 from brendandburns/master
Add a mounter that uses google's safe_format_and_mount.
2015-02-02 16:29:10 -08:00
Brendan Burns ac21ac24fa Add a mounter that uses google's safe_format_and_mount. 2015-02-02 16:16:20 -08:00
Tim Hockin ac399fb354 Merge pull request #3967 from brendandburns/fixer
Be a little more careful when removing mount points.
2015-02-02 15:46:18 -08:00
Deyuan Deng 31991f82c6 Remove ip cache, use node status cache instead. 2015-02-02 17:08:36 -05:00
Joe Beda 638069b879 Convert proxy server to hyperkube 2015-02-02 14:03:13 -08:00
Joe Beda 76df5471b5 Covert the kubelet binary to hyperkube.
This leaves `pkg/kubelet/server/server.go` looking a little ugly as there is an extra layer of "config" structs that isn't needed.  This is left as a TODO for now.
2015-02-02 14:03:13 -08:00
Joe Beda d96afdd645 Move 'pkg/standalone' package to 'pkg/kubelet/server'.
This paves the way to hyperkube for the kubelet.
2015-02-02 14:03:13 -08:00
Anthony Yeh 695b08885b Fix apiserver proxy path rewriting.
1) Absolute paths without a hostname were being rewritten relative to
   the current page, rather than relative to the current host.
   e.g. When viewing /some/page.html, it would rewrite:
       /other/page.html => proxyPrepend/some/other/page.html
   Instead, it should rewrite:
       /other/page.html => proxyPrepend/other/page.html

2) Trailing slashes were being stripped from all rewritten URLs.
   This is because path.Join() always calls path.Clean() as well:
   http://golang.org/pkg/path/#Join
2015-02-02 13:01:46 -08:00
Brian Grant 0474c49b07 Merge pull request #4025 from ironcladlou/replica-annotations
Backport annotations to PodTemplateSpec
2015-02-02 12:54:23 -08:00
Alex Robinson 9992abdfcf Merge pull request #3997 from smarterclayton/make_master_index_optional
Make master index optional when master is used in other contexts
2015-02-02 12:45:18 -08:00
Brendan Burns 7f06fbb081 Be a little more careful when removing mount points. 2015-02-02 12:35:24 -08:00
Brian Grant efd71793f3 Merge pull request #3998 from jbeda/hyperkube-servers2
Convert scheduler and controller-manager to hyperkube
2015-02-02 12:33:55 -08:00
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 c2b79e52d4 Merge pull request #4027 from deads2k/deads-raw-extension
handle omitted rawExtension
2015-02-02 15:03:37 -05:00
deads2k fe398938e8 handle omitted rawExtension 2015-02-02 14:53:22 -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 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 7f39a37eee Fix integration tests to not depend on setting pod.Status on create
Allow the master to have pod/node cache timeouts controlled via a config
flag for integration tests.

Move integration test to '127.0.0.1' so that it correctly returns a health
check, and enable health check testing on the integration test.
2015-02-02 14:46:23 -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
Brian Grant 6e415f760b Merge pull request #4017 from smarterclayton/relax_annotation_validations
Slightly relax annotation validation
2015-02-02 11:42:38 -08:00
Alex Robinson 5b7228092a Merge pull request #4026 from dchen1107/logging
make kube-proxy.log less verbose.
2015-02-02 11:33:47 -08:00
Alex Robinson ce164f67fd Merge pull request #3841 from vishh/api_resources
Adding an extensible resource spec to the API.
2015-02-02 11:24:13 -08:00
Dawn Chen 4aac47c31d make kube-proxy.log less verbose. 2015-02-02 11:15:14 -08:00
Alex Robinson 7868fe468e Merge pull request #3618 from saad-ali/fix2410
Make master service IP static (no longer randomly assigned)
2015-02-02 11:05:58 -08:00
Alex Robinson d8d0bd1642 Merge pull request #3988 from ddysher/sync-status-ip
Move hostip to sync status
2015-02-02 11:01:57 -08:00
Brendan Burns d9c9856889 Merge pull request #3992 from smarterclayton/allow_namespace_short
Allow commands to specify a short namespace
2015-02-02 10:56:33 -08:00
Brendan Burns d9f7d39cdb Merge pull request #4003 from ghodss/handle-auth-path-failure
Handle missing auth file gracefully in kubelet
2015-02-02 10:55:15 -08:00
Alex Robinson 59ee1d901a Merge pull request #4016 from smarterclayton/add_getbykey_to_store
Add a GetByKey method to Store
2015-02-02 10:51:57 -08:00
Clayton Coleman f398fd2084 Merge pull request #3959 from smarterclayton/expose_tls_config_and_wrappers
Allow client.Config to be used for HTTP2 and WebSocket connections
2015-02-02 13:20:30 -05:00
Clayton Coleman 8b2eeafd49 Merge pull request #3944 from derekwaynecarr/rest_mapper_scope_support
Make RESTMapper scope aware, use it to inform kubectl and swagger behavior
2015-02-02 13:13:11 -05:00
Joe Beda bbb4479166 Convert controller-manager to hyperkube. 2015-02-02 10:01:36 -08:00
Alex Robinson 8fc228700a Merge pull request #4023 from fabianofranz/master
Fix typos
2015-02-02 09:57:38 -08:00
Satnam Singh 61c4a04ad2 Merge pull request #3805 from mnagy/allow_multiple_files_in_update
Use new resource builder in kubectl update
2015-02-02 08:40:24 -08:00
fabianofranz de14a6ff08 Fix typos 2015-02-02 14:25:00 -02:00
derekwaynecarr a928be56ba Code review comments 2015-02-02 11:01:08 -05:00
derekwaynecarr 0851ca9522 Do not provide a namespace on request url if resource does not require it 2015-02-02 10:26:19 -05:00
derekwaynecarr 22ceccc188 Fix TestUnimplementedRESTStorage 2015-02-02 10:26:19 -05:00
derekwaynecarr a216cb747c Fix logic issue in register resource handlers not doing list across all namespaces in v1beta3 2015-02-02 10:26:19 -05:00
derekwaynecarr a8449732e0 Make the FilterNamespace function the last visitor 2015-02-02 10:26:19 -05:00
derekwaynecarr 4c33e36a88 Plumb restmapper properly through apiserver and tests 2015-02-02 10:26:19 -05:00
derekwaynecarr f911784c98 Cherry pick test from #3901 2015-02-02 10:26:19 -05:00
derekwaynecarr 71ec444d63 Make a RESTMapper scope aware 2015-02-02 10:26:19 -05:00
Clayton Coleman b30173658f Slightly relax annotation validation
The more aggressive validation on annotations broke openshift (and
backwards compat for our data).  This change relaxes to allow mixed
case so we can continue working in the short term, try to see if we
can agree on relaxation, and if we can't, apply the stronger
validation here.
2015-02-01 19:03:04 -05:00
Clayton Coleman 3ca23163ae Add a GetByKey method to Store
Without the ability to retrieve underlying items by key (instead of
the object passed to KeyFunc) it is impossible to build wrappers
around cache.Store that want to make decisions about keys, because
they would need to reconstruct the object passed to Get.

This allows retrieval by key, and makes sure Get(obj) uses it.
2015-02-01 14:55:45 -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
Brendan Burns 7e48b26ff5 Address comments, fix tests. 2015-01-30 20:51:40 -08:00
Clayton Coleman 42175b433a Make master index optional when master is used in other contexts
OpenShift provides a default URL at the root that shows the UI. The
provided flag makes loading the index handler optional for now.
2015-01-30 22:19:55 -05:00
Sam Ghods b0dd0a8d0b Handle missing auth file gracefully in kubelet 2015-01-30 18:07:07 -08:00
saadali e83fd7b8e7 Make master service IP static (no longer randomly assigned) 2015-01-30 16:07:19 -08:00
Satnam Singh b40d079551 Merge pull request #3994 from smarterclayton/log_failure_to_create_service
Print the returned object in the event of a publish error
2015-01-30 15:54:16 -08:00
Satnam Singh 964080283a Merge pull request #3984 from erictune/abacdoc
update ABAC example with right kubelet/proxy perms.
2015-01-30 15:41:07 -08:00
Clayton Coleman 49ee27988d Print the returned object in the event of a publish error
resp.Object is a pointer, so printing resp doesn't show what the
server returned.
2015-01-30 18:27:50 -05:00
Clayton Coleman 2d5c6b4443 Allow commands to specify a short namespace
OpenShift currently uses '-n', so opening up the potential for downstream
to set a short namespace.  However, this should only be used in general for
commands that want to work across namespaces frequently - such as admin
level operations on entire namespaces like quota or cleanup behavior where
you have permissions and need to rapidly switch.
2015-01-30 17:47:40 -05:00
Brian Grant aa3b45d17b Merge pull request #3986 from ddysher/fix-node-ip
Fix node hostip issue
2015-01-30 13:16:52 -08:00
Joe Beda 6bdede6925 Convert kube-apiserver to hyperkube.
Part of #108.

Also:
* Added hyperkube cmd (not built by default yet).
* Added version support to hyperkube
* Remove health_check_minions flag from apiserver as it is no longer used with #3733
2015-01-30 13:06:28 -08:00
Deyuan Deng 53d44a6f5f Move hostip to sync status 2015-01-30 16:03:30 -05:00
Brian Grant 6432b563f3 Merge pull request #3980 from satnam6502/apiserver
Increase API rate limit on read only port of apiserver
2015-01-30 12:59:16 -08:00
Satnam Singh d8bda4006a Increase API rate limit on read only port of apiserver 2015-01-30 11:58:59 -08:00
Clayton Coleman f04769a595 Merge pull request #3983 from deads2k/deads-relative-paths-in-kubeconfig
resolve relative paths in kubeconfig
2015-01-30 14:45:01 -05:00
Deyuan Deng 662bcb9c3d Fix node hostip issue 2015-01-30 14:23:18 -05:00
Eric Tune 7648aa2a93 update ABAC example with right kubelet/proxy perms. 2015-01-30 11:05:27 -08:00
deads2k aba73493de resolve relative paths in kubeconfig 2015-01-30 14:01:24 -05:00
Clayton Coleman 556e59b512 Merge pull request #3810 from ironcladlou/cache-namespacing
Support namespacing in cache.Store
2015-01-30 13:19:41 -05:00
Brian Grant 207d0f5d40 Merge pull request #3878 from thockin/infra_name
Use a constant for the pod infra container name
2015-01-30 09:18:00 -08:00
Satnam Singh 3c3b016b8b Merge pull request #3917 from yujuhong/dedup
Refactor API object fuzzer
2015-01-30 08:07:25 -08:00
Satnam Singh 9a8d20a2fc Merge pull request #3969 from GoogleCloudPlatform/alex-mohr-patch-1
Update master.go's UpdateAllContainers to every 5 seconds instead of 30.
2015-01-30 07:58:43 -08:00
Satnam Singh a6fd7204b6 Merge pull request #3940 from jlowdermilk/fix-client-for-version
Fix client for version
2015-01-30 07:58:13 -08:00
Martin Nagy 364774e7b8 Add tests for the reworked update command 2015-01-30 16:05:20 +01:00
Martin Nagy b6ddd6548c Use new resource builder in kubectl update 2015-01-30 16:05:20 +01:00
Brian Grant ee3470def5 Merge pull request #2933 from hustcat/cap-add-drop
Add docker's add/drop capabilites
2015-01-30 06:43:49 -08:00
Ye Yin 248624fc1f Add docker's add/drop capabilites 2015-01-30 15:09:31 +08:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
Alex Mohr 3ac5b611b1 Update master.go
Make pod status update every 5 seconds instead of every 30 to mask the issue #3952.  I suspect (but haven't confirmed) that #3927 doesn't completely address the issue since it will still happily cache a Pending status for up to 30 seconds even though the pod may have transitioned to Running already.
2015-01-29 18:54:35 -08:00
Satnam Singh c2c109e896 Merge pull request #3963 from smarterclayton/handle_server_errors
Provide a better error when Kubelet pod status is unexpected
2015-01-29 18:30:43 -08:00
Yu-Ju Hong 4cb730dad5 Refactor API object fuzzer
API object fuzzer is used to randomly populate API object for testing. Similar
code of the fuzzer was duplicated in multiple files. This change refactors the
tests and moves the fuzzer to a separate file.
2015-01-29 18:14:09 -08:00
Brian Grant 8025d46cce Merge pull request #3927 from brendandburns/podcache
Transform the podCache into a write-through cache.
2015-01-29 17:28:35 -08:00
Jeff Lowdermilk 93ef8b8bcb Make kubectl factory build clients for version
Fix ClientConfigForVersion to actually use provided version.
2015-01-29 17:04:14 -08:00
Brendan Burns a0b8429d2e Reverse the order of unmounting and removing the pd disk.
This should mean that we retry detaching if the original detach fails for some reason.
2015-01-29 16:13:12 -08:00
Clayton Coleman c1a5e14270 Provide a better error when Kubelet pod status is unexpected
Treat HTTP errors with respect, provide a distinct error message
2015-01-29 19:05:41 -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
Clayton Coleman d072232d4a Allow client.Config to be used for HTTP2 and WebSocket connections
client.Config describes how to make a client connection to a server
for HTTP traffic, but for connection upgrade scenarios cannot be
used because the underlying http.Transport object can't allow the
connection to be hijacked. Reorganize the TLS and connection wrapper
methods so that a sophisticated client can do:

    cfg := &client.Config{...} // from somewhere
    tlsConfig, _ := client.TLSConfigFor(cfg)
    _ := conn.Dial(...)
    rt := MyRoundTripper() // some func that implements grabbing requests
    wrapper, _ := client.HTTPWrappersFor(cfg)
    req := &http.Request{}
    req.Header.Set("Connection-Upgrade", ...)
    _, := wrapper.RoundTrip(req)
    // rt has been invoked with a fully formed Req with auth
    rt.Req.Write(conn)
    // read response for upgrade

It would be good to have utility function that does more of this,
but mostly enabling the HTTP2/SPDY client exec function right now.
2015-01-29 17:43:09 -05:00
Dan Mace 5ee943d683 Support namespacing in cache.Store implementations
Support namespacing in cache.Store by framing the interface functions
around interface{} and providing a key function to each Store implementation.

Implementation of a fix for #2294.
2015-01-29 17:39:49 -05: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 8723ee9ab5 Merge pull request #3909 from jbeda/hyperkube
Create new hyperkube package
2015-01-29 11:25:15 -08:00
Brendan Burns 2d4e72f1fa Add some extra checking around a call to list pods. 2015-01-28 22:22:54 -08:00
Brendan Burns 3624b65f1c Transform the podCache into a write-through cache.
Don't always clear podInfo, instead occasionally garbage collect.
2015-01-28 22:15:23 -08:00
nikhiljindal dc92d3c7a2 Cleaning up the operations code in client 2015-01-28 21:04:16 -08:00
Brian Grant fcb1cd30ff Merge pull request #3891 from nikhiljindal/Operation
Deleting OperationHandler for handling /operation endpoint on server
2015-01-28 17:01:37 -08:00
Alex Mohr dff727c50b Merge pull request #3875 from vmarmol/metadata
Using metadata library for GCE metadata fetch.
2015-01-28 16:38:43 -08:00
Joe Beda e1dd6b297c Create new hyperkube package.
This is the start of an uber-binary that can morph into any server.  Eventually we'll want this to be able to launch multiple servers from a single command line.
2015-01-28 16:11:34 -08:00
Brendan Burns 919b2d20e0 Merge pull request #3904 from mrunalp/cleanup/net_pod_infra
Replace "net" by "pod infra" in docs, comments and format strings.
2015-01-28 15:55:25 -08:00
Maxwell Forbes 5500b1a261 Merge pull request #3576 from jlowdermilk/examples
Update update-demo example to use kubectl
2015-01-28 15:43:18 -08:00
Jeff Lowdermlk 6e98ce34ca Fix kubectl proxy
Port flag was being ignored. Fixed now.
2015-01-28 15:07:00 -08:00
Mrunal Patel 19e0605f5b Replace "net" by "pod infra" in docs and format strings. 2015-01-28 15:03:06 -08:00
Brian Grant 613aa42550 Merge pull request #3900 from brendandburns/api2
Change persistentDisk to gcePersistentDisk for v1beta3
2015-01-28 15:02:55 -08:00
Brendan Burns 6bcfe4f430 Change persistentDisk to gcePersistentDisk for v1beta3 2015-01-28 14:29:53 -08:00
Satnam Singh 5d5752374b Set Retry-After header before calling WriteHeader 2015-01-28 14:28:37 -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
nikhiljindal 521728e920 Deleting OperationHandler for handling /operation endpoint on server 2015-01-28 13:13:10 -08:00
Tim Hockin 804643a04b Merge pull request #3818 from mikedanese/probe-refactor
break api.Probe out of api.LivenessProbe
2015-01-28 12:41:35 -08:00
derekwaynecarr 0ff20c84dd Rebase errors 2015-01-28 15:09:42 -05:00
derekwaynecarr 9674f08504 Added unit tests for incrementing usage 2015-01-28 15:03:19 -05:00
derekwaynecarr 4887d71c51 Implement resource quota admission plugin 2015-01-28 15:03:19 -05:00
derekwaynecarr 67b359ebf9 Add a resource quota controller to track usage state 2015-01-28 15:03:19 -05:00
derekwaynecarr 829fa69527 Introduce a ResourceQuota object 2015-01-28 15:03:19 -05:00
Dawn Chen b0bcee7b40 Increase timeout for all testcases in file_test.go 2015-01-28 11:27:15 -08:00
Mike Danese 78f33e950a rename api.LivenessProbe to api.Probe and break out Actions 2015-01-28 11:20:44 -08: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
Tim Hockin 70ab406751 Use a constant for the pod infra container name
This is an implementation detail that has leaked out of kubelet.  Use a
constant to prevent divergence, for now.  Plan to get rid of it.

@dchen1107
2015-01-28 10:13:02 -08:00
Clayton Coleman a0356bca96 Unify validation logic for create and update paths
Ensure ObjectMeta is consistently validated on both create and update

Make PortalIP uncleareable
2015-01-28 13:10:37 -05: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
Clayton Coleman 4466aed3cc Merge pull request #3867 from deads2k/deads-partial-reststorage-registration
return all errors from RESTStorage registration
2015-01-28 13:02:39 -05:00
Tim Hockin 60119db5d5 More e2e damage from renaming "net" to "POD"
This stops the bleeding.  Will followup with a constant.
2015-01-28 09:58:19 -08:00
Victor Marmol 41bc0b301d Using metadata library for GCE metadata fetch.
Fixes #3343.
2015-01-28 09:20:25 -08:00
Paul Morie 962bdda0dc Fix typo in kubelet 2015-01-28 12:00:53 -05:00
Tim Hockin 80ff2128de Merge pull request #3844 from mikedanese/dockercfg-dirs
Check other dirs for .dockercfg
2015-01-28 08:50:08 -08:00
deads2k 6e1f680a57 return all errors from RESTStorage registration 2015-01-28 10:31:33 -05:00
nikhiljindal de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
Brian Grant 4096e904eb Merge pull request #3781 from satnam6502/429
Switch to use Too Many Requests response code
2015-01-27 16:25:37 -08:00
Brian Grant 02717b8ffa Merge pull request #3846 from ddysher/0-fix-0
Remove extra format in kubectl describe
2015-01-27 16:14:22 -08:00
Mike Danese 33f158073b Check other dirs for .dockercfg 2015-01-27 15:54:20 -08:00
Tim Hockin 371637a5fc Merge pull request #3845 from brendandburns/disk
Detach the PD disk from the VM in some failure cases.
2015-01-27 15:46:36 -08:00
Tim Hockin 7e6f3af937 Merge pull request #3817 from mrunalp/feature/shared_ipc
Shared IPC namespace for containers in a pod
2015-01-27 15:41:34 -08:00
Satnam Singh 3a9e6d8f29 Switch to use Too Many Requests response code
Name the 429 status code
2015-01-27 14:54:30 -08:00
Eric Tune b3fffe0efb Merge pull request #3751 from derekwaynecarr/limit_range
Admission Control: LimitRange
2015-01-27 14:08:24 -08:00
Clayton Coleman 72cc17b41c Omit empty quotes in message when required value field error type 2015-01-27 17:04:59 -05:00
Clayton Coleman c6a2e574c2 Structure of BadRequest error should have Message set 2015-01-27 17:04:59 -05:00
Tim Hockin a480794efc Tighten validation of Name and Namespace 2015-01-27 17:04:59 -05:00
Dawn Chen deebc7a29a Merge pull request #3812 from ddysher/list-order
List objects in deterministic order
2015-01-27 14:04:38 -08:00
Brendan Burns bc055d2bd0 Detach the PD disk from the VM in some failure cases. 2015-01-27 13:58:42 -08:00
derekwaynecarr b19a8a61a8 Simplify min/max evaluation, make limitType a type 2015-01-27 16:54:50 -05:00
derekwaynecarr 4faf27e63d Validate limit.Min and limit.Max resource names using ValidateResourceName 2015-01-27 16:41:28 -05:00
derekwaynecarr 759335ab69 Fix gofmt complaint 2015-01-27 16:41:28 -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
Satnam Singh 358ace610d Merge pull request #3824 from smarterclayton/allow_panic_and_error_reporting
Allow panics and unhandled errors to be sent elsewhere
2015-01-27 13:18:43 -08:00
Deyuan Deng 1330cc340b Remove extra format in kubectl describe 2015-01-27 15:45:55 -05:00
Mike Danese 5dc6362f8a rename probe.Healthy to probe.Success and renam probe.Unhealthy to probe.Failure. 2015-01-27 11:20:30 -08:00
Mike Danese 6eb0b89cbd add Probers to Probe pkgs. 2015-01-27 11:20:30 -08:00
Mike Danese a298402bd4 remove pkg/health and move everything over to pkg/probe 2015-01-27 11:20:30 -08:00
Mike Danese 5ee4071cf1 migrated tests 2015-01-27 11:20:29 -08:00
Mike Danese ee56a1d3e3 create pkg/probe as successor to pkg/health. 2015-01-27 11:20:29 -08:00
Brendan Burns 92d65b7c65 Add NodeSelector to the replication controller tests. 2015-01-27 10:58:46 -08:00
Brendan Burns 250b9ccd74 Address comments. Rebase. 2015-01-27 10:23:28 -08:00
Brian Grant c3da4f0b19 Merge pull request #3816 from brendandburns/api2
Add NodeSelector to the PodTemplate in v1beta1.
2015-01-27 10:09:05 -08:00
Brendan Burns 09166f5252 Add a service generator and a command to easily expose services. 2015-01-27 10:06:08 -08:00
Brendan Burns b078889360 Merge pull request #3822 from nikhiljindal/swaggerbug
Fixing a bug where Reads() was being called twice on POST routes
2015-01-27 10:01:27 -08:00
Brendan Burns 99b9785881 Merge pull request #3836 from mfojtik/extract_list_ptr
Ensure the ptr is pointing to reflect.Slice in ExtractList
2015-01-27 10:00:33 -08:00
Brendan Burns 7e558a7535 Merge pull request #3813 from mattmoor/master
Fix for issue 3797.
2015-01-27 09:56:49 -08:00
Tim Hockin f547960753 Merge pull request #3825 from mikedanese/goimports-fix
fixed goimports nits
2015-01-27 09:34:50 -08:00
Dawn Chen 10845b5743 Merge pull request #3821 from brendandburns/pod
Clear pod cache on delete.
2015-01-27 09:33:24 -08:00
Mrunal Patel b6a0ff1003 IP: Shared IPC. 2015-01-27 09:26:36 -08:00
Michal Fojtik ae3f10a397 Ensure the ptr is pointing to reflect.Slice in ExtractList 2015-01-27 18:02:37 +01:00
Deyuan Deng d30da9a812 List objects in deterministic order 2015-01-27 09:29:40 -05:00
Mike Danese d77743a07c gimports nits 2015-01-26 22:42:29 -08:00
Tim Hockin 60eba74c14 Merge pull request #3827 from brendandburns/sanity
Fix unit tests @ main on OS X
2015-01-26 22:30:09 -08:00
Brendan Burns e5c38a825b Fix unit tests @ main. 2015-01-26 22:12:24 -08:00
Brendan Burns 95247b31ff Merge pull request #3807 from brendandburns/validation
Fix a bug in validation that was leftover from the previous way of externalizing services.
2015-01-26 21:15:05 -08:00
Brendan Burns 33ee41090e Add NodeSelector to the PodTemplate in v1beta1 and v1beta2 2015-01-26 20:30:48 -08:00
Clayton Coleman 19987612bf Replace code that eats errors with a more consistent reporting
In order to allow certain programmer error / unexpected error states
to be captured, replace sections that log and eat errors with a method
that can be centrally replaced.  This captures two common error sources,
replication errors, and apiserver code that returns invalid errors.
2015-01-26 20:54:29 -05:00
Brendan Burns f124842505 Clear pod cache on delete. 2015-01-26 17:26:43 -08:00
Clayton Coleman 04b864a91f Allow panics and unhandled errors to be reported to external targets
It would be better if Kubernetes could be instrumented to report panics
and handled but unreturned errors in controller loops to a remote
service.  This commit introduces settable handlers for HandleCrash and a new
HandleError that can be overriden to report errors to a remote service
for analysis.  HandleError() in particular is for control loops that do
not return an error, and so there is no ability to report those errors
other than in log files.

ReplicationController is provided as an example.
2015-01-26 20:23:46 -05:00
nikhiljindal 54e5d1f102 Fixing a bug where Reads() was called twice on all POST routes 2015-01-26 17:21:25 -08:00
Dawn Chen c65f83f424 Merge pull request #3795 from ddysher/pod-cache-semantic
fix pod-cache with node semantic change
2015-01-26 16:04:48 -08:00
Matt Moore 2d396797a9 Fix for issue 3797.
Docker's logic for resolving credentials from .dockercfg accepts two kinds of matches:
1. an exact match between the dockercfg entry and the image prefix
2. a hostname match between the dockercfg entry and the image prefix

This change implements the latter, which permits the docker client to take .dockercfg entries of the form:
   https://quay.io/v1/
and use them for images of the form:
   quay.io/foo/bar
even though they are not a prefix-match.
2015-01-26 14:06:12 -08:00
Brendan Burns 99583fc8c5 Fix a bug in validation that was leftover from the previous way of externalizing services. 2015-01-26 13:19:27 -08:00
Jeff Lowdermilk 6ba8b7dfb2 Merge pull request #3768 from deads2k/deads-make-kubectl-config-easier-alt
make kubectl config set-cluster easier to use
2015-01-26 13:13:26 -08:00
Clayton Coleman 6410f37a32 Merge pull request #3591 from ddysher/node-client-update
Add node update method to client interface
2015-01-26 15:47:18 -05:00
deads2k 05bc508a13 make all kubectl config set-* easier to use 2015-01-26 15:16:54 -05:00
markturansky 131ce993c4 Added validation for annotations 2015-01-26 09:32:09 -05:00
Deyuan Deng 881be6c952 fix pod-cache with node semantic change 2015-01-25 16:59:00 -05:00
Tim Hockin 5d73fa40aa Merge pull request #3588 from vishh/api_resources
Adding a 'Typename' strongtype for representing all resource types
2015-01-23 15:07:27 -08:00
Vishnu Kannan c32295a180 Adding a 'Typename' strongtype for representing all compute resource types. 2015-01-23 22:17:56 +00:00
Clayton Coleman b21500eaa2 Merge pull request #3753 from mfojtik/fix_extractlist
Fix ExtractList to support extraction from generic api.List{}
2015-01-23 16:56:53 -05:00