Commit Graph

2771 Commits (274c9976d24011c4bafae260aef7d75352893a14)

Author SHA1 Message Date
derekwaynecarr 74f368f50e Modified LimitRangeItem.Kind to LimitRangeItem.Type, added example files 2015-01-27 16:41:28 -05:00
derekwaynecarr 31a1145abd Implement LimitRanger plugin 2015-01-27 16:41:27 -05:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
davidopp a3e057d5d9 Merge pull request #3544 from mikedanese/provider-run-opt
Configure scheduler algorithm provider with cli option
2015-01-16 12:41:09 -08:00
Mike Danese 9f4c42e988 name and key are used interchangably in plugin/pkg/scheduler/factory/plugins.go. this standardizes on name. 2015-01-15 17:30:48 -08:00
bgrant0607 7095fed5b9 Merge pull request #3539 from mikedanese/algorithm-name-validation
added algorithm name validation
2015-01-15 17:21:58 -08:00
Mike Danese 9dffd0c105 added algorithm name validation 2015-01-15 16:59:02 -08:00
Mike Danese e3da5e15bc added algorithm provider cli option to the kube-scheduler command and renamed default provider to follow naming convention 2015-01-15 16:27:25 -08:00
Joe Beda 224ffa4567 Merge pull request #3480 from jbeda/all_pflag
Convert all main binaries to pflag library
2015-01-15 11:26:41 -08:00
Eric Tune bc25748b36 Merge pull request #3472 from derekwaynecarr/default_cpu_mem
Admission control plugin for resource defaults
2015-01-15 09:35:17 -08:00
Joe Beda 6bd6b905f5 Address code review comments
Add some documentation.
Create new util.InitFlags() function to merge and parse in one step.
2015-01-15 09:12:20 -08:00
Joe Beda dcd00c936e Move all kubernetes to posix flags 2015-01-15 09:12:19 -08:00
davidopp 2675cfa16b Merge pull request #2906 from abhgupta/abhgupta-dev
Enhancements to scheduler priority functions
2015-01-14 21:47:28 -08:00
derekwaynecarr eed64d2bd0 Add a doc.go to resourcedefaults 2015-01-14 20:52:01 -05:00
saadali 90dfdcecd5 Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd.  To fix these
# errors, run gofmt -s -w <file>, or cut and paste the following:
#   gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go
#
# Your commit will be aborted unless you override this warning. To
# commit in spite of these format errors, delete the following line:
#   COMMIT_BLOCKED_ON_GOFMT
2015-01-14 14:17:16 -08:00
derekwaynecarr 7f724867c2 Admission control plugin for resource defaults 2015-01-14 15:28:59 -05:00
Deyuan Deng 153dbd30a3 Filter out unhealthy node in scheduler 2015-01-13 17:09:07 -05:00
Abhishek Gupta 6fd0b181e3 Rebased onto the latest changes to the scheduler code 2015-01-13 09:41:25 -08:00
Abhishek Gupta 9e75a05df0 Implementing PR feedback 2015-01-13 09:34:45 -08:00
Abhishek Gupta 3f722a3d8e Adding service affinity predicate 2015-01-13 09:34:45 -08:00
Abhishek Gupta 9dd7d2a0a1 Adding label checker predicates and test cases 2015-01-13 09:34:45 -08:00
Abhishek Gupta 04db076e5f Enhancements to scheduler priority functions
- Modified the existing spreading priority to consider service pods explicitly
 - Added a new priority function to spread pods across zones
2015-01-13 09:34:42 -08:00
Clayton Coleman b38c25ebf4 Shorten scheduler/factory test by making backoff a struct var 2015-01-09 13:16:30 -05:00
Tim Hockin 4fcd496d59 change everything to use new util/errors 2015-01-08 22:10:03 -08:00
Eric Tune c2b3d678c0 Merge pull request #3248 from derekwaynecarr/admission_control_hooks
Implement basic admission control framework
2015-01-07 16:52:49 -08:00
Daniel Smith 963000715a Merge pull request #3294 from erictune/public_storetoers
Move Listers to pkg/client/cache.
2015-01-07 15:56:14 -08:00
Eric Tune ed74197fde Move Listers to pkg/client/cache.
I would like to use these in kubelet and kube-proxy.
This is the minimal change to get them moved.
I will follow up with changes to make interfaces consistent
and add Listers for other resources.
2015-01-07 15:33:17 -08:00
Clayton Coleman b03fbf90f8 Make RESTClient more generic to API version, simplify version handling
RESTClient is an abstraction on top of arbitrary HTTP endpoints that
follow the Kubernetes API conventions. Refactored RESTClientFor so that
assumptions that are Kube specific happen outside of that method (so
others can reuse the RESTClient). Added more validation to client.New
to ensure clients give good input. Exposed APIVersion on RESTClient
as a method so that wrapper code (code that adds typed / structured
methods over rest endpoints like client.Client) can more easily make
decisions about what APIVersion it is running under.
2015-01-07 18:03:34 -05:00
Tim Hockin d314862e46 Merge pull request #3285 from erictune/public_reflectors
Make Reflector helpers reusable.
2015-01-07 14:10:57 -08:00
Eric Tune 7d5ac856c5 Make Reflector helpers reusable.
Scheduler uses Reflector from pkg/client/cache.
It defines some helper classes.
I'd like to use those helpers with pkg/client/cache
in kube-proxy and kubelet too.
2015-01-07 13:49:37 -08:00
derekwaynecarr a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr 2820c2c601 Add plugin tests 2015-01-07 14:42:31 -05:00
derekwaynecarr 5ceffe2625 Add tests to ensure resthandler invokes admission control 2015-01-07 14:42:31 -05:00
derekwaynecarr 520ae3ef27 Implement basic admission control framework 2015-01-07 14:42:31 -05:00
Rohit Jnagal 62ecd5f3ff Fix few vet errors.
There are quite a few 'composite literal uses unkeyed fields' errors that I have kept out of this patch.
And there's a couple where vet just seems confused. These are the easiest ones.
2015-01-07 08:40:16 +00:00
Dawn Chen e3c019128e Add EventSource to api to have both Component and Host information. 2015-01-06 16:08:20 -08:00
Daniel Smith 9c2cd55528 Merge pull request #3181 from smarterclayton/cleanup_http_items
Minor cleanups to request - fix initialism on HTTPClientFunc
2014-12-30 17:34:00 -08:00
Clayton Coleman 502204ad6d Do not set empty field or label selectors on requests
Default behavior for "" is already "everything"
2014-12-30 19:33:40 -05:00
Clayton Coleman e355f54eda Update references from Path() to the appropriate segment use 2014-12-29 15:38:52 -05:00
Clayton Coleman c9501128b6 Scheduler is printing the wrong value when no default algorithms available 2014-12-24 00:01:54 -05:00
Daniel Smith 36cfc02c6c Merge pull request #3066 from derekwaynecarr/client_update
Do not use namespace in url paths pre v1beta3 from client
2014-12-19 18:02:55 -08:00
derekwaynecarr abb6632d75 Do not use namespace in url paths pre v1beta3 from client 2014-12-19 16:32:42 -05:00
Brendan Burns 2e17193161 Add Host to PodSpec and add a predicate to make the scheduler work. 2014-12-18 20:12:29 -08:00
Daniel Smith 3ade280f89 Merge pull request #2813 from derekwaynecarr/ns_url
Move namespace from query param to path part
2014-12-18 13:31:45 -08:00
Mike Danese 4850bdbe63 refactor scheduler factory to use plugin architecture style like credentialprovider and cloudprovider for configuring priority functions and fit predicates 2014-12-17 14:55:28 -08:00
derekwaynecarr 7cf664439f Move namespace from query param to path part 2014-12-16 15:55:47 -05:00
George Kuan 5e1fc1f4e0 Fixes #1605: make ErrorList introspectable by replacing ErrorList and
ErrorList#ToError with []error and util.SliceToError() respectively
2014-12-12 10:56:31 -08:00
Clayton Coleman 19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Brendan Burns 953fa540ee Merge pull request #2505 from abhgupta/abhgupta-dev
Scheduler changes for extensibility
2014-12-09 15:25:37 -08:00
Jordan Liggitt 09ba404fb7 x509 request authenticator 2014-12-09 09:34:16 -05:00
Abhishek Gupta d17cebcd2a Implementing PR feedback and adding test cases 2014-12-08 14:47:05 -08:00
Abhishek Gupta 5fa1dbc07b Implementing PR feedback
- Making ConfigFactory struct public
 - Added comments for predicate/priority functions and new methods
2014-12-08 14:47:05 -08:00
Abhishek Gupta 13831856c9 Combining scheduler priority functions using weighted averages 2014-12-08 14:47:05 -08:00
Abhishek Gupta 7f374030c1 Fixing gofmt errors 2014-12-08 14:47:05 -08:00
Abhishek Gupta 1eb28b0aa3 Scheduler changes to allow multiple priority functions 2014-12-08 14:47:05 -08:00
Abhishek Gupta 6b712cc700 Scheduler changes for extensibility 2014-12-08 14:47:05 -08:00
deads2k d8d889ef73 add union auth request handler 2014-11-26 10:51:23 -05:00
Jordan Liggitt 3532be3c82 Add basicauth and password authenticators 2014-11-24 17:52:10 -05:00
Eric Tune 3aa35e1941 Fix typo. 2014-11-21 09:02:14 -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
Joe Beda 66d287f7e4 Merge branch 'rename-to-kube' of https://github.com/eparis/kubernetes into eparis-rename-to-kube
* 'rename-to-kube' of https://github.com/eparis/kubernetes:
  rename kube server binaries to kube-

Conflicts:
	docs/salt.md
2014-11-17 09:52:10 -08:00
Daniel Smith 3cf022786e fix up event client for namespaces 2014-11-14 09:43:28 -08:00
Eric Paris a99c3c7963 rename kube server binaries to kube-
apiserver becomes kube-apiserver
controller-manager -> kube-controller-manager
scheduler and proxy similarly.

Only thing I promise is that right now hack/build-go.sh and
build/release.sh exit with 0.  That's it.  Who knows if any of this
actually works....
2014-11-13 20:08:26 -05:00
Paul Morie e2be1564a4 Rename client/cache Store.Contains to ContainedIDs 2014-11-11 11:48:15 -05:00
Brendan Burns 2c1221864d Make a standalone binary. 2014-11-10 13:34:11 -08:00
Daniel Smith 25bd151d86 Make fieldPath part of getting a reference rather than part of making an event. 2014-11-05 15:09:14 -08:00
markturansky 119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
deads2k 48b26e2dfc fix pod scheduling retry logic 2014-11-04 08:04:48 -05:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Brendan Burns 83715dd7be Turn on node constraint scheduling. 2014-10-27 12:18:27 -07:00
derekwaynecarr 580cb5ea4f Rework client.Interface 2014-10-24 11:47:30 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 7550c146dc Replace struct initializers for TypeMeta with ObjectMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith 82bbcee8d9 Move port definitions to their own package 2014-10-20 11:28:12 -07:00
derekwaynecarr 085ca40291 Enforce unique constraint at namespace boundary in etcd, make client and server namespace aware 2014-10-16 13:02:52 -04:00
Eric Tune 6f577aa321 Merge pull request #1789 from lavalamp/eventing4
Add event creation library and implement in scheduler.
2014-10-15 15:55:26 -07:00
Daniel Smith d4c750a878 Fix vet-go.sh and some things it complained about 2014-10-15 11:56:19 -07:00
Daniel Smith 10214457b7 Make scheduler emit events 2014-10-15 11:42:05 -07:00
Brendan Burns 47c4b8fc98 Add a predicate for persistent disk scheduling. 2014-10-13 15:38:25 -07:00
Brendan Burns ddfda0521a Merge pull request #1763 from lavalamp/scheduler
Use cache for minion lookups, don't hammer apiserver
2014-10-13 15:33:29 -07:00
Daniel Smith d34914517f Shorten 'CodecForVersionOrDie' name, add 'ResourceVersioner' to testapi 2014-10-13 14:58:06 -07:00
Daniel Smith 0431f2430d Use cache for minion lookups, don't hammer apiserver 2014-10-13 14:46:31 -07:00
Dawn Chen 135d187942 Merge pull request #1736 from brendandburns/scheduler
Switch away from the static node info
2014-10-10 15:01:09 -07:00
Brendan Burns e6fa568ad4 Switch away from the static node info 2014-10-10 14:08:09 -07:00
Brendan Burns b5ec8a747b Switch on the resource requested prioritization. 2014-10-09 11:29:45 -07:00
Brendan Burns 4230a8ca61 Add a least-requested priority function 2014-10-08 15:31:38 -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
Daniel Smith cf203f1304 Fix build error in integration test 2014-10-07 13:10:58 -07:00
Brendan Burns fcdefb5d30 Merge pull request #1613 from ghodss/fix_infinite_scheduler_crash
Prevent scheduler from crashing infinitely if apiserver is unreachable
2014-10-07 12:46:42 -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
Sam Ghods 16641757ef Prevent scheduler from crashing infinitely if apiserver is unreachable 2014-10-06 19:28:23 -07:00
Tim Hockin 0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
bgrant0607 fea58c9b88 Merge pull request #1561 from brendandburns/sleep
Add some backoff to the scheduler to prevent tight-looping.
2014-10-03 15:29:12 -07:00
Brendan Burns 1551b48347 Add a resource fit scheduler predicate. Set sensible defaults. 2014-10-03 15:09:59 -07:00
Brendan Burns 53304bd024 Add a backoff policy for failing pods. 2014-10-03 10:03:55 -07:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00
derekwaynecarr 02e1a2e79d Update unit tests to pass a context on client create 2014-09-30 14:27:56 -04:00
derekwaynecarr b7b1193919 Add context object to kubecfg/client 2014-09-30 14:27:19 -04:00
Tim Hockin a7a46f71aa Merge pull request #1449 from brendandburns/scheduler
Refactor scheduler, use generic scheduler everywhere, delete old code.
2014-09-26 12:18:52 -07:00
Brendan Burns 1bb962961c Refactor schedulers, remove schedulers, use generic scheduler. 2014-09-26 10:26:25 -07:00
Clayton Coleman 4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04: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
Daniel Smith 3f659f7d74 Plumb pkg/client/cache changes into scheduler 2014-09-16 16:17:16 -07: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
Brendan Burns 99f7a4f25d Add healthz handlers to the controller manager and scheduler 2014-09-12 21:13:33 -07:00
Daniel Smith fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Tim Hockin 8ad98db773 Merge pull request #1121 from filbranden/rawversion2
Add support for -version=raw
2014-09-02 13:53:13 -07:00
Daniel Smith a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith 099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Filipe Brandenburger 1d8067450c Rename `pkg/version/flag` to `pkg/version/verflag`
This avoids some conflict with the built-in `flag` module in Go. The
module was already being renamed to `verflag` on import anyways, so we
might as well just call it that.

Tested:
- hack/build-go.sh and ran the resulting binaries with -version args.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-29 23:19:32 -07:00
Daniel Smith dd862a7c53 Fix flaky scheduler factory test. 2014-08-28 20:32:20 -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
Daniel Smith 0a1dfa366e Make integration test pass. 2014-08-25 11:59:00 -07:00
Daniel Smith 03cd22d4f4 Handle errors slightly more intelligently 2014-08-20 16:50:02 -07:00
Daniel Smith 8a9eaf911f For testability & reuse, move scheduler setup into its own package. 2014-08-20 16:50:02 -07:00
Daniel Smith b2349bc66a Change scheduler to poll for minions 2014-08-20 15:32:49 -07:00
Daniel Smith dddad888b5 Begin scheduler plugin 2014-08-20 15:32:49 -07:00