Commit Graph

1876 Commits (9422d1d788b142f6bf1b7593c793b49c0e64b243)

Author SHA1 Message Date
deads2k d3c6363093 use single writer to improve quota performance 2016-04-25 10:42:26 -04:00
Clayton Coleman 3111985564 Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket)
against all 3 media types. Adopt the
`application/vnd.kubernetes.protobuf;stream=watch` media type for the
content that comes back from a watch call so that it can be
distinguished from a Status result.
2016-04-22 11:07:24 -04:00
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
deads2k 3be4b690ea create a negotiating serializer that wraps a single serializer 2016-04-21 07:51:59 -04:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
deads2k f0c33d65b6 start sharing the pod cache and list/watch 2016-04-18 08:51:55 -04:00
k8s-merge-robot a275a045d1 Merge pull request #23914 from sky-uk/make-etcd-cache-size-configurable
Automatic merge from submit-queue

Make etcd cache size configurable

Instead of the prior 50K limit, allow users to specify a more sensible size for their cluster.

I'm not sure what a sensible default is here. I'm still experimenting on my own clusters. 50 gives me a 270MB max footprint. 50K caused my apiserver to run out of memory as it exceeded >2GB. I believe that number is far too large for most people's use cases.

There are some other fundamental issues that I'm not addressing here:
- Old etcd items are cached and potentially never removed (it stores using modifiedIndex, and doesn't remove the old object when it gets updated)
- Cache isn't LRU, so there's no guarantee the cache remains hot. This makes its performance difficult to predict. More of an issue with a smaller cache size.
- 1.2 etcd entries seem to have a larger memory footprint (I never had an issue in 1.1, even though this cache existed there). I suspect that's due to image lists on the node status.

This is provided as a fix for #23323
2016-04-17 00:06:31 -07:00
deads2k ac4c545b91 add act-as powers 2016-04-14 12:49:10 -04:00
Daniel Smith 4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -07:00
James Ravn 5bb0595260 Make deserialization cache size configurable
Instead of the default 50K entries, allow users to specify more sensible
sizes for their cluster.
2016-04-12 13:42:27 +01:00
Saad Ali 48fa998f58 Merge pull request #23717 from mml/until
Comment out racey part of the multi-scheduler test.
2016-04-05 11:34:32 -07:00
Wojciech Tyczynski 53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02:00
k8s-merge-robot 3197f31cc6 Merge pull request #23554 from nikhiljindal/swaggerInRun
Automatic merge from submit-queue

genericapiserver: Moving InstallSwaggerAPI to Run

Ref https://github.com/kubernetes/kubernetes/pull/21190#discussion_r57494673

Moving InstallSwaggerAPI() from InstallAPIGroups() to Run(). This allows the use of InstallAPIGroups() multiple times or using InstallAPIGroup() directly.

cc @jianhuiz @kubernetes/sig-api-machinery
2016-04-02 08:19:25 -07:00
Matt Liggett 6ace15eb73 Comment out racey part of the multi-scheduler test.
Should fix #22848.
2016-03-31 16:56:10 -07:00
nikhiljindal eeeaa6867a Moving InstallSwaggerAPI to Run 2016-03-28 23:04:14 -07:00
deads2k e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Hongchao Deng 29b46a2395 integration/framework: remove unused NewEtcdStorage()
In integration/, framework.NewEtcdStorage() isn't used by any function.
2016-03-23 16:34:28 -07:00
Tim St. Clair 246b389275 Move test-only volume files to test-only volume package 2016-02-29 14:44:28 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Eric Tune 875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
mqliang e44e71ca87 make cache size configurable 2016-02-24 22:37:02 +08:00
k8s-merge-robot aee2eb3977 Merge pull request #21434 from erictune/job-ga
Auto commit by PR queue bot
2016-02-22 00:12:54 -08:00
Eric Tune bab89e95ce Fix jobs integration test. 2016-02-19 15:56:40 -08:00
k8s-merge-robot c3a962bff5 Merge pull request #20351 from krousey/dynamic_client
Auto commit by PR queue bot
2016-02-19 10:00:54 -08:00
Eric Tune d5f303d3d7 Fixed and added tests 2016-02-19 09:20:56 -08:00
Piotr Szczesniak d9705940d6 Fixed and added tests 2016-02-15 21:39:00 +01:00
Wojciech Tyczynski 463d21f352 Comment out calls to httptest.Server.Close() 2016-02-15 12:53:02 +01:00
Nick Schuch 5d511aeb54 Adds ReadOnlyRootFilesystem support for containers 2016-02-14 15:39:51 +10:00
Kris 4c58302b5b Adding dynamic client 2016-02-12 11:49:00 -08:00
k8s-merge-robot 678958a706 Merge pull request #19868 from jsafrane/devel/syncclaim-twice
Auto commit by PR queue bot
2016-02-12 06:21:21 -08:00
k8s-merge-robot c6ed624bfb Merge pull request #19503 from markturansky/attacher_interface
Auto commit by PR queue bot
2016-02-09 20:50:41 -08:00
Paul Morie e0ef253f7d Add integration test for ConfigMap 2016-02-09 10:28:53 -05:00
markturansky a242a3d5fe Added Attacher/Detacher interfaces and support to kubelet 2016-02-07 16:55:58 -05:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot 0ad6326d7f Merge pull request #20170 from pmorie/update-ads-pod
Auto commit by PR queue bot
2016-02-05 20:37:39 -08:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Paul Morie 0b82d0b491 Allow pod.Spec.ActiveDeadlineSeconds to be updateable 2016-02-05 15:58:31 -05:00
Jan Safranek 76b6449715 Retry recycle or delete operation on failure.
Recycle controller tries to recycle or delete a PV several times.
It stores count of failed attempts and timestamp of the last attempt in
annotations of the PV.

By default, the controller tries to recycle/delete a PV 3 times in
10 minutes interval. These values are configurable by
kube-controller-manager --pv-recycler-maximum-retry=X --pvclaimbinder-sync-period=Y
arguments.
2016-02-05 17:02:13 +01:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Nikhil Jindal 59820827d4 Merge pull request #20513 from nikhiljindal/apiserverExampleTest
Adding test for apiserver example
2016-02-04 11:28:58 -08:00
nikhiljindal c7beb9078c Updating methods to return error rather than using glog.Fatalf 2016-02-03 16:00:45 -08:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
k8s-merge-robot 843c11e06a Merge pull request #20452 from caesarxuchao/replace-client-kubelet
Auto commit by PR queue bot
2016-02-02 23:46:58 -08:00
Chao Xu cddd7b56a4 replace client with clientset in kubelet and other places 2016-02-02 20:28:45 -08:00
Chao Xu fe7887f1ec replace the client with clientset in controllers 2016-02-02 20:28:45 -08:00
k8s-merge-robot c5260c8c71 Merge pull request #20145 from mqliang/quorum-read
Auto commit by PR queue bot
2016-02-02 05:50:41 -08:00
Jan Safranek 1edf34a4e5 Fixed persistent volume claim controllers processing an old claim.
Fixes #19860 (it may be easier to look at the issue to see exact sequence
to reproduce the bug and understand the fix).

When PersistentVolumeProvisionerController.reconcileClaim() is called with the
same claim in short succession (e.g. the claim is created by an user and
at the same time periodic check of all claims is scheduled), the second
reconcileClaim() call gets an old copy of the claim as its parameter.

The method should always reload the claim to get a fresh copy with all
annotations, possibly added by previous reconcileClaim() call.


The same applies to PersistentVolumeClaimBinder.syncClaim().


Also update all the test to store claims in "fake" API server before calling
syncClaim and reconcileClaim.
2016-02-02 13:52:07 +01:00
Chao Xu c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
mqliang b0e06c14e5 add a knob to enable quorum read 2016-01-30 20:32:12 +08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
Clayton Coleman 4d127dc969 Initialize API servers with negotiated serializers
Pass down into the server initialization the necessary interface for
handling client/server content type negotiation. Add integration tests
for the negotiation.
2016-01-22 01:10:22 -05:00
Clayton Coleman 125ef6fbc8 Support content-type negotiation in the API server
A NegotiatedSerializer is passed into the API installer (and
ParameterCodec, which abstracts conversion of query params) that can be
used to negotiate client/server request/response serialization. All
error paths are now negotiation aware, and are at least minimally
version aware.

Watch is specially coded to only allow application/json - a follow up
change will convert it to use negotiation.

Ensure the swagger scheme will include supported serializations - this
now includes application/yaml as a negotiated option.
2016-01-22 00:12:50 -05:00
Alex Mohr 76f02d562a Merge pull request #19083 from resouer/allocatable
Use Allocatable to replace Capacity
2016-01-21 16:05:05 -08:00
k8s-merge-robot 6cf3a4b5f0 Merge pull request #18957 from jsafrane/devel/pv-name-tag
Auto commit by PR queue bot
2016-01-21 05:55:12 -08:00
Harry Zhang 0202a206b8 Integration test to verify alloc works
Add integration test to verify allocatable can works
2016-01-20 15:36:19 +08:00
k8s-merge-robot f2d273d481 Merge pull request #19128 from resouer/qps-limit
Auto commit by PR queue bot
2016-01-16 10:03:00 -08:00
k8s-merge-robot 36dc6eab34 Merge pull request #19300 from caesarxuchao/move-SwaggerSchema-to-disocovery
Auto commit by PR queue bot
2016-01-13 23:20:08 -08:00
Chao Xu 144b5acd08 move ServerVersion to DiscoveryClient 2016-01-13 10:11:52 -08:00
harry 080cb60dab Fix duplicated rate limit in scheduler
Remove BindingRateLimiterSaturation metrics

Update generated doc
2016-01-13 20:51:55 +08:00
David Oppenheimer 8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Jan Safranek 8c48250a55 Add an integration test for volume tags. 2016-01-08 19:09:29 +01:00
k8s-merge-robot d30f99b377 Merge pull request #18946 from smarterclayton/httplog
Auto commit by PR queue bot
2016-01-04 21:34:09 -08:00
Clayton Coleman 9dad7e624c Split the serviceaccount package into two parts
Public utility methods and JWT parsing, and controller specific logic.
Also remove the coupling between ServiceAccountTokenGetter and the
authenticator class.
2015-12-26 21:28:12 -05:00
HaiyangDING d9f3607292 Implement multi-scheduler:
1. Name default scheduler with name `kube-scheduler`
2. The default scheduler only schedules the pods meeting the following condition:
	- the pod has no annotation "scheduler.alpha.kubernetes.io/name: <scheduler-name>"
	- the pod has annotation "scheduler.alpha.kubernetes.io/name: kube-scheduler"

update gofmt

update according to @david's review

run hack/test-integration.sh, hack/test-go.sh and local e2e.test
2015-12-22 10:49:40 +08:00
Clayton Coleman 0702164f05 httplog is not a CloseNotifier
We wrap TimeoutHandler with RecoverPanics, but httplog does not
implement http.CloseNotifier, which causes a naive watch from curl
against the insecure port to fail.

For now, implement CloseNotifier (but we should consider removing
httplog now that we have other tools in the stack to manage it).
2015-12-20 21:59:59 -05:00
Hongchao Deng c0243ad4ee scheduler performance test suite: benchmarks and density tests 2015-12-18 09:39:33 -08:00
Wojciech Tyczynski d1e039b646 Merge pull request #18635 from timothysc/etcd_client_post_cleanup
Update to use latest etcd client library
2015-12-18 14:14:21 +01:00
Timothy St. Clair c505a5d49d Updating kubernetes proper to use latest etcd client library 2015-12-16 15:56:35 -06:00
nikhiljindal 2d952aaa87 Extracting APIServer machinery code into a library 2015-12-16 13:54:23 -08:00
deads2k d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
markturansky 4fc1bf1f23 Added PersistentVolumeController 2015-12-11 10:33:30 -05:00
Wojciech Tyczynski 0369805308 Merge pull request #18207 from wojtek-t/string_resource_version
Change resourceVersion to string in storage.Interface
2015-12-09 15:00:54 +01:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Wojciech Tyczynski 793da62c7f Change resourceVersion to string in storage.Interface 2015-12-07 09:22:59 +01:00
k8s-merge-robot 6479f5e93f Merge pull request #18136 from nikhiljindal/del-new-etcd-storage
Auto commit by PR queue bot
2015-12-03 04:10:00 -08:00
nikhiljindal 5c556baa2f Removing duplicate NewEtcdStorage code 2015-12-03 01:37:44 -08:00
Wojciech Tyczynski 6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
Marek Grabowski 813a4c9d19 Merge pull request #17819 from mqliang/eventValidate
remove TODO: There is no namespace required for node.
2015-12-03 09:22:06 +01:00
Marek Grabowski 99d4b9f1b7 Merge pull request #18068 from wojtek-t/fix_benchmark_integration
Fix compile errors in benchmark
2015-12-03 09:04:52 +01:00
mqliang 8547a5c1ae remove TODO: validate namespace 2015-12-03 08:56:17 +08:00
nikhiljindal 41ebe6f1a3 Cleaning up duplicate master config inits 2015-12-02 15:03:22 -08:00
k8s-merge-robot 8a8639d7af Merge pull request #17863 from wojtek-t/only_list_options_in_watch
Auto commit by PR queue bot
2015-12-02 06:28:28 -08:00
k8s-merge-robot 689586c6ae Merge pull request #16153 from gmarek/use_api_ports
Auto commit by PR queue bot
2015-12-02 05:57:49 -08:00
gmarek 459131fd92 Use KubeletPort reported in NodeStatus instead of cluster-wide master config, take 2. 2015-12-02 13:38:17 +01:00
Wojciech Tyczynski 6eb76b34d1 Fix compile errors in benchmark 2015-12-02 11:36:26 +01:00
Wojciech Tyczynski 8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
Wojciech Tyczynski d2dfc912e6 Simplify Watch() signature in clients. 2015-12-01 14:19:26 +01:00
k8s-merge-robot a836b1e261 Merge pull request #17326 from caesarxuchao/grooupVersion-lastest
Auto commit by PR queue bot
2015-12-01 05:05:40 -08:00
Chao Xu 6e192760e3 refactoring latest.go GroupVersion;
clean up latest.go GroupVersions;
remove latest.GroupMeta.Group;
remove latest.GroupMeta.Version.
2015-11-30 11:30:21 -08:00
k8s-merge-robot 69bb774dd4 Merge pull request #17798 from deads2k/gv-kubectl-01
Auto commit by PR queue bot
2015-11-30 07:40:40 -08:00
deads2k 1ac6d8afd3 update reaper, scaler, describer for GroupKind 2015-11-30 09:22:39 -05:00
harry 477da92002 Move hostIP detection from master to server
Add PublicAddress in test files

Move valid public addr into util
2015-11-30 16:17:37 +08:00
k8s-merge-robot 3ffc680be6 Merge pull request #13580 from ravigadde/sched-ext
Auto commit by PR queue bot
2015-11-25 12:26:16 -08:00
k8s-merge-robot 7f2f7aa091 Merge pull request #16432 from markturansky/recycler_race
Auto commit by PR queue bot
2015-11-25 11:54:06 -08:00
Ravi Gadde cadc24e9fd Scheduler extension 2015-11-25 08:19:27 -08:00
Wojciech Tyczynski b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
deads2k a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
k8s-merge-robot 7ad8bb1787 Merge pull request #17161 from soltysh/strip_reaper
Auto commit by PR queue bot
2015-11-17 05:45:35 -08:00
Maciej Szulik 64f778804d Remove string from Reaper.Stop signature 2015-11-17 12:09:08 +01:00
markturansky b9b8cf7fff Fixed race condition in pv binder 2015-11-12 13:55:09 -05:00
Wojciech Tyczynski 3df5d1dbc3 Move storage-related dirs under pkg/storage. 2015-11-12 19:49:32 +01:00
Wojciech Tyczynski f4d75e0a0a Support timeout in watch requests 2015-10-24 13:12:49 +02:00
nikhiljindal a0c038982e Fixing integrations test 2015-10-15 16:54:17 -07:00
nikhiljindal 7bcc4a6755 Allowing runtimeConfig to support enabling/disabling specific extension resources 2015-10-15 14:24:22 -07:00
k8s-merge-robot e6d98af05a Merge pull request #15202 from lavalamp/scheduler-speed-test
Auto commit by PR queue bot
2015-10-15 04:46:27 -07:00
Wojciech Tyczynski 66113539cb Remove duplicate code from test/integration 2015-10-14 12:11:53 +02:00
k8s-merge-robot ae9f7c8ff8 Merge pull request #15426 from zhengguoyong/adjust_package_name_pkgcontroller
Auto commit by PR queue bot
2015-10-13 06:05:23 -07:00
Timothy St. Clair 2a2a2d79ff New etcd client modifications part 1 (context support)
This commit plumbs contexts which are needed for the new client.
2015-10-12 08:45:49 -05:00
gmarek fb56afe4b4 HollowNode refactoring 2015-10-12 12:13:10 +02:00
eulerzgy 4ed5f9d240 adjust package name for pkg/controller directory 2015-10-12 09:51:27 +08:00
Chao Xu f3caff2a79 testapi.Experimental -> testapi.Extensions 2015-10-09 15:15:35 -07:00
Chao Xu 80f213c376 "experimental" -> "extensions" 2015-10-09 15:14:03 -07:00
Chao Xu 67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Chao Xu 0b7e3c7dd1 experimental/v1alpha1->extensions/v1beta1 2015-10-09 15:01:33 -07:00
k8s-merge-robot a4ac5ef564 Merge pull request #14302 from timstclair/prometheus-update
Auto commit by PR queue bot
2015-10-09 02:35:09 -07:00
Wojciech Tyczynski df79026b79 Extend resyncPeriods in controllers in production. 2015-10-08 09:10:09 +02:00
Daniel Smith 377e5c533b add scheduler integration benchmark 2015-10-06 18:15:21 -07:00
Tim St. Clair 8d49c8e29a Update prometheus libraries to new versions. 2015-10-06 12:56:14 -07:00
Wojciech Tyczynski 0f1cbe37a4 Events in separate etcd 2015-10-05 10:54:24 +02:00
deads2k 8db054651c plumb APIGroup to authorization attributes and test 2015-09-30 09:45:10 -04:00
Chao Xu ae1293418b move experimental/v1 to experimental/v1alpha1;
use "group/version" in many places where used to expect "version" only.
2015-09-24 15:32:11 -07:00
Eric Tune c340d664da Merge pull request #14046 from soltysh/job_controller_reaper_scaler
Reaper and scaler for jobs
2015-09-24 13:54:31 -07:00
Brendan Burns ec427f22b1 Disable race detection for all integration tests 2015-09-24 09:37:01 -07:00
Jerzy Szczepkowski c53df247c8 Merge pull request #14440 from brendandburns/flakes2
Increase some more timeouts to eliminate flakes
2015-09-24 10:23:34 +02:00
Brendan Burns d3379e72be Turn off race detection in the etcd tools test as etcd client isn't thread safe 2015-09-23 21:25:26 -07:00
Brendan Burns f529cc71ca Increase some more timeouts to eliminate flakes 2015-09-23 14:56:29 -07:00
Brendan Burns 77fd388485 Increase a bunch of timeouts to reduce flakes 2015-09-23 11:09:03 -07:00
Maciej Szulik 48775319d9 Reaper and scaler for jobs 2015-09-23 13:06:34 +02:00
markturansky f4232d3299 fixed code issues related to hasty test refactor 2015-09-22 14:44:31 -04:00
markturansky d2e8ec934c merged recycler+deleter tests so they run serially 2015-09-22 13:36:26 -04:00
markturansky 6dca2a4e7f removed flaky test. other integration tests (and many unit tests) also cover binding 2015-09-22 13:26:20 -04:00
saadali cd56b041f3 Fix #14284: TestPersistentVolumeClaimBinder flake 2015-09-21 19:21:06 -07:00
k8s-merge-robot 6c30a0e170 Merge pull request #13955 from caesarxuchao/API-discovery
Auto commit by PR queue bot
2015-09-21 14:01:36 -07:00
Chao Xu 1278771b34 let apiserver support api discovery 2015-09-21 12:20:24 -07:00
markturansky 9c7d03b2b6 added separate clients per caller in integration tests 2015-09-18 13:23:21 -04:00
k8s-merge-robot 434b768822 Merge pull request #13277 from uluyol/sv-detect-group
Auto commit by PR queue bot
2015-09-18 01:31:43 -07:00
Muhammed Uluyol f855e75805 Correctly do swagger validation with experimental.
Before we tried both groups, first api then experimental. If
experimental failed, the error message would be discarded and the
message for api would be shown. This commit changes this behavior so
that we detect which api group we should be using and only show the
error for that group.
2015-09-17 22:54:56 -04:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
k8s-merge-robot 055f5ff9b9 Merge pull request #13649 from markturansky/prov_deleter
Auto commit by PR queue bot
2015-09-17 12:59:45 -07:00
markturansky c2de9e9647 Added volume.Deleter interface and simple HostPath implementation 2015-09-17 12:08:58 -04:00
k8s-merge-robot 426d4a2477 Merge pull request #13945 from caesarxuchao/kube-api-prefix
Auto commit by PR queue bot
2015-09-16 18:43:55 -07:00
Chao Xu 9bef5ff99d register experimental apis as apis/experimental/..
mark --api-version as deprecated
2015-09-15 11:25:01 -07:00
markturansky 7bc55b5aea configurable pv recyclers 2015-09-15 12:48:25 -04:00
k8s-merge-robot bf641078eb Merge pull request #13785 from wojtek-t/minion_to_node_2
Auto commit by PR queue bot
2015-09-14 23:23:06 -07:00
Wojciech Tyczynski 53ae56f205 Replace "minion" with "node" in bunch of places. 2015-09-14 11:07:11 +02:00
Chao Xu f5023929d8 fix broken files after rebase 2015-09-12 15:45:12 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Daniel Smith ccd9e3e247 Run all automated tools 2015-09-11 16:11:08 -07:00
Daniel Smith 4c2adabf42 move; sed replace 2015-09-11 16:03:22 -07:00
Daniel Smith b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -07:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Timothy St. Clair 2b7e758c3c Fixes the experimental api, which appeared to be completely broken.
Fix for rebase with nikhiljindal/deploymentController
2015-09-03 21:56:45 -05:00
Clayton Coleman 02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04:00
Clayton Coleman 9267f829eb Update tests to prepare for graceful deletion
For cases where we want to immediately cleanup the pod, start using
gracePeriod 0 in test cases.
2015-08-19 22:20:29 -04:00
Robert Bailey 08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Clayton Coleman 89f1f3b1b8 Alter graceful deletion to not use TTL
Avoid TTL by deleting pods immediately when they aren't
scheduled, and letting the Kubelet delete them otherwise.

Ensure the Kubelet uses pod.Spec.TerminationGracePeriodSeconds
when no pod.DeletionGracePeriodSeconds is available.
2015-08-18 09:08:43 -04:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Muhammed Uluyol fab367230f Add experimental API support to kubectl 2015-08-11 16:49:55 -07:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
markturansky 8e0d391b1e Refactored persistent volume controllers to new packaging structure 2015-08-10 23:18:48 -04:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Alex Mohr 366b382901 Merge pull request #10200 from caesarxuchao/resthandler-validate-version
verify and default APIVersion in createHandler, verify APIVersion in UpdateResource
2015-08-04 13:09:31 -07:00
Alex Mohr 1311b9dce1 Merge pull request #11886 from gmarek/ratelimit
Auto commit by PR queue bot
2015-08-04 11:39:53 -07:00
Chao Xu 664d20c572 Add DecodeIntoWithSpecifiedVersionKind() to Decoder interface.
The function validate/default the body with the passed in apiVersion and Kind.
It's called in createHandler and UpdateResource
2015-08-03 15:30:00 -07:00
gmarek d27ad5b714 Controller codebase refactoring 2015-08-03 17:06:25 +02:00
gmarek 4cc0a2f117 Allow changing Schedulers RateLimitter setting during startup. 2015-08-03 15:27:19 +02:00
Muhammed Uluyol 58a875ac2c Add (stopgap) support for an experimental API prefix. 2015-07-30 18:14:29 -07:00
Wojciech Tyczynski 3cbbe72f9f Move etcd storage to pkg/storage/etcd 2015-07-30 15:42:06 +02:00
Wojciech Tyczynski 99d6b0e9f4 Rename storage interfaces 2015-07-30 10:34:57 +02:00
Wojciech Tyczynski d17985f1ad Move StorageInterface to pkg/storage. 2015-07-30 09:32:04 +02:00
Ananya Kumar 47dd0bc6f9 Refactor package controller 2015-07-29 09:54:35 -07:00
Wojciech Tyczynski 7ce51db40d Rename StorageInterface methods 2015-07-29 08:02:13 +02:00
Wojciech Tyczynski 9d943df397 Private EtcdHelper 2015-07-27 09:20:13 +02:00
Mike Danese 859f440f74 Merge pull request #11666 from wojtek-t/refactor_etcd_helper
Extract EtcdHelper interface
2015-07-24 11:07:46 -07:00
Mike Danese ae1c8e55ef Merge pull request #11737 from thockin/cleanup-remove-v1beta3
Remove v1beta3
2015-07-24 10:25:56 -07:00
Wojciech Tyczynski fdb3f45077 Extract EtcdHelper interface 2015-07-24 09:28:02 +02:00
Tim Hockin 1c3233a1d4 Remove v1beta3 2015-07-23 17:21:27 -07:00
nikhiljindal 1517b66001 Updating an error to apierror 2015-07-15 16:43:59 -07:00
nikhiljindal c465a50891 Stop exposing v1beta3 by default 2015-07-08 15:27:41 -07:00
nikhiljindal 2e9e46dd08 Updating scripts to use v1 instead of v1beta3 2015-07-01 00:23:16 -07:00
nikhiljindal e0d48d4983 Support both GET and POST methods for /exec and /portforward 2015-06-29 16:01:01 -07:00
Mike Danese 56bde3342a add ca to token controller and all service accounts 2015-06-24 15:10:20 -07:00
Mike Danese 44d5815663 fix broken integration tests 2015-06-19 10:57:46 -07:00
Chao Xu a309d3e652 Update pkg/api/testapi because namespace is always in the path since we remove v1beta1/2 2015-06-16 14:12:03 -07:00
Chao Xu ef61b031f5 make v1 enabled by default 2015-06-04 11:37:44 -07:00
Brian Grant e7788771d6 Merge pull request #9030 from brendandburns/kubectl
Add a custom timeout flag for stop/delete.
2015-06-03 21:14:50 -07:00
Brendan Burns ab0c9b8e1e Add a custom timeout flag for stop/delete. Also try to be smarter about setting the timeout. 2015-06-03 11:21:30 -07:00
Chao Xu 89c8949e78 add v1 to hack/test-integration.sh 2015-06-02 14:55:45 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 984692d205 Verify in hack/test-cmd 2015-06-01 19:24:01 -04:00
Chao Xu 9c1153322e update PodSpec.Host to PodSpec.NodeName in /pkg/api/types.go and /pkg/api/v1beta3/types.go 2015-05-28 14:10:06 -07:00
Anastasis Andronidis 9e3a540940 rename resize to scale 2015-05-27 19:08:06 +02:00
Brian Grant 2c81050e6f Merge pull request #8457 from davidopp/master
Fix stylistic isues with #5547. Closes #4910.
2015-05-19 07:43:21 -07:00
David Oppenheimer 44b1e1ca0c Fix stylistic isues with #5547. Closes #4910. 2015-05-18 23:32:06 -07:00
Tim Hockin f66ca25d9f Rename AccessMode to PersistentVolumeAccessMode 2015-05-18 17:21:30 -07:00
Daniel Smith 5e056f119d Merge pull request #6694 from bprashanth/bench
Add a simple master benchmark and a wrapper to run it.
2015-05-18 14:42:24 -07:00
Victor Marmol 45874d5f76 Merge pull request #5547 from gmarek/client3
Add a resource specifying number of Pods that are allowed to run on Kubelet.
2015-05-18 11:11:43 -07:00
Clayton Coleman 3b10d82864 Merge pull request #8391 from liggitt/etcd_token_lookup
Make serviceaccount/token lookup more flexible
2015-05-18 11:08:30 -04:00
Jordan Liggitt d90e7409e4 Prevent auth recursion for service account tokens 2015-05-16 23:39:07 -04:00
Jordan Liggitt 7e9281fc39 Allow ServiceAccountsController to manage multiple named service accounts 2015-05-15 23:42:00 -04:00
Prashanth Balasubramanian 4200033c0a Add a simple master benchmark and a wrapper to run it. 2015-05-15 17:30:17 -07:00
gmarek 27d660d0ac Add a resource specifying number of Pods that are allowed to run on Kubelet. 2015-05-15 10:57:46 +02:00
markturansky 0191574f7e Bi-directional bind between pv.Spec.ClaimRef and pvc.Spec.VolumeName 2015-05-13 14:05:21 -04:00
Jordan Liggitt 92bd58ede6 ServiceAccount e2e/integration tests 2015-05-11 17:18:06 -04:00
Clayton Coleman 8755ea8ec9 Merge pull request #7704 from smarterclayton/parallel_allocator
Use etcd to allocate PortalIPs instead of in-mem
2015-05-11 09:56:10 -04:00
Wojciech Tyczynski 9b6ef98469 Merge pull request #8035 from shawnps/patch-9
Fix Sprintf verb
2015-05-11 12:43:01 +02:00
Shawn Smith 5d5c660f4b Add missing Errorf formatting directives 2015-05-10 13:25:14 +09:00
Shawn Smith 5b0d4d72ba Fix Sprintf verb 2015-05-10 13:22:18 +09:00
Clayton Coleman 5bcb96dae1 Separate out the master's control loops
These are "Bootstrap Controllers" as distinct from
the controllers in the controller-manager binary - they
are necessary for the cluster to start running.
2015-05-08 16:04:03 -04:00
Clayton Coleman e200d5a317 Make PortalIP alloc HA
* Add an allocator which saves state in etcd
* Perform PortalIP allocation check on startup and periodically afterwards

Also expose methods in master for downstream components to handle IP allocation
/ master registration themselves.
2015-05-08 13:34:16 -04:00
Daniel Smith 6ab51f3bc0 Merge pull request #7668 from bprashanth/scheduling_minions
Scheduler ignores nodes that are in a bad state
2015-05-07 10:58:02 -07:00
Prashanth Balasubramanian 4b0607cf0b Scheduler ignored nodes with unknown condition status 2015-05-06 18:32:52 -07:00
Karl Beecher 0473f652fd Add startup code to apiserver to migrate etcd keys
Refs: #3476
2015-05-05 12:28:14 +02:00
Clayton Coleman c8e0f4d2ae Metrics tests can't run on Mac 2015-05-04 14:57:43 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Piotr Szczesniak 11a2dc496f Added TerminationGracePeriod field to PodSpec and grace-period flag to kubectl stop
Those are changes which touch users required by Termination Notice

Addresses #6804
2015-04-30 18:00:33 +02:00
nikhiljindal f864195a5b Returning 404 on invalid server URL 2015-04-27 16:15:52 -07:00
Daniel Smith 83093af8b0 Merge pull request #5707 from endocode/kbeecher/etcd_prefix
Adds ability to define a prefix for etcd paths
2015-04-27 13:37:43 -07:00
markturansky a04420e548 Added pending phase for volumes. added defaults for PV/PVC. refactored to better phase transitioning in control loops 2015-04-27 12:05:12 -04:00
markturansky 37d7f3f4f1 Added integration test, fixed a validation issue 2015-04-27 12:05:12 -04:00
Karl Beecher a7623ca6cc Adds ability to define a prefix for etcd paths
The API server can be supplied (via a command line flag) with a custom
prefix that is prepended to etcd resources paths.

Refs: #3476
2015-04-24 12:12:39 +02:00
nikhiljindal dcc368c781 Removing more references to v1beta1 from pkg/ 2015-04-24 00:45:17 -07:00
Daniel Smith 2fa3ae9f15 fix watch of single object 2015-04-23 16:02:22 -07:00
Zach Loafman 7e875a0f1c Merge pull request #7167 from pmorie/typo
Fix typo in secrets integration test
2015-04-22 09:17:11 -07:00
Paul Morie d381db1778 Fix typo in secrets integration test 2015-04-22 10:54:54 -04:00
Ravi Gadde bf8f258471 Added field selector for listing pods. 2015-04-21 06:33:28 -07:00
Masahiro Sano f90dc8f413 use Watch for single object instead of WatchList 2015-04-21 08:00:52 +09:00
Wojciech Tyczynski 329d41828f Integration tests for unschedulable nodes. 2015-04-20 12:53:40 +02:00
Alex Robinson fe262c0d98 Add an integration test that checks for the metrics we expect to be exported
from the master.
2015-04-17 19:31:23 +00:00
nikhiljindal 8874ef9c06 Updating test/integration to use testapi.Version everywhere 2015-04-15 00:00:17 -07:00
Sam Ghods 2c977db1b3 Implement Strategic Merge Patch in apiserver 2015-04-03 11:51:02 -07:00
Dawn Chen 6ac59c8969 Merge pull request #6257 from lavalamp/fix6
Add a test verifying that etcd watches work even when there's a bunch of unrelated changes
2015-04-02 14:00:20 -07:00
Daniel Smith a3276577d8 Demonstration of etcd watch problem 2015-04-02 13:41:41 -07:00
Piotr Szczesniak 5c6439d449 Removed PodStatus.Host
Fixes #6165
2015-04-02 16:38:45 +02:00
nikhiljindal 478b7d5edf Repurposing enableV1beta3 to disableV1beta3 in master config to enable v1beta3 by default 2015-03-30 11:50:10 -07:00
Quinton Hoole c8f6761fe9 Merge pull request #5686 from erictune/security-roadmap
Added integration test of secrets.
2015-03-26 11:16:00 -07:00
Rohit Jnagal 49ff04765b Add validation for node creation. 2015-03-25 21:55:03 +00:00
Eric Tune ce05702136 Added integration test of secrets.
Tests apiserver side functionality.

Also deleted dead code in auth_test.go.
2015-03-25 12:37:47 -07:00
Masahiro Sano 7c5481c11a return 200 instead 409 Conflict 2015-03-26 02:44:43 +09:00
Masahiro Sano 410e11c305 port endpoints to generic etcd 2015-03-25 22:15:19 +09:00
Clayton Coleman 1b1866d836 Invalid JSON in examples and tests 2015-03-20 00:02:03 -04:00
Clayton Coleman 428d2263e5 Graceful deletion of resources
This commit adds support to core resources to enable deferred deletion
of resources.  Clients may optionally specify a time period after which
resources must be deleted via an object sent with their DELETE. That
object may define an optional grace period in seconds, or allow the
default "preferred" value for a resource to be used. Once the object
is marked as pending deletion, the deletionTimestamp field will be set
and an etcd TTL will be in place.

Clients should assume resources that have deletionTimestamp set will
be deleted at some point in the future.  Other changes will come later
to enable graceful deletion on a per resource basis.
2015-03-19 15:33:32 -04:00
nikhiljindal 7e36bbab3c Updating integration tests to test both API versions - v1beta1 and 3 2015-03-18 15:24:11 -07:00
Clayton Coleman bddef32193 Prepare EtcdHelper to extract more data from Node
In order to support graceful deletion, the resource object will
need access to the TTL value in etcd.  Also, in the future we
may want to get the creation index (distinct from modifiedindex)
and expose it to clients.  Change EtcdResourceVersioner to be
more type specific (objects vs lists) and provide a default
implementation that relies on the internal API convention.

Also, rename etcd_tools.go to etcd_helper.go and split a few
things up.
2015-03-16 15:33:50 -04:00
Timothy St. Clair 7eebf674d4 Update to option enable profiling on the master daemon processes.
--profiling=true , default is false
2015-03-13 10:45:01 -05:00
Mike Danese 46ec580771 add PATCH to apiserver 2015-03-10 10:56:15 -07:00
Mike Danese e1ca63f569 SetObj and CreateObj optionally accept an object to fill with the result of the get 2015-03-04 10:38:42 -08:00
Mike Danese 9ae18cc96e Only log on failing cases in auth integration test 2015-03-03 10:26:00 -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 d167c11b59 Remove layers of indirection between apiinstaller and resthandler
Make the RESTHandler feel more go-restful, set the stage for adding
new types of subresource collections.
2015-02-11 16:26:06 -05:00
saadali a41f520bf0 Add "Update Event" to Kubernetes API 2015-02-05 00:07:51 -08:00
deads2k 8a2fe9bd2b modify policy to correctly identify resource versus kind 2015-02-04 13:36:01 -05:00
nikhiljindal 18609e1706 Moving /watch, /proxy and /redirect registration to go-restful 2015-02-03 15:47:48 -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
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
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
derekwaynecarr d3579f0de0 Fix integration test to return 404 where a resource is not even supported 2015-02-02 10:26:19 -05: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
saadali e83fd7b8e7 Make master service IP static (no longer randomly assigned) 2015-01-30 16:07:19 -08:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -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
nikhiljindal 521728e920 Deleting OperationHandler for handling /operation endpoint on server 2015-01-28 13:13:10 -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
nikhiljindal de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
Clayton Coleman 455bc17616 Some actions now return 405 in integration auth_test.go 2015-01-12 12:56:01 -05:00
derekwaynecarr a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr 1e2b995a79 Fix admission control in tests 2015-01-07 14:42:31 -05:00
Eric Tune 029a9b6400 Remove whoami handler.
This was a temporary thing.  Not aware of anyone using it.
2014-12-11 21:31:06 -08:00
Clayton Coleman d0087dfe62 Integration tests don't initialize with a client
Result is a 500 error if the client object is used
2014-12-10 12:08:18 -05:00
Tim Hockin ff8c5f9415 Add a Detail field to Validation Error 2014-11-24 17:28:42 -08:00
Brendan Burns e1872b9bb3 Revert part of #2512, shot in the dark that it will fix integration tests 2014-11-20 21:56:06 -08:00
Tim Hockin 95a9098311 fix 'go vet' warnings 2014-11-21 09:45:28 +08:00
Jordan Liggitt c895331277 Make master take authenticator.Request interface instead of tokenfile 2014-11-19 15:07:51 -05:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Deyuan Deng c20ceea170 Add more validation for updating node. 2014-11-17 13:42:31 -05:00
Deyuan Deng cc310e0e71 Support node label update. 2014-11-17 13:42:31 -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
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
Eric Tune 913cbd0fd1 Make deletes synchronous to avoid 202.
Also, get some POSTs I missed the last time.
2014-11-06 16:48:56 -08:00
Eric Tune f739103de9 POST synchronously so following GET will succeed.
Should reduce flakiness of this test.
2014-11-05 21:40:27 -08:00
Eric Tune 6e81e8c896 Basic ACL file.
Added function to read basic ACL from a CSV file.
Added implementation of Authorize based on that file's policies.
Added docs on authentication and authorization.
Added example file and tested it.
2014-11-05 16:06:22 -08:00
Daniel Smith c971763be2 Add anon. functions so that defers are executed where expected. 2014-11-05 14:42:37 -08:00
Daniel Smith 78d0e74b20 Clean up auth test slightly 2014-11-05 14:31:18 -08:00
Eric Tune 1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Eric Tune 3045035512 Get user from request and put in authz attribs.
Added integration tests for user-based auth.
2014-11-03 16:38:56 -08:00
Eric Tune 795bc7f976 Require a KubeletClient in master.New().
Without this, tests which create a master
will panic with a nil pointer when the periodic
podCache update runs.

Deleted unused FakePodInfoGetter.
Added FakeKubeletClient.
Passed to master.New.
Required a KubeletClient in master.New.
2014-11-03 16:09:41 -08:00
Dawn Chen cccf98cd61 Fix TestAuthModeAlwaysAllow.
Fix #2137
2014-11-03 09:46:45 -08:00
Eric Tune 4b74be0f06 Improve integration test
Use some constants for tokens.
Refactor tokenfile creation to function.
Reorder some test cases to make lookups follow creates so they succeed.
Add expected status code to test cases (some are not quite what expected,
so filed bugs #2112, #2113, #2114)
Check expected status codes.
Close Body after each iterations so that we don't run out of file handles
  when I add even more test cases in the next PR.
Handle that it is unpredictable whether status 200 or 202 is returned.
2014-11-02 16:31:20 -08:00
Eric Tune 55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Eric Tune 9713b58caa Allocate mux in master.New()
Callsites no longer allocate a mux.
Master now exposes method to install handlers
which use the master's auth code.  Not used
but forks (openshift) are expected to use these
methods.  These methods will later be a point
for additional plug-in functionality.
Integration tests now use the master-provided
handler which has auth, rather than using the mux,
which didn't.  Fix TestWhoAmI now that /_whoami
sits behind auth.
2014-10-29 14:31:07 -07:00
Daniel Smith 070c6c0440 Fix missing portalNets in tests once and for all by adding a default. 2014-10-29 12:27:35 -07:00
Daniel Smith 35bd8d4a11 Add e2e and integration tests. 2014-10-29 11:29:57 -07:00
Eric Tune f7ebc7d0d5 Added /_whoami and integration test for auth(z|n)
Added new endpoint /_whoami for debugging authentication.
Added integration test which checks that a user is authenticated
using token authentication.
Rearranged initialization of authenticator to support preceeding.
2014-10-28 09:33:45 -07:00
Eric Tune 40a5ca034d Integration test on master, not just apiserver.
Moved code from cmd/apiserver to pkg/master.

test/integration/client_test made to use a master object,
instead of an apiserver.Handle.

Subsequent PRs will move more handler-installation into
pkg/master, with the goal that every http.Handler of a
standalone apiserver process can also be tested
in a "testing"-style go test.

In particular, a subsequent PR will test
authorization.
2014-10-27 09:14:58 -07:00
derekwaynecarr ce30b2657a Fix integration tests 2014-10-24 11:49:04 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith 5d24820dd5 Merge pull request #1464 from hmrm/add-etcd-config
Allow etcd config file to be passed to apiserver, kubelet, and proxy
2014-10-08 16:29:46 -07: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
Haney Maxwell 4d87159eda Allow etcd config file to be passed to apiserver, kubelet, and proxy 2014-10-07 14:25:54 -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
derekwaynecarr 0a290506c2 Fix integration tests 2014-10-02 12:56:42 -04: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 de1f94cbc7 Fix integration test 2014-09-30 14:31:17 -04:00
Daniel Smith 37e505601e add self linking to apiserver 2014-09-26 15:08:02 -07:00
Daniel Smith f211e46f20 handle watch errors everywhere 2014-09-22 17:37:12 -07:00
Clayton Coleman 5483333e29 Allow server and client to take api version as argument
* Defaults to v1beta1
* apiserver takes -storage_version which controls etcd storage version
  and the version of the client used to connect to other apiservers
* Changed signature of client.New to add version parameter
* All controller code and component code prefers the oldest (most common)
  server version
2014-09-18 23:27:28 -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
Clayton Coleman 154a91cd33 Rename runtime.DefaultScheme to latest.Codec for ease of readability 2014-09-16 16:19:35 -04:00
Clayton Coleman fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Daniel Smith fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Daniel Smith 1c2b65788d Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names 2014-09-07 22:19:24 -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 099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Clayton Coleman 818f357128 Client should validate the incoming host value
Convert host:port and URLs passed to client.New() into the proper
values, and return an error if the value is invalid.  Change CLI
to return an error if -master is invalid.  Remove Client.rawRequest
which was not in use, and fix the involved tests. Add NewOrDie

Preserves the behavior of the client to not auth when a non-https
URL is passed (although in the future this should be corrected).
2014-08-28 13:47:36 -04:00
Clayton Coleman 47c7c83dad Add a client integration trip that creates a pod 2014-08-28 09:59:11 -04:00
Daniel Smith 6b69ed402b Change 'sendCreate' to 'sendAdd'; integration passes. 2014-08-25 15:56:55 -07:00
Clayton Coleman b037989478 Add an integration test for etcd 2014-08-23 11:44:21 -04:00