Commit Graph

2264 Commits

Author SHA1 Message Date
Daniel Smith
6ef6ff5bc5 Merge pull request #1893 from crhym3/fix-1149-req-body
Replace custom ProxyServer (kubecfg/kubectl -proxy) with httputil.ReverseProxy
2014-10-22 15:29:59 -07:00
Haney Maxwell
3160500940 Refactor kubelet access and add SSL 2014-10-22 14:53:59 -07:00
Clayton Coleman
bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman
fa4e186e54 Merge pull request #1911 from erictune/token_client
Handle auth files with BearerToken sections.
2014-10-21 14:08:42 -04:00
alex
fb2b15a797 Replace custom proxy with httputil.ReverseProxy for kubecfg/kubectl.
Fixes #1149 - kubecfg proxy "411 Length Required" error on POST/PUT.
2014-10-21 18:52:18 +01:00
Eric Tune
21dae01005 Handle auth files with BearerToken sections. 2014-10-20 17:02:03 -07:00
Tim Hockin
e8686429c4 Merge pull request #1916 from lavalamp/fix
Add read-only, rate limited endpoint
2014-10-20 16:42:46 -07:00
Daniel Smith
9356ed7fe7 Add read-only, rate limited endpoint 2014-10-20 16:32:52 -07: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
Tim Hockin
e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -07: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
Sam Ghods
4b220f8b0a kubectl: kubecfg rewrite for better modularity and improved UX 2014-10-15 15:29:54 -07:00
Daniel Smith
595d4b4abd Merge pull request #1676 from anguslees/openstack-provider
Add OpenStack cloud provider
2014-10-15 12:05:33 -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
68a784439b Add event listing and printing to kubecfg 2014-10-15 11:42:06 -07:00
Angus Lees
a8ab55b413 Add skeleton for new OpenStack cloud provider 2014-10-15 13:52:12 +11:00
Brendan Burns
8d38f8890e Add an e2e test in go. Also adjust validation logic a little to make it more reasonable.
Not integrated into existing e2e yet.
2014-10-14 16:43:00 -07:00
Tim Hockin
6820e068f1 Merge pull request #1700 from lavalamp/eventing2
Add Event Registry/REST types
2014-10-13 16:16:29 -07:00
Daniel Smith
8007614085 Remove untested and unused code 2014-10-13 16:06:44 -07:00
Daniel Smith
0431f2430d Use cache for minion lookups, don't hammer apiserver 2014-10-13 14:46:31 -07:00
Daniel Smith
15680731f7 Add event endpoint to apiserver 2014-10-10 15:47:34 -07:00
Daniel Smith
a292d8c416 Merge pull request #1667 from hmrm/add-kubelet-disable-flags
Allow disabling non-necessary kubelet and apiserver endpoints
2014-10-10 13:38:11 -07:00
derekwaynecarr
9e60bf1e43 Pod cache needs to be namespace-aware 2014-10-10 09:35:31 -04:00
Haney Maxwell
c0bf974871 Allow disabling non-necessary kubelet and apiserver endpoints 2014-10-09 16:49:27 -07:00
Brendan Burns
227311a05d Add URL opening to kubecfg. 2014-10-09 12:26:24 -07:00
Daniel Smith
1fc92bef53 Load cadvisor connection in background. 2014-10-08 17:06:41 -07: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
Daniel Smith
cf203f1304 Fix build error in integration test 2014-10-07 13:10:58 -07:00
erictune
5503e95c1d Merge pull request #1529 from smarterclayton/add_auth_interfaces
Add simple Bearer authenticator filter for Kube
2014-10-07 11:23:41 -07:00
Clayton Coleman
897c59a713 Merge pull request #1598 from brendandburns/nginx
Add UX documentation, link into the apiserver, add a missing file.
2014-10-07 14:06:20 -04:00
Clayton Coleman
c8ef4b8230 Add simple Bearer authenticator filter for Kube
* Default file based implementation
* Define some simple interfaces
* Add -token_auth_file to apiserver that will start the apiserver
  with a request filter for tokens
2014-10-07 13:25:12 -04:00
Brendan Burns
414473607a Update the UX, add documentation. 2014-10-07 09:49:49 -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
Tim Hockin
eb24c997e4 Merge pull request #1606 from lavalamp/fix
Try to fix flakiness by increasing timeouts
2014-10-06 17:22:51 -07:00
Daniel Smith
a744623948 Try to fix flakiness by increasing timeouts, because that is always the best way to perform such a fix. 2014-10-06 17:14:34 -07:00
Brendan Burns
ab6065944c Merge pull request #1584 from thockin/net
Flag-compatible IP type
2014-10-06 13:35:48 -07:00
Daniel Smith
cc086908aa Merge pull request #1578 from brendandburns/controller
Extract the service controller from the apiserver.
2014-10-06 12:44:41 -07:00
Tim Hockin
0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
Johan Euphrosine
f91162cf78 kubelet: add --runonce flag, exits after starting pod from the manifest 2014-10-03 18:02:30 -07:00
Deyuan Deng
a9e7cf8e40 Fix integration test read volume dir error. 2014-10-03 19:51:07 -04:00
Brendan Burns
e6991d0a66 Extract the service controller from the apiserver, put it in the controller manager for now. 2014-10-03 15:27:22 -07:00
Brendan Burns
1551b48347 Add a resource fit scheduler predicate. Set sensible defaults. 2014-10-03 15:09:59 -07:00
Brendan Burns
f00fd8d2e3 Add an integration test for services. 2014-10-02 21:07:06 -07:00
Tim Hockin
f7db0bc674 Merge pull request #1546 from smarterclayton/allow_configurable_net_image
Allow configurable Kubelet net image for isolated networks
2014-10-02 17:11:32 -07:00
Clayton Coleman
6881db64a9 Allow configurable Kubelet net image for isolated networks
Public access to the DockerHub is not guaranteed in all environments,
add a flag to the kubelet that allows it to use a different image (like
one on a private registry) as well as only pull the first time the
image is needed.

Fixes #1545
2014-10-02 15:56:03 -04:00
erictune
0a2e208e8f Merge pull request #1538 from smarterclayton/allow_skip_tls_verify
Allow clients to skip TLS verification
2014-10-02 11:49:40 -07:00
derekwaynecarr
0a290506c2 Fix integration tests 2014-10-02 12:56:42 -04:00
derekwaynecarr
fc67d822c6 Add context as parameter to client interface functions 2014-10-02 12:51:36 -04:00
Clayton Coleman
7af3c7d75e Allow clients to skip TLS verification
Adds -skip_tls_verify to any API server client. Also store in auth
2014-10-02 12:08:58 -04:00
Brendan Burns
c3d2517371 Re-add the ability to load certs from the config file. 2014-10-01 17:10:07 -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
de1f94cbc7 Fix integration test 2014-09-30 14:31:17 -04:00
derekwaynecarr
b7b1193919 Add context object to kubecfg/client 2014-09-30 14:27:19 -04:00
Dawn Chen
a208fbfcf4 Merge pull request #1476 from brendandburns/print
Add the ability to print objects that are parsed in, without sending them anywhere.
2014-09-29 09:12:53 -07:00
Tim Hockin
1c02af3d16 Kill LivenessProbe.Type 2014-09-27 21:16:30 -07:00
Brendan Burns
8f1643bc0c Add the ability to print objects that are parsed in, without sending them anywhere. 2014-09-26 20:35:12 -07:00
Brendan Burns
3ac706a32e Add a rate limiter, use it to rate limit docker pulls. 2014-09-26 11:55:21 -07:00
Daniel Smith
bb0cd95a83 fix non-gofmt'd things 2014-09-24 14:27:10 -07:00
Tim Hockin
8b6de5af83 Merge pull request #1390 from smarterclayton/allow_stdin
Allow STDIN to kubecfg via `-c -`.
2014-09-22 16:49:55 -07:00
Clayton Coleman
b9028753b0 Merge pull request #1387 from lavalamp/fix4
Don't pass empty labels (looks weird to POST with a label set)
2014-09-22 16:41:01 -04:00
Clayton Coleman
de9dc08e55 Allow STDIN to kubecfg via -c -.
Follows the `tar xvf -` convention (because all the other conventions
are crazier?)
2014-09-20 18:40:00 -04:00
Daniel Smith
4aecdce258 Don't pass empty labels (looks weird to POST with a label set) 2014-09-19 16:04:55 -07:00
Brendan Burns
8dff6f12d7 Add authenticated TLS support to the client. 2014-09-19 15:43:23 -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
ca5355908f Expose v1beta2 API group 2014-09-18 23:24:05 -04:00
Brendan Burns
dc5a4a8c3f Refactor to clean up names. 2014-09-16 15:19:02 -07:00
erictune
506f51b186 Merge pull request #1330 from brendandburns/privilege
Only allow privileged containers if API server flag set.  Adds capabilities package.
2014-09-16 15:12:26 -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
fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Brendan Burns
5b9e2a55b5 Add a flag to reject privileged containers in the apiserver. 2014-09-16 11:22:32 -07:00
Kelsey Hightower
9cd0fc70f1 apiserver does not require a cloud provider or machine list
Currently the apiserver will not start unless a machine list or a
valid cloud provider is specified. This prevents a workflow that
manages machines solely through the minions API.

Fix the issue by changing the apiserver to only log a message that
the apiserver is being started with an empty machine list.

This patch results in a change in behavior. The apiserver will no
longer exit non-zero if a cloud provider or machine list is not
configured.
2014-09-15 11:13:17 -07:00
Clayton Coleman
24b5b7e8d3 Merge pull request #1296 from brendandburns/healthz
Add healthz handlers to the controller manager and scheduler
2014-09-15 11:28:02 -04:00
Brendan Burns
99f7a4f25d Add healthz handlers to the controller manager and scheduler 2014-09-12 21:13:33 -07:00
Daniel Smith
6eeb967d3d Merge pull request #1229 from ragnard/aws-provider
Initial impl. of cloud provider for AWS
2014-09-12 15:16:47 -07:00
Daniel Smith
1853c66ddf Merge pull request #1298 from jwforres/cors_fixup
Remove unused enable_cors flag and allow localhost without a port as an ...
2014-09-12 10:51:25 -07:00
Jessica Forrester
2dc30aa932 Remove unused enable_cors flag and allow localhost without a port as an origin in local-up-cluster 2014-09-12 13:01:32 -04:00
Brendan Burns
46d0cbd645 Add a global flag to enable/disable privileged containers 2014-09-12 09:56:45 -07:00
Tim Hockin
bc9a290241 Merge pull request #1218 from bcwaldon/docker-auth
Authenticated docker pulls, pt. I
2014-09-11 22:53:36 -07:00
Ragnar Dahlén
b548465adf Initial impl. of cloud provider interface for AWS 2014-09-11 22:28:56 +01:00
Daniel Smith
6757b402d5 Merge pull request #1133 from jwforres/enable_cors
Add option to enable a simple CORS implementation for the api server
2014-09-11 13:59:14 -07:00
Brian Waldon
0bf4fabc19 kubelet: move docker-related code into sub-package 2014-09-11 13:12:28 -07:00
Daniel Smith
b5c6edcd79 Merge pull request #1189 from simon3z/ovirt-cloud
Add support for oVirt cloud provider
2014-09-11 09:50:31 -07:00
Federico Simoncelli
320fd528e2 Add support for oVirt cloud provider
This patch adds the initial support for the oVirt cloud provider.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-09-11 13:08:46 +00:00
brendandburns
4f8536dd80 Merge pull request #1211 from derekwaynecarr/kubecfg_improve_c_option
Add support to fetch config file from network
2014-09-10 13:06:03 -07:00
Filipe Brandenburger
b849d65b32 Uniformize handling of -server_version flag of kubecfg to match -version.
In particular, add support for -server_version=raw and use matching
format for the output of -version and -server_version.

The "normal" format is essentially defined by (version.Info) String()
method, so future updates to that method will be reflected on both.

Full version information is still available by using the "raw" flag.

Tested:
- Used cluster/kubecfg.sh to query local build and the server.

    $ cluster/kubecfg.sh -version
    Kubernetes version 0.2+, build 9316edfc0d2b28923fbb6eafa38458350859f926
    $ cluster/kubecfg.sh -server_version
    Server: Kubernetes version 0.2, build a0abb38157
    $ cluster/kubecfg.sh -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-25-g9316edfc0d2b28", GitCommit:"9316edfc0d2b28923fbb6eafa38458350859f926", GitTreeState:"clean"}
    $ cluster/kubecfg.sh -server_version=raw
    version.Info{Major:"0", Minor:"2", GitVersion:"v0.2", GitCommit:"a0abb3815755d6a77eed2d07bb0aa7d255e4e769", GitTreeState:"clean"}

Fixes: #1092

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-09 15:25:41 -07:00
derekwaynecarr
35a50a94da Add support to fetch config file from network 2014-09-09 17:50:38 -04:00
Jessica Forrester
0cac1c5f79 Switch LogOf from panicking when logger is missing to creating logger with the defaults.
Update CORS tests to a table-based test and cover more cases.
2014-09-09 17:50:18 -04:00
Jessica Forrester
becf6ca4e7 Move RecoverPanics to be the top level wrapped handler. Add new method to be sure a logger has been generated instead of assuming one has. Move regexp list compilation into a utility and pass regexp list into CORS. 2014-09-09 17:50:18 -04:00
Jessica Forrester
8b4ca9c2a7 Move CORS handler wrapping into cmd/apiserver and switch config flag to a list of allowed origins 2014-09-09 17:50:18 -04:00
Jessica Forrester
8723eece49 Add option to enable a simple CORS implementation for the api server 2014-09-09 17:50:18 -04:00
csrwng
6551f4e0f0 Use codec to encode/decode api objects in client and kubecfg parser 2014-09-09 08:45:53 -04:00
Brian Ketelsen
83d3da1436 changed address variable to bindAddress. Used net.JoinHostPort() instead of fmt.Sprintf() 2014-09-07 23:50:36 -07:00
Brian Ketelsen
34922226fd allow proxy to accept a listen address. fixes #1220 2014-09-07 23:27:43 -07:00
Federico Simoncelli
6add1993c9 Support configurations for cloudproviders
Cloud providers may need specific configurations to run properly (e.g.
authentication parameters, uri, etc.).

This patch adds the simplest implementation for passing configurations
to cloudproviders: a new apiserver -cloud_config flag to specify the
path to an arbitrary configuration file.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-09-08 21:46:53 +00: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
Joe Beda
e5fe8270a1 Improve 'Usage' for kubecfg 2014-09-04 13:25:39 -07:00
Joe Beda
f8e2f927f6 Pretty up the demo a little.
Use images and some better formatting.  Also add scripts to help prevent typos.

This based on an improved version done by Julia Ferraioli.  She came up with the cool images.
2014-09-04 13:25:39 -07:00
Joe Beda
45aaff9993 Add template update to rollingUpdate 2014-09-04 13:25:38 -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
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
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
e840062c65 Delete all keys prior to running integration test 2014-08-28 09:58:39 -04:00
Joe Beda
2ea2c55d16 Fix e2d tests w/ http prefix in kube client init 2014-08-27 16:53:57 -07:00
Clayton Coleman
9006eadcfe kube-proxy can read config from the apiserver
All clients that talk to a "master" as a host:port or URL
(scheme://host:port) parameter.  Add tests.
2014-08-27 15:49:01 -04:00
Daniel Smith
0a1dfa366e Make integration test pass. 2014-08-25 11:59:00 -07:00
Clayton Coleman
286c3c543c Improve the wait.Poll GoDoc and api
Add more tests, and switch to timeouts instead of cycles.
Deflake TestPoller
2014-08-23 12:18:03 -04:00
Daniel Smith
025ba881b1 Don't shadow important variables. 2014-08-21 17:55:48 -07:00
brendandburns
8f5dd8cf63 Merge pull request #984 from thockin/make_vs_new
Rename a bunch of "Make" functions to "New"
2014-08-20 22:06:57 -07:00
Tim Hockin
0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
brendandburns
1bd4ae0c62 Merge pull request #943 from smarterclayton/only_wait_for_acceptance
Clients must wait for completion of actions
2014-08-20 21:01:21 -07:00
Tim Hockin
f7d54390f9 Make cloud providers be plugins 2014-08-20 20:16:41 -07:00
Tim Hockin
eb9f3394c5 Move VagrantCloud into its own pkg 2014-08-20 20:16:41 -07:00
Tim Hockin
b23bef26eb Move GCECloud into its own pkg 2014-08-20 20:16:41 -07:00
Clayton Coleman
493863eb93 Return immediately when controllers/pods are committed
Add client waiting conditions.
2014-08-20 18:46:10 -04:00
Clayton Coleman
34031dbc6a Remove excessive waiting in kubelet etcd loop
Listen to etcd longer, and wait a shorter time before reconnecting.
No longer an argument to the source.
2014-08-20 18:46:10 -04:00
derekwaynecarr
fd8741edf2 Refactor kubelet to use http.ServeMux 2014-08-20 16:08:08 -05:00
csrwng
14714f2638 Allow kubecfg to print custom types 2014-08-20 12:23:02 -04:00
brendandburns
bd53643647 Merge pull request #851 from derekwaynecarr/cloud_provider
Vagrant supports a cloud provider
2014-08-18 18:23:49 -07:00
Tim Hockin
e472752ff9 Merge pull request #875 from brendandburns/exec
Add a in container exec based health check.
2014-08-18 12:19:22 -07:00
Brendan Burns
0caae9c1d4 Add a in container exec based health check. 2014-08-18 12:00:11 -07:00
derekwaynecarr
8df21b84a1 Add vagrant cloudprovider 2014-08-18 14:30:31 -04:00
Clayton Coleman
0df89fee48 Make global http timeout longer than most operations
We have a few long running operations today (sync=true, watch) that
exceed the original default http.Server timeout.  We should set the
timeout to a high enough limit that more granular controls can be
implemented.
2014-08-18 13:32:29 -04:00
Daniel Smith
26e2256178 Remove unused and not completely correct code 2014-08-15 18:20:37 -07:00
csrwng
5538bfca01 Allow kubecfg to parse other types via initialization map 2014-08-14 18:14:12 -04:00
Clayton Coleman
bbf3b55e76 Extract RESTHandler and allow API groupings
Prepare for running multiple API versions on the same HTTP server
by decoupling some of the mechanics of apiserver.  Define a new
APIGroup object which represents a version of the API.
2014-08-13 10:53:34 -04:00
Daniel Smith
85ff1d3e7f Add fake client to make testing easier. 2014-08-08 14:09:13 -07:00
Clayton Coleman
d7f46718a8 Kubelet should have a max think time before auto resync
The sync frequency should be part of the syncLoop and resync no
less often than every X seconds.  The current implementation runs
even if a config update was delivered less than X seconds ago.
2014-08-07 10:40:03 -04:00
Tim Hockin
adc9bb9451 Clarify flags for info server startup
Make a distinct flag to enable/disable the server.  Comment on the address
flag.
2014-08-06 17:28:41 -07:00
Daniel Smith
e75854a1f9 Merge pull request #759 from brendandburns/valid
Add c-identifier validation to service ids.
2014-08-05 12:32:02 -07:00
brendandburns
cc4300c3ec Merge pull request #757 from lavalamp/repCtl
Remove etcd dep from controller manager
2014-08-05 11:47:31 -07:00
Brendan Burns
20a8f03d62 Add dns-952-identifier validation to service ids. 2014-08-05 11:40:48 -07:00
Robert Bailey
8671d69f34 Minor style fixes and keep the test manifest in sync. 2014-08-04 16:14:43 -07:00
Daniel Smith
b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07:00
Brendan Burns
1101c00014 Make updates atomic from the client side. 2014-08-01 16:47:25 -07:00
Yuki Yugui Sonoda
331fd0d986 Extract "pkg/version".PrintAndExitIfRequested() to its own package
because it causes a runtime panic if a binary which has its own implementation
of "-version" flag tries to reuse a package library which indirectly depend on
"pkg/version".

e.g. If such an user-defined binary tires to link "pkg/api" or "pkg/client",
the binary fails with a runtime panic "flag redefined: version".
2014-08-01 15:05:27 +09:00
Daniel Smith
928092e79e Etcd watcher verification
To make sure the etcd watcher works, I changed the replication
controller to use watch.Interface. I made apiserver support watches on
controllers, so replicationController can be run only off of the
apiserver. I made sure all the etcd watch testing that used to be in
replicationController is now tested on the new etcd watcher in
pkg/tools/.
2014-07-31 14:54:30 -07:00
Victor Marmol
4de48613e7 Change cAdvisor port to 4194.
This is so it doesn't conflict with the default registry address of
5000.
2014-07-31 13:14:00 -07:00
Yuki Yugui Sonoda
c65ac62cdd Allow omitting -machines flag in apiserver when -cloud_provider and
-minion_regexp are specified because it is eventually overwritten by
-minion_regexp.
2014-07-31 14:38:54 +09:00
Filipe Brandenburger
7e56609139 Handle -version flag on all commands
Tested: Passed -version argument to kubelet (and all other binaries):
  $ output/go/bin/kubecfg -version
  Kubernetes version 0.1, build 6454a541fd56

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:56 -07:00
Daniel Smith
3b8488028d Add /version to server and check it in client.
Will help detect client/version skew and prevent e2e test from passing
while running a version other than the one you think it's running.
2014-07-28 15:45:25 -07:00
Daniel Smith
c92e8d38b6 Merge pull request #642 from kelseyhightower/cleanup_master_configs
Add master.Config type and cleanup master configuration
2014-07-28 12:53:31 -07:00
brendandburns
f073cee13b Merge pull request #636 from kelseyhightower/load_auth_info_tests
kubecfg: improve tests around authentication
2014-07-28 10:44:27 -07:00
Kelsey Hightower
1ca199379f kubecfg: improve tests around authentication
This change adds additional test coverage for the kubecfg
command. There is now a test for the case when the auth info
file does not exist. LoadAuthInfo tests have been refactored
to use table testing.
2014-07-26 22:21:17 -07:00
Kelsey Hightower
6d1be5f0ee Add master.Config type and cleanup master configuration
Setting up a new master.Master instance requires passing
around too many arguments.

Add a master.Config type and group related master configs.
Refactor all commands to instantiate new masters using a
master.Config struct.
2014-07-26 22:07:24 -07:00
Kelsey Hightower
7a7dfeb85b integration: Fix multiple response.WriteHeader calls
The current integration tests do not return after delegating
HTTP requests, as a result an extra call to response.WriteHeader
is made for every request.

Fix the issue by returning after delegating HTTP requests.
2014-07-26 16:09:15 -07:00
Brendan Burns
bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00
Jonathan Boulle
c43035088b assorted formatting and typo fixes 2014-07-24 15:10:36 -07:00
Danny Jones
bfa4642055 Adds a flag to specify root working directory.
--root_dir specifies the directory kubelet will use for it's
procedures. Currently used for volume mounts.
2014-07-24 13:04:05 -07:00
Clayton Coleman
586a9f4356 Restore behavior of trimming / from kubecfg url
Also make the output and validation of input better for kubecfg api calls.
Kubecfg will now display a usage argument if the URL is incorrect or an
unrecognized storage type is passed.
2014-07-23 11:16:41 -04:00
Brendan Burns
cf486a53b6 Change a != to a < to fix kubecfg. 2014-07-22 22:45:17 -07:00
Daniel Smith
ec0f639a21 Merge pull request #551 from erictune/private_kubelet
Private kubelet
2014-07-22 18:58:43 -07:00
Clayton Coleman
fbd7bc375f kubecfg doesn't allow updates because of path checks
Check for 1 path segment on create/list, 2 on update/delete, and
allow any number of path segments on get (for now).

Also pretty prints the list of actual types that are supported for
create/update, which today corresponds to the list of types that
are supported period.
2014-07-22 20:25:06 -04:00
Eric Tune
ded67ead1e Make Kubelet type members private and provide New functions. 2014-07-22 14:40:59 -07:00
Brendan Burns
6c734b1c55 integrate minion health checking and caching. 2014-07-21 21:52:33 -04:00
Clayton Coleman
7767c2a2ac Switch the Kubelet to use kubelet/config
Also transfer the Kubelet from using ContainerManifest.ID to source specific
identifiers with namespacing.  Move goroutine behavior out of kubelet/ and
into integration.go and cmd/kubelet/kubelet.go for better isolation.
2014-07-21 21:27:26 -04:00
Daniel Smith
d02e4d6036 Merge pull request #537 from kelseyhightower/kubecfg_comments
clean up code comments for the kubecfg command
2014-07-20 10:59:45 -07:00
Kelsey Hightower
5e8326bd1d clean up code comments for the kubecfg command
This patch removes unnecessary code comments and improves the comment
for the readConfig function.
2014-07-20 08:36:20 -07:00
Kelsey Hightower
dc7ee7c333 normalize -etcd_servers flag across all commands
The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.

This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.

This patch should be 100% backwards compatible with no changes in behavior.
2014-07-20 07:48:47 -07:00
Tim Hockin
4aa1f04b08 Break out small functions in cmd/kubelet 2014-07-19 22:03:46 -07:00
Daniel Smith
05f01a3654 Revert "assorted formatting and typo fixes" 2014-07-18 17:16:30 -07:00
Daniel Smith
211f6b312f Merge pull request #520 from jonboulle/master
assorted formatting and typo fixes
2014-07-18 17:15:30 -07:00
Brendan Burns
59da62e2a1 Address comments. 2014-07-18 14:27:50 -07:00
Brendan Burns
c6255afe37 Make the service reconciller use the API, not a PodRegistry 2014-07-18 13:54:33 -07:00
Jonathan Boulle
9e63c3a633 assorted formatting and typo fixes 2014-07-18 13:02:59 -07:00
Clayton Coleman
17053f5950 Merge pull request #465 from smarterclayton/simplify_config_for_reuse
Extract proxy/config common functions for reuse
2014-07-16 18:28:07 -04:00
Clayton Coleman
021cf64808 Change proxy config to reuse util/config
Splits endpoint and service configuration into their own objects.  Also makes
the endpoint and service configuration tests correct - there was a race condition
previously that meant tests were passing but not checking correct code.
2014-07-16 14:13:25 -04:00
Yuki Yugui Sonoda
edac5ce0b8 Fixes golint errors in pkg/kubelet 2014-07-15 22:56:31 +09:00
Brendan Burns
b2ef24fb48 Address comments. 2014-07-14 21:39:22 -07:00
Brendan Burns
f7bd5a6f0f Add a template printer to kubecfg. 2014-07-14 21:13:06 -07:00
Brendan Burns
5bf0820580 Fix integration tests. 2014-07-11 14:24:54 -07:00
brendandburns
40c71e8292 Merge pull request #372 from yugui/feature/golint
Fixes Go lint errors.
2014-07-08 12:55:41 -07:00
Tim Hockin
92cf6662ed Merge pull request #351 from discordianfish/use-api-for-pull
Use api for pulling images instead of shelling out
2014-07-08 09:08:12 -07:00
Johannes 'fish' Ziemke
3fa6c9671d Use docker client lib instead of binary for pulls 2014-07-08 12:21:39 +02:00
Yuki Yugui Sonoda
c25f44c137 Fixes golint errors in cmd/. 2014-07-08 16:08:24 +09:00
Brendan Burns
a77248eb6f Add some more logging to better understand integration test timeouts. 2014-07-07 13:57:25 -07:00
Brendan Burns
e3838e1153 Make poll period and timeout configurable.
Make poll period short for integration testing.
2014-07-07 10:13:27 -07:00
Daniel Smith
3b9735d787 Test atomic PUTs, and make them work.
Improve apiserver/logger.go's interface (it's pretty cool now).

Improve apiserver's error reporting to clients.

Improve client's handling of errors from apiserver.

Make failed PUTs return 409 (conflict)-- http status codes are amazingly
well defined for what we're doing!
2014-07-02 15:42:05 -07:00
Daniel Smith
969586a214 Add logging, fix crash
Crash was in kublet_server when fake docker client gives it nil pointer.
2014-07-01 17:38:07 -07:00
Daniel Smith
bf3b34c2e9 Allow master's pod info getter to be faked. Wire up in integration tests in futile attempt to make travis pass. 2014-07-01 17:08:32 -07:00
Daniel Smith
587fb75a7a rearrange RunKubelet's parameters so that address and port are next to each other 2014-07-01 16:47:37 -07:00
Daniel Smith
d523ccb428 Change error printing for easier debugging 2014-07-01 16:41:09 -07:00
Daniel Smith
b820e026f6 Improve logging. 2014-07-01 14:02:14 -07:00
Daniel Smith
50bbf39925 improvements to integration test organization 2014-07-01 14:02:14 -07:00
Brendan Burns
4d6a783e5f Initial add of an environment variable for the kubernetes master. 2014-07-01 10:12:38 -07:00
brendandburns
d53c56dd29 Merge pull request #314 from thockin/valid2
Fix examples to set manifest ID and version
2014-06-30 20:21:32 -07:00
brendandburns
65a62278b1 Merge pull request #286 from lavalamp/exampleEtcd
Separate scheduler from registry
2014-06-30 20:17:07 -07:00
Tim Hockin
9affd6d260 Fix examples to set manifest ID and version
Part 4 in a series of changes towards data validation.
2014-06-30 16:16:06 -07:00
Daniel Smith
011ce9d871 Add crash handler bypass for testing. 2014-06-29 12:35:43 -07:00
Tim Hockin
6c79937a42 Reduce logging noise
Don't use %#v for errors.
Do use %+v when more detail than %v is needed.
Fix typos Kublet -> Kubelet.
2014-06-28 22:16:26 -07:00
Daniel Smith
134f44e3fa Merge pull request #276 from brendandburns/minion
Initial integration of the cloud based minion registry.
2014-06-27 22:56:47 -07:00
Brendan Burns
431fcac8b0 Initial integration of the cloud based minion registry. 2014-06-27 22:49:27 -07:00
Daniel Smith
b21facafb1 Merge pull request #273 from brendandburns/kubelet
Make the docker endpoint a flag.
2014-06-27 17:09:25 -07:00
Brendan Burns
f8060c5b3d Make the docker endpoint a flag. 2014-06-27 17:01:12 -07:00
Daniel Smith
9a0f89170e Fix comments. Add timeout to integration test; don't make travis run for 15 minutes any more. 2014-06-27 15:40:23 -07:00
Brendan Burns
b25f950362 Use etcd compare and swap to update the list of pods, to remove a race. 2014-06-27 11:09:36 -07:00
Justin Huff
253a783365 Remove localkube 2014-06-26 11:52:23 -07:00
Daniel Smith
c97c514742 Rename cloudcfg to kubecfg 2014-06-25 18:01:37 -07:00
Justin Huff
1c32df4aac Fix cloudcfg duplicate flag error 2014-06-24 22:05:27 -07:00
Tim Hockin
9f9e75f508 Switch to glog for logging, bridge logging to glog.
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
  s/log.Printf/glog.Infof/
  s/log.Print/glog.Info/
  s/log.Fatalf/glog.Fatalf/
  s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*

Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog.  Pass glog-wrapped
Loggers to etcd for logging.

Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.

The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Daniel Smith
f7968ce00b Make integration test the manifest url feature. Make kubelet's docker pull command testable. 2014-06-24 16:57:35 -07:00
Daniel Smith
fd66a8b59b Readability fixes & address review comments. 2014-06-24 15:16:21 -07:00
Daniel Smith
6900431b13 Add kubelet testing to integration test. Test that kubelet makes the requested containers. Check that the url manifest feature works. 2014-06-24 15:14:40 -07:00
Daniel Smith
568631e765 Merge pull request #217 from brendandburns/demo
Create a proxy server using cloudcfg.  Useful for demos
2014-06-24 12:01:04 -07:00
Daniel Smith
07a431f713 Fix duplicated path. 2014-06-24 11:51:14 -07:00
Brendan Burns
8b50e45dcc Update the proxy server. 2014-06-24 11:25:45 -07:00
Brendan Burns
5756189f0d Added a proxy server to cloudcfg 2014-06-24 11:15:08 -07:00
Daniel Smith
5ce54bb77b Use new method. 2014-06-24 09:38:22 -07:00
Daniel Smith
61a494d303 First step of combination. 2014-06-24 09:38:22 -07:00
Tim Hockin
7218a4d165 Clarify config file code to be clear that it handles directories. ...
… Add a check for IsRegular() before reading a config path.  Add a comment
about exec.Command("hostname", "-f").
2014-06-23 21:14:15 -07:00
brendandburns
974d3f3999 Merge pull request #180 from lavalamp/master
Make minions first class citizens
2014-06-23 19:52:00 -07:00
Daniel Smith
79ee5aa250 Implement minion registry. Minions now a first-class object. 2014-06-23 13:27:52 -07:00
Daniel Smith
6ccd9b2361 Move to new file. Build and tests pass. 2014-06-23 13:24:27 -07:00
Daniel Smith
b1d8a41049 Add new api usage mechanism. 2014-06-23 13:24:26 -07:00
brendandburns
49c25a4e28 Merge pull request #196 from lavalamp/marshal
Make api able to marshal its types correctly
2014-06-23 13:22:52 -07:00
Daniel Smith
b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Daniel Smith
41534c1cc5 Encode/decode working everywhere now. 2014-06-23 09:54:17 -07:00
Justin Huff
c9473431fb Localkube wasn't seeding it's random number generator, leading to
conflicting docker container names.
2014-06-21 11:48:16 -07:00
Justin Huff
d204f76484 Add config dir support to kubelet 2014-06-20 09:31:52 -07:00
brendandburns
e031c193a3 Merge pull request #164 from lavalamp/master
Standardize terminology on "selector"
2014-06-19 13:55:27 -07:00
Daniel Smith
bc02b3c21a Rename [label] query to selector 2014-06-19 13:31:42 -07:00
Brendan Burns
302ec0f37b Wire in the pod cache. Just used for List for now. 2014-06-18 22:26:35 -07:00
Brendan Burns
420b2fdd57 Add support for populating host ip address. 2014-06-18 14:57:50 -07:00
Daniel Smith
d8206503b8 Make integration/localkube work with new controller library 2014-06-18 13:10:39 -07:00
Daniel Smith
e74ac01a62 Move run logic into package 2014-06-18 13:10:39 -07:00
Daniel Smith
a24116c7bd Move controller to it's own package, it's not part of the registry. 2014-06-18 13:10:39 -07:00
Brendan Burns
2759b2367f Add load balancing support to services. 2014-06-17 12:37:39 -07:00
Daniel Smith
ea5cbd44bb Refactor apiserver command; move logic to a package for reuse and eventual testing 2014-06-15 23:30:58 -07:00
Daniel Smith
f3734260d5 Readability improvements. 2014-06-15 23:30:58 -07:00
brendandburns
4adaee01dd Merge pull request #118 from lavalamp/master
Alternative local launch script.
2014-06-15 22:27:23 -07:00
Brendan Burns
7ded6945c1 Added a -verbose flag, and made a message verbose only. 2014-06-15 20:53:21 -07:00
Daniel Smith
a047dc4930 No underscores in variable names. Add option to set hostname at command line. 2014-06-15 10:24:36 -07:00
gleamglom
dd045544b0 Add more help messages to cloudcfg utility 2014-06-13 13:16:27 -07:00
brendandburns
f053a49988 Merge pull request #71 from brendandburns/container_info
Fix some problems in container info handling if the container's no present.
2014-06-12 20:17:05 -07:00
brendandburns
4a8c53e7bd Merge pull request #74 from danielnorberg/dano/cloudcfg-start
cloudcfg: resize <name> <replicas> command
2014-06-12 20:16:31 -07:00
Daniel Smith
74fd0c1a58 Usability improvements 2014-06-12 17:23:28 -07:00
Daniel Smith
853a4e26a8 Call parsing code from cloudcfg 2014-06-12 17:23:28 -07:00
Johan Euphrosine
4f6bed03ae gofmt -s pkg/ cmd/ 2014-06-12 14:16:19 -07:00
Daniel Norberg
339623736d cloudcfg: resize <name> <replicas> command 2014-06-12 17:07:06 -04:00
Brendan Burns
8f8c31e5cf Fix localkube due to a bad merge. 2014-06-12 13:20:16 -07:00
Daniel Smith
ac65cc7094 Address comments 2014-06-12 09:35:04 -07:00
Daniel Smith
69acbf5a74 Fix build 2014-06-12 09:35:04 -07:00
Daniel Smith
7c17db672e Move hostname detection logic to allow replacement 2014-06-12 09:35:04 -07:00
Daniel Smith
187f7d2534 cloudcfg working locally now 2014-06-12 09:35:04 -07:00
Daniel Smith
8178240bbe Add a binary and scripts for running a local kubernetes cluster. 2014-06-12 09:35:04 -07:00
Joe Beda
02d9cf2eb9 Merge pull request #69 from brendandburns/scheduler
Fix the first fit scheduler to randomize.
2014-06-11 21:29:51 -07:00
Daniel Smith
59d9763a52 remove package name, not needed here 2014-06-11 17:20:16 -07:00
Brendan Burns
5563459178 Fix the first fit scheduler to randomize. 2014-06-11 17:11:48 -07:00
brendandburns
f453de3a92 Merge pull request #58 from dsymonds/patch-1
Change flag.Duration descriptions to be unit-free.
2014-06-11 07:04:21 -07:00
David Symonds
86d34996b4 Change flag.Duration descriptions to be unit-free.
flag.Duration permits different durations, not just seconds.
2014-06-11 16:29:36 +10:00
David Symonds
7f3989f91b Change flag.Duration descriptions to be unit-free.
flag.Duration permits different durations, not just seconds.
2014-06-11 16:29:35 +10:00
Julius Volz
f6c4dd2332 Make cloudcfg method switch idiomatic. 2014-06-10 23:42:59 +02:00
Brendan Burns
83c5b2c578 Add some extra log info. 2014-06-10 09:43:04 -07:00
Brendan Burns
3d0231e0f8 Add a couple of printers. 2014-06-08 23:05:56 -07:00
Brendan Burns
5cb4444176 Task -> Pod #4, the final chapter 2014-06-08 23:00:12 -07:00
Brendan Burns
6018497174 Task -> Pod part #3 2014-06-08 22:38:45 -07:00
Brendan Burns
66e2575f2b More Task -> Pod 2014-06-08 21:43:17 -07:00
Johan Euphrosine
ee64a67843 cloudcfg: var cleanup 2014-06-07 14:06:28 -07:00
Joe Beda
2c4b3a562c First commit 2014-06-06 16:40:48 -07:00