Commit Graph

1146 Commits (957b16053a6248801dded165a800731a1b324f15)

Author SHA1 Message Date
Brendan Burns b2b3d2e16b Add the 0.3-dev commit. 2014-09-19 11:15:57 -07:00
Brendan Burns 89eff1d0d8 Rev the version to 0.3 2014-09-19 10:11:03 -07:00
Brendan Burns 06316f4861 Merge pull request #1375 from ddysher/pod-rest-test
Out of place test table
2014-09-19 10:03:01 -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
Deyuan Deng 0c8d9ba870 Fix minion registry test insert. 2014-09-18 23:04:10 -04:00
Deyuan Deng f966a51fc0 Out of place test table 2014-09-18 21:44:52 -04:00
Brendan Burns edf3eb04e2 Fix the build. 2014-09-18 15:29:17 -07:00
Daniel Smith 12b677ad56 Merge pull request #1356 from brendandburns/healthz
Adjust the logic, so that if the apiserver restarts, or has no pod info
2014-09-18 15:15:24 -07:00
Brendan Burns a4912d7203 Merge pull request #1342 from jwforres/websocket_connection_header
Match any Connection header that contains the Upgrade token for websocke...
2014-09-18 09:47:07 -07:00
Joe Beda 4487f311ab Merge pull request #1326 from lavalamp/scheduler
Fix cache to use the "List then Watch" pattern.
2014-09-18 09:00:52 -07:00
Jessica Forrester f2732f18a7 Match any Connection header that contains the Upgrade token for websockets 2014-09-18 09:26:21 -04:00
jhadvig 9f34eaef9e kubelet server test cases 2014-09-18 14:17:10 +02:00
Brendan Burns 17cbde0c5a Adjust the logic, so that if the apiserver restarts, or has no pod info
for some other reason, pods on missing machines are still 'terminated'
2014-09-17 21:57:11 -07:00
Daniel Smith b3bfef9127 Merge pull request #1347 from brendandburns/healthz
Fix a problem where if a minion went missing, we still thought the pod was running.
2014-09-17 18:26:44 -07:00
Brendan Burns 99586b4da4 Fix a problem where if a minion went missing, we still thought the pod was running.
Also convert some tests to table driven.
2014-09-17 18:16:52 -07:00
jhadvig f3f5d0200c Using podID+containerName for querying the logs 2014-09-17 21:00:09 +02:00
Dave Bailey 14fcf68edc Improve error detection for URL manifests, and skip parsing if content unchanged. 2014-09-17 17:43:44 +00:00
Tim Hockin 450ccde521 Don't store name twice in proxy 2014-09-16 17:04:23 -07:00
Daniel Smith 4e9cf2ccb4 Add field selector to List, implement for pods. 2014-09-16 16:17:16 -07:00
Daniel Smith b1169ed91e Fix cache to use the "List then Watch" pattern. 2014-09-16 16:17:15 -07: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
Daniel Smith 0b75f7b543 Merge pull request #1275 from smarterclayton/v1beta2
Create v1beta2 and allow multiple Codec encodings to exist
2014-09-16 14:52:04 -07:00
Daniel Smith 0727b5a6c8 Merge pull request #1302 from brendandburns/validatez
Add a validator for validating components in the cluster infrastructure.
2014-09-16 14:36:10 -07:00
Clayton Coleman 23307344ee Add round trip tests for default encoding
Turn down iterations a bit for speed
2014-09-16 17:27:59 -04:00
Brendan Burns f8844ce69e Add a validator for validating components in the cluster infrastructure. 2014-09-16 13:37:01 -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
Clayton Coleman fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Clayton Coleman 10f68902f6 Add v1beta2 API objects 2014-09-16 16:11:26 -04:00
Brendan Burns 5b9e2a55b5 Add a flag to reject privileged containers in the apiserver. 2014-09-16 11:22:32 -07:00
Paul Morie f94198c7a3 Expose validation method for ReplicationControllerState 2014-09-16 12:55:27 -04:00
jhadvig 6da2653b4a Update according to review 2014-09-16 15:40:12 +02:00
Andrew M Bursavich 4e7f8db3a0 pkg/watch: remove test hook 2014-09-15 18:55:29 -07:00
Daniel Smith 9c25792dca Merge pull request #1321 from abursavich/master
pkg/watch: fix potential deadlock
2014-09-15 18:26:19 -07:00
Tim Hockin f8a8df369c Merge pull request #1314 from ddysher/fd-lead
Fix leaking FD
2014-09-15 17:24:29 -07:00
Andrew M Bursavich b9dcfbad76 pkg/watch: deadlock test 2014-09-15 16:58:26 -07:00
Dawn Chen d51c28d757 Merge pull request #1304 from brendandburns/valid
Add some lifecycle validation.
2014-09-15 16:50:03 -07:00
Brendan Burns 6efafb141f Add some lifecycle validation. 2014-09-15 16:45:26 -07:00
Deyuan Deng d5eb731b3f Fix leaking FD. 2014-09-15 19:12:32 -04:00
Daniel Smith 44f340f127 Remove custom scheme stuff
As separate commit to make it easy to get back-- I'm not completely
convince we won't want this in the future.
2014-09-15 13:15:46 -07:00
Daniel Smith 42dafb0e2e add PluginBase to fuzz functions 2014-09-15 13:15:46 -07:00
Daniel Smith b8c955ea17 Fixes:
* Fix kubecfg test, which was writing an internal object straight to yaml
* Address review comments
2014-09-15 13:15:46 -07:00
Daniel Smith 52d2c221b8 pkg/runtime now has a well defined api pluggability model. 2014-09-15 13:15:46 -07:00
Daniel Smith 71e547124c Make needed changes in conversion package to support pluggability 2014-09-15 13:15:46 -07:00
Andrew M Bursavich 435e0b73bb pkg/watch: fix potential deadlock 2014-09-15 12:07:32 -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
Clayton Coleman 424447d3b0 Merge pull request #1306 from lavalamp/scheduler
Add ExtractList to runtime.
2014-09-15 11:27:42 -04:00
jhadvig f351691493 Adding endpoint for log retrieval on the minion 2014-09-15 17:02:56 +02:00
Brendan Burns 99f7a4f25d Add healthz handlers to the controller manager and scheduler 2014-09-12 21:13:33 -07:00
Clayton Coleman 0a02c6bcdf Exact copy of v1beta1 as v1beta3 for further iteration 2014-09-12 22:02:27 -04:00
Daniel Smith 7d50aa8ba8 Add ExtractList to runtime. 2014-09-12 16:51:07 -07:00
Tim Hockin 3181f3555d Wrap goroutines in HandleCrash() 2014-09-12 16:47:40 -07:00
Tim Hockin 1e50f118fd Move UDP backend setup to a function 2014-09-12 16:47:40 -07:00
Tim Hockin 86d12681f2 Inject UDP timeout to enable testing 2014-09-12 16:47:40 -07:00
Tim Hockin 38416f6a23 Implement UDP proxying in kube-proxy 2014-09-12 16:47:40 -07:00
Tim Hockin cad6122fe4 Refactor proxy code to make room for UDP 2014-09-12 16:38:17 -07:00
Tim Hockin 9f275c81ac add a 'protocol' field to api.Service 2014-09-12 16:38:17 -07:00
Tim Hockin b566339f0c make service validation test be table-driven 2014-09-12 16:38:17 -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
Brendan Burns 46d0cbd645 Add a global flag to enable/disable privileged containers 2014-09-12 09:56:45 -07:00
Dan Mace 3a3fab3f82 FEATURE: Support privileged containers in a pod
Add a Privileged field to containers in a pod, in order to facilitate pods
performing administrative tasks such as builds via Docker-in-Docker.

Discussion: https://github.com/GoogleCloudPlatform/kubernetes/issues/391
2014-09-12 09:38:11 -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
Brian Waldon 2f87857b0f kubelet: generate keyring from .dockercfg 2014-09-11 21:01:39 -07:00
brendandburns cc7999c00a Merge pull request #1268 from dchen1107/termination
Proposed ContainerStatus for each individual Container in a Pod.
2014-09-11 16:17:59 -07:00
Dawn Chen 7b46d8c9c5 typo 2014-09-11 16:07:56 -07:00
Dawn Chen 25fbe210f6 Clean up 2014-09-11 15:30:06 -07:00
Dawn Chen 3faf393e7b Introduce ContainerStates. Currently keep it has the same set as PodStatus:
Waiting, Running, Termination. For each state, there are some meaningful
status associated with it.
2014-09-11 15:22:53 -07:00
Dawn Chen ee129cd440 Proposed ContainerStatus for each individual Container in a Pod. 2014-09-11 14:34:21 -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
Jessica Forrester 0f2b8f4f9f Create passthroughLogger when LogOf is called and request has no logger 2014-09-11 16:48:06 -04:00
Brian Waldon 0bf4fabc19 kubelet: move docker-related code into sub-package 2014-09-11 13:12:28 -07:00
derekwaynecarr 0c20fffa06 No DNS in vagrant cross minions, need explicit IP as host 2014-09-11 13:38:50 -04: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
Dawn Chen b48834e198 Fix PodInfo to include last terminated container info when calling
GetPodInfo based on name and UUID. With this fix, if some of containers
are dead, the pod status will stay as Running, not reset back to Waiting.
2014-09-10 14:41:18 -07:00
bgrant0607 fb4199cba7 Merge pull request #1238 from brendandburns/service
Add an earlier check and error for names that won't work for services.
2014-09-10 11:41:57 -07:00
Brendan Burns 80c06f4768 Add an earlier check and error for names that won't work for services. 2014-09-10 11:31:03 -07:00
Joe Beda 9ffe6c05dc Merge pull request #1251 from filbranden/version_string1
Use just GitVersion for the -version output
2014-09-09 16:32:01 -07:00
Daniel Smith 48913672d9 Merge pull request #1248 from brendandburns/replicas
Make replica controllers return current state.
2014-09-09 16:27:21 -07:00
brendandburns e9d12fef05 Merge pull request #1250 from dchen1107/cleanup
Small clean up in validation.
2014-09-09 16:24:12 -07:00
Brendan Burns e7625c8d91 Add current state to replica controller. 2014-09-09 16:19:18 -07:00
Filipe Brandenburger 8de322f196 Use just GitVersion for the -version output
It turns out that that's simply the most useful information about the version
that was built.

For a git tree, it includes information about the closest release, number of
commits since the release, enough of the SHA1 to find the exact commit and
whether the tree was clean or dirty at build time.

For a build from tarball, it will include information of which release was built
and, when using a tarball from a not released commit (e.g. downloading
"master.tar.gz" from GitHub, not recommended!) it will include the -dev prefix
to indicate that was not an official release. (That's as good as we can get with
it.)

If additional information is required, it can be found with -version=raw.

Tested:

- Built from the git tree:

    $ _output/go/bin/kubecfg -version
    Kubernetes v0.2-29-gd916051e9db865
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-gd916051e9db865", GitCommit:"d916051e9db8650899acb9415a4e285e3e3a1f87", GitTreeState:"clean"}

- Built it from a dirty git tree:

    $ { echo 'package version'; echo 'var X = 1'; } >pkg/version/sillyvar.go
    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes v0.2-29-gd916051e9db865-dirty
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-gd916051e9db865-dirty", GitCommit:"d916051e9db8650899acb9415a4e285e3e3a1f87", GitTreeState:"dirty"}

- Tag it v0.3 and build it:

    $ git tag -a v0.3 -m 'Release Kubernetes v0.3'
    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes v0.3
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"3", GitVersion:"v0.3", GitCommit:"d916051e9db8650899acb9415a4e285e3e3a1f87", GitTreeState:"clean"}

- Built it from a tarball:

    $ wget -O kubernetes.tgz https://api.github.com/repos/filbranden/kubernetes/tarball/version_string1
    $ tar xvf kubernetes.tgz
    $ cd filbranden-kubernetes-*/
    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes v0.2-dev
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}

- Built it with `go get`:

    # I need to prefetch the tree to replace the official tree with mine:
    $ mkdir -p ${TMPDIR}/gopath/src/github.com/
    $ ln -sf filbranden ${TMPDIR}/gopath/src/github.com/GoogleCloudPlatform

    # Now run `go get` to build kubecfg:
    $ GOPATH=${TMPDIR}/gopath go get github.com/filbranden/kubernetes/cmd/kubecfg

    # Check the version:
    $ ${TMPDIR}/gopath/bin/kubecfg -version
    Kubernetes v0.2-dev
    $ ${TMPDIR}/gopath/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-09 16:19:14 -07:00
Dawn Chen 80fa392f6b Small clean up in validation. errs is used as import path alias in validation.go, but it is reused
as a variable for validateVolume.
2014-09-09 16:08:21 -07:00
Filipe Brandenburger 61877f2dd0 Update version to use -dev suffix
According to the plan listed in docs/releasing.md.

The gitMinor will keep using a "+" suffix instead for now.

Added a //TODO to deprecate gitMajor and gitMinor in a follow up.

Tested:
- Built it from the git tree:

    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes version 0.2+, build 8d31eb03c11d4db64ae26809eef7f73070efd811
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-g8d31eb03c11d4d", GitCommit:"8d31eb03c11d4db64ae26809eef7f73070efd811", GitTreeState:"clean"}

- Built it with a direct `go install` (same as tarball):

    $ GOPATH=${PWD}/_output/go:${PWD}/Godeps/_workspace go install $KUBE_GO_PACKAGE/cmd/kubecfg
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}
    $ _output/go/bin/kubecfg -version
    Kubernetes version 0.2+, build (unknown)

A follow up commit will address the output of the -version (without "raw") command to use gitVersion instead of Major + Minor.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-09 15:46:20 -07:00
Brendan Burns 4ba4762827 Insert the current state of a replica controller. 2014-09-09 15:23:34 -07:00
Jessica Forrester d82cf7dd48 Rebased and fixed test cases 2014-09-09 17:50:18 -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
Tim Hockin 4ff76add57 Merge pull request #1147 from dchen1107/restart
Introduce the simplest RestartPolicy and handling.
2014-09-09 14:44:42 -07:00
Brendan Burns 69b359b689 Don't stack trace on 301s 2014-09-09 14:10:46 -07:00
Daniel Smith 1fd12778eb Merge pull request #1231 from brendandburns/service
Fix a bug where we don't return an error.
2014-09-09 12:48:19 -07:00
Brendan Burns a343a93b2d Fix a bug where we don't return an error. 2014-09-09 10:29:00 -07:00
Dave Bailey 5ec748dc5e avoid dumping error pages into error messages 2014-09-09 17:20:58 +00:00
csrwng 6551f4e0f0 Use codec to encode/decode api objects in client and kubecfg parser 2014-09-09 08:45:53 -04:00
Dawn Chen 15cab4d053 Introduce the simplest RestartPolicy and handling. 2014-09-08 22:41:38 -07:00