Commit Graph

2782 Commits (42aba643290c19a63168513bd758822e8014a0fd)

Author SHA1 Message Date
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