Commit Graph

3025 Commits (a17517ff6e1a1050a7be14e36fdaed165299692d)

Author SHA1 Message Date
Tim Hockin 5d73fa40aa Merge pull request #3588 from vishh/api_resources
Adding a 'Typename' strongtype for representing all resource types
2015-01-23 15:07:27 -08:00
Vishnu Kannan c32295a180 Adding a 'Typename' strongtype for representing all compute resource types. 2015-01-23 22:17:56 +00:00
Clayton Coleman b21500eaa2 Merge pull request #3753 from mfojtik/fix_extractlist
Fix ExtractList to support extraction from generic api.List{}
2015-01-23 16:56:53 -05:00
Deyuan Deng e71227388e add node update method to client interface 2015-01-23 16:40:33 -05:00
Michal Fojtik e7df8aa098 Fix ExtractList to support extraction from generic api.List{} 2015-01-23 22:13:37 +01:00
Tim Hockin c292aa54c4 Merge pull request #3738 from smreed/randomize-roundrobin-endpoints
Randomize roundrobin endpoints
2015-01-23 12:33:17 -08:00
Filipe Brandenburger 4c413e794e Merge pull request #3704 from satnam6502/retry
Add a Retry-After header when rate limit is exceeded
2015-01-23 10:20:52 -08:00
Steve Reed a186b47cd3 Adds test for slice.ShuffleStrings 2015-01-23 09:30:09 -08:00
Filipe Brandenburger a5898a9559 Keep boolean status of imported flags
This makes glog flags such as --logtostderr and --alsologtostderr keep
working without requiring an explicit =true.

Tested by building kubelet and invoking it with --logtostderr. Also
tested a few non-boolean flags to ensure they weren't affected.
2015-01-22 16:32:12 -08:00
Satnam Singh 8350bb9700 Add a Retry-After header when rate limit is exceeded 2015-01-22 16:03:00 -08:00
Dawn Chen 0962b86ce3 Remove useless and duplicate call. 2015-01-22 15:00:21 -08:00
Dawn Chen 6db42eda4e Merge pull request #3701 from thockin/fix-klet-manifest-reading
Make kubelet's file source go through conversion
2015-01-22 14:40:40 -08:00
Steve Reed ab1ede3aaa Sets year in copyright to 2015 2015-01-22 14:24:07 -08:00
Steve Reed f7e3cb12a6 Moves string slice sorting, copying and shuffling into pkg/util/slice 2015-01-22 14:20:23 -08:00
Steve Reed 38241c7e80 Copies endpoint slices before any sorting 2015-01-22 14:20:18 -08:00
Steve Reed 79a6bfb95f Fixes #3640 by shuffling endpoints in the round-robin load balancer 2015-01-22 14:19:56 -08:00
Tim Hockin d63162b7e7 Make kubelet's HTTP source go through conversion 2015-01-22 14:09:37 -08:00
Tim Hockin 124915417c Merge pull request #3723 from jlowdermilk/kubectl-stop
Add a kubectl stop command
2015-01-22 13:42:52 -08:00
Tim Hockin 4ff2865cd1 Make kubelet's file source go through conversion
See comments for details.  Same problem exists in HTTP source, but I want to
float this for review first.
2015-01-22 13:10:59 -08:00
Tim Hockin ffb2b62726 Merge pull request #3725 from dchen1107/cleanup
Generate pod.Name when pod.Name == "" for both HTTP and file sources.
2015-01-22 13:10:27 -08:00
Tim Hockin bb9a37dc84 Merge pull request #3729 from smarterclayton/print_less_output
Endpoints controller can print sensitive pod info when errors occur
2015-01-22 12:55:40 -08:00
Dawn Chen ec77507915 Generate pod.Name when pod.Name == "" for both HTTP and file sources.
Fix #3584
2015-01-22 12:53:30 -08:00
Clayton Coleman 7932bda3b3 Endpoints controller can print sensitive pod info when errors occur
In general, start to tone down the amount of log output.
2015-01-22 15:23:41 -05:00
Jeff Lowdermilk 201e99e0ee Add a kubectl stop command 2015-01-22 09:46:53 -08:00
Filipe Brandenburger b1727b0330 Revert "Add a kubectl stop command" 2015-01-22 09:00:50 -08:00
Brian Grant a921086507 Merge pull request #3662 from jlowdermilk/kubectl-stop
Add a kubectl stop command
2015-01-22 06:58:29 -08:00
Clayton Coleman b5bc0c1619 Merge pull request #3700 from smarterclayton/add_run_until_to_reflector
Add RunUntil to the Reflector and Poller to allow early termination
2015-01-21 20:00:25 -05:00
Brian Grant 3ae67f8153 Merge pull request #3548 from nikhiljindal/listHandlers
Updating handleIndex in master to list all valid paths.
2015-01-21 15:42:50 -08:00
Clayton Coleman f2d966859d Add RunUntil to the Reflector and Poller to allow early termination
This is useful for test suites where you want to kill your workers
without having to run one test env per execution.
2015-01-21 18:25:54 -05:00
nikhiljindal 51007cc798 Updating handleIndex in master to list all valid paths.
The list of valid paths is computed from http.ServeMux and
restful.WebService.
Adding a mux helper - wrapper over mux, that keeps track of the paths
handled by mux.
2015-01-21 13:40:01 -08:00
Tim Hockin 30219f8dfa Merge pull request #3664 from thockin/pull-if
Pull if
2015-01-21 13:05:28 -08:00
Tim Hockin 7dd0400065 Merge pull request #3470 from deads2k/deads-add-kubecfg-ns
respect namespace from .kubeconfig file
2015-01-21 12:58:06 -08:00
Tim Hockin c729f345f0 Merge pull request #3660 from dchen1107/image
Using switch in validatePullPolicyWithDefault
2015-01-21 12:54:12 -08:00
Tim Hockin 81343aac63 Change PullPolicy constants to match 2015-01-21 12:48:56 -08:00
Dawn Chen d2ebbcaf90 Merge pull request #3661 from thockin/volume-source-as-non-pointer
Make VolumeSource not be a pointer
2015-01-21 12:39:49 -08:00
Clayton Coleman 3c15427b2d Merge pull request #3647 from deads2k/deads-make-factory-flag-binding-optional
make kubectl factory flag binding optional
2015-01-21 15:23:37 -05:00
Brian Grant 54ad81759a Merge pull request #3677 from filbranden/flag_shorthand_refactor1
Flag shorthand refactor1
2015-01-21 10:41:26 -08:00
Tim Hockin 1c31aa489f Merge pull request #3674 from liggitt/override_default_cluster
Allow overriding global default cluster host
2015-01-21 10:08:46 -08:00
Filipe Brandenburger b2aabc540e Fix kubectl version to match client and server version output
Before this fix, the server version was printed from a pointer, making
the Go formatter prefix it with a &.

Before this patch:

    $ kubectl version
    Client Version: version.Info{Major:"0", Minor:"8+", GitVersion:"v0.8.0-509-g8537a73264b836", GitCommit:"8537a73264b836226cfca745ed37d65916e3b16f", GitTreeState:"clean"}
    Server Version: &version.Info{Major:"0", Minor:"8+", GitVersion:"v0.8.0-509-g8537a73264b836", GitCommit:"8537a73264b836226cfca745ed37d65916e3b16f", GitTreeState:"clean"}

After this patch:

    $ kubectl version
    Client Version: version.Info{Major:"0", Minor:"8+", GitVersion:"v0.8.0-509-g8537a73264b836-dirty", GitCommit:"8537a73264b836226cfca745ed37d65916e3b16f", GitTreeState:"dirty"}
    Server Version: version.Info{Major:"0", Minor:"8+", GitVersion:"v0.8.0-509-g8537a73264b836", GitCommit:"8537a73264b836226cfca745ed37d65916e3b16f", GitTreeState:"clean"}
2015-01-21 08:44:53 -08:00
Filipe Brandenburger 0bfeeb84ca Make short flags optional, refactor code to use StringVarP directly.
There is no need to check for an empty string and call StringVar or
StringVarP depending on the case, since StringVar is essentially the
same as a call to StringVarP with an empty string.

This turns 6 lines of code back into 1.

Remove the TODO comments since removing the short flags will no longer
simplify this code significantly.
2015-01-21 07:58:02 -08:00
Filipe Brandenburger af76d14e2e Revert "fixup repeated usage strings"
This reverts commit 469bd2b641.
2015-01-21 07:56:24 -08:00
Jordan Liggitt f71521d758 Allow overriding global default cluster host 2015-01-21 10:38:58 -05:00
deads2k 469bd2b641 fixup repeated usage strings 2015-01-21 08:12:24 -05:00
Brendan Burns 29ae3e2d15 Kubernetes version v0.9.0-dev 2015-01-20 19:50:24 -08:00
Brendan Burns 96af0c3e5b Kubernetes version v0.9.0 2015-01-20 19:50:24 -08:00
Jeff Lowdermilk b1aa037990 Add a kubectl stop command 2015-01-20 19:01:32 -08:00
Tim Hockin 819803b79f Make VolumeSource not be a pointer
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
Dawn Chen cf54dcb689 Using switch in validatePullPolicyWithDefault 2015-01-20 17:41:09 -08:00
Brian Grant dd45246150 Merge pull request #3587 from dchen1107/image
Clean up Kubernetes PullPolicy
2015-01-20 17:18:26 -08:00
Brian Grant 0b69a3f57a Merge pull request #3517 from thockin/v1b3
Rename HostDir to HostPath in v1beta3
2015-01-20 16:25:16 -08:00
Tim Hockin 60ec08db93 Rename HostDir to HostPath in v1beta3 2015-01-20 15:56:44 -08:00
Dawn Chen b8c7e64b0f Merge pull request #3612 from enisoc/apiserver-proxy-headers
Add reverse proxy headers in apiserver proxy.
2015-01-20 15:14:57 -08:00
deads2k 500bb3a7fa make kubectl factory flag binding optional 2015-01-20 18:12:24 -05:00
Tim Hockin b3b092b41a Merge pull request #3603 from smarterclayton/expose_type_accessor
Add TypeAccessor to api/meta for objects without Object/ListMeta
2015-01-20 14:55:43 -08:00
Clayton Coleman 5f6caaba2e Add TypeAccessor to api/meta for objects without Object/ListMeta
Adding objects that have TypeMeta (use runtime.Scheme) but do not
expose ObjectMeta/ListMeta (because they are not Kube API objects)
and wanted to get the simpler access path for in memory objects.
2015-01-20 17:37:24 -05:00
Clayton Coleman 494d003981 Merge pull request #3641 from deads2k/deads-make-short-flags-optional
make shorthand flags optional
2015-01-20 17:23:10 -05:00
Clayton Coleman 80d99b8d85 Merge pull request #3631 from deads2k/deads-add-set-deleteall
make StringSet.Delete accept multiple items
2015-01-20 17:22:58 -05:00
Brendan Burns 9192a4ce22 Merge pull request #3642 from dchen1107/clean
Remove image GC.
2015-01-20 14:07:00 -08:00
Dawn Chen d1af520bd0 Merge pull request #3589 from filbranden/fix_nil_interface_pointer_without_reflect1
Fix comparison of EtcdClient to nil so that it does not run into the pointer vs. interface issue
2015-01-20 13:55:25 -08:00
Dawn Chen 2299c04cea Remove image GC.
Fix #3617,#3611, and #3393.
2015-01-20 13:43:08 -08:00
deads2k 8c01729f38 make shorthand flags optional 2015-01-20 16:21:27 -05:00
deads2k dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
Dawn Chen 92ff4cd2b1 Remove unused helper methods for PullPolicy. 2015-01-20 11:54:22 -08:00
Dawn Chen 3101a33d32 Kubelet stop using api/helper.go for PullPolicy 2015-01-20 11:54:22 -08:00
Dawn Chen aec4594a8d Introduce validatePullPolicyWithDefault to validation. 2015-01-20 11:54:22 -08:00
Tim Hockin 6cb275829f Implement volumes as plugins.
Break up the monolithic volumes code in kubelet into very small individual
modules with a well-defined interface.  Move them all into their own packages
and beef up testing along the way.
2015-01-20 11:45:45 -08:00
deads2k 5b8e38a665 make StringSet.Delete accept multiple items 2015-01-20 14:42:10 -05:00
Joe Beda f90ad573cf Merge pull request #3610 from liggitt/kubelet_tls_client
Build TLS client for kubelet correctly
2015-01-20 10:56:52 -08:00
Tim Hockin 6ff26d924c Merge pull request #3619 from smarterclayton/expose_validate_labels
Expose ValidateLabels in validation.go for reuse by other components
2015-01-20 09:11:08 -08:00
Eric Tune fd52ba96ce Merge pull request #3608 from smarterclayton/log_watch_errors
Explicitly handle errors received during watch
2015-01-20 08:47:12 -08:00
Clayton Coleman 48146e01cd Expose ValidateLabels in validation.go for reuse by other components
Label validation is common to anyone building kube resources.
2015-01-19 22:33:52 -05:00
Anthony Yeh 8c900187b6 Add reverse proxy headers in apiserver proxy.
Fixes #3484
2015-01-19 13:15:41 -08:00
Jordan Liggitt 888fe4b175 Build TLS client for kubelet correctly 2015-01-19 12:26:12 -05:00
Clayton Coleman e4dcbb6edb Explicitly handle errors received during watch
Log them as Error and then continue.
2015-01-19 11:10:45 -05:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
Filipe Brandenburger 79ff06ffa1 Fix comparison of EtcdClient to nil so that it does not run into the pointer vs. interface issue
This is a partial rollback of commit 6e6f465a36 ("Fix a crash for
kubelet when without EtcdClient") in which we used the `reflect` module
to inspect that the pointer stored inside the interface was `nil`, but
as pointed out by @lavalamp, the correct solution is to make the
function return the interface type, in which case a `return nil` will
return the interface nil and not a nil pointer that turns into a non-nil
value when coerced into an interface.

For more details, see http://golang.org/doc/faq#nil_error and the
discussion in PR #3356.

Tested by installing a kubelet built from head with this patch into a
containervm instance and confirming it did not crash on standalone.go.
Confirmed that by only removing the `reflect.IsNil()` comparison but not
changing the return type of `EtcdClientOrDie()` did indeed cause that
same crash, so changing the return type does indeed fix the issue.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2015-01-16 16:43:05 -08:00
Brendan Burns d54242a649 Merge pull request #3552 from commonlisp/master
Replace kubelet logging %s--%s--%s with dockertools.BuildDockerName()
2015-01-16 14:31:43 -08:00
Filipe Brandenburger 6d9845361f Merge pull request #3577 from erictune/fixforfilib
Test for and fix crash with nil client in kubelet.
2015-01-16 13:53:29 -08:00
Eric Tune fc11801246 Merge pull request #3535 from smarterclayton/ignore_the_root_key_on_watch_list
WatchList should not convey events for the root key
2015-01-16 13:43:44 -08:00
Eric Tune 98bdd3f7c4 Test for and fix crash with nil client in kubelet.
Added test that fails before fix.
Fixed use of nil pointer.
2015-01-16 13:39:31 -08:00
Joe Beda 474212106f Merge pull request #3564 from liggitt/client_cert_data
Allow client and kubelet configs to hold cert/key/ca data directly
2015-01-16 13:19:52 -08:00
bgrant0607 ee0ba6c922 Merge pull request #3574 from mikedanese/proxy-config-panic
fix interface conversion panic
2015-01-16 12:45:00 -08:00
Brendan Burns 311dada4f2 Merge pull request #3551 from ukai/oauth
cloudprovider/gce: use golang.org/x/oauth2
2015-01-16 12:30:48 -08:00
Mike Danese 8b65621aeb fix interface conversion panic 2015-01-16 12:23:16 -08:00
Brendan Burns e86c8f9e53 Merge pull request #3565 from dchen1107/podstatus
Introduce PodStatusResult, and deprecate PodContainerInfo.
2015-01-16 12:05:07 -08:00
Dawn Chen a71588dc89 Merge pull request #3504 from ddysher/kubectl-node-status
Include node status in kubectl get output
2015-01-16 12:01:29 -08:00
Deyuan Deng 616feac25b Include node status in kubectl get output 2015-01-16 14:28:35 -05:00
Dawn Chen 7b457fd33f Separate colume for PodIP from kubectl get pods 2015-01-16 11:10:30 -08:00
Jordan Liggitt 1ebe885827 Allow client and kubelet configs to hold cert/key/ca data directly 2015-01-16 12:18:20 -05:00
Dawn Chen 15e9fa8a9d Introduce PodStatusResult, and deprecate PodContainerInfo. 2015-01-16 09:10:40 -08:00
George Kuan af4bbd1a1b Replace kubelet logging %s--%s--%s with dockertools.BuildDockerName()
Fixes issue #3454
2015-01-15 19:47:54 -08:00
Fumitoshi Ukai 54f498acd5 cloudprovider/gce: use golang.org/x/oauth2
code.google.com/p/goauth2 is deprecated.
use golang.org/x/oauth2 instead.

hooks/prepare-commit-msg ignore Godeps
for sh's boilerplate check.
2015-01-16 12:17:52 +09:00
bgrant0607 790a78415e Merge pull request #3494 from nikhiljindal/deletePublicMethods
master.go: converting API_v1beta* functions to private since they are not used outside
2015-01-15 17:22:31 -08:00
bgrant0607 52cd620da8 Merge pull request #3537 from brendandburns/cli
Add inline JSON patching to kubectl update ...
2015-01-15 17:08:51 -08:00
bgrant0607 03421ada2c Merge pull request #3542 from erictune/channel_api
Remove dead code in test.
2015-01-15 16:58:52 -08:00
nikhiljindal 1ccae67b6e master.go cleanup: Deleting unused public methods and converting rest to private 2015-01-15 16:22:43 -08:00
Brendan Burns 3572ed1828 Addressed comments. 2015-01-15 16:08:12 -08:00
Brendan Burns ae88521739 Add inline patching to kubectl update. 2015-01-15 16:08:12 -08:00
Brendan Burns e8489264cf Addressed comments. 2015-01-15 16:07:56 -08:00
Jeff Lowdermlk f7b0a92932 Fail rollingupdate if replacement rc schema has same name as existing 2015-01-15 15:52:53 -08:00
Nikhil Jindal e6c5d59a55 Merge pull request #3509 from enisoc/apiserver-proxy-trailing-slash
Preserve trailing slash in apiserver proxy.
2015-01-15 15:13:49 -08:00
Nikhil Jindal aeab434400 Merge pull request #3514 from enisoc/apiserver-proxy-content-type
Allow Content-Type with charset in apiserver proxy.
2015-01-15 15:07:07 -08:00
Eric Tune 5aeda8a5bb Remove dead code in test. 2015-01-15 14:49:08 -08:00
Daniel Smith 46f8a56dba Merge pull request #3376 from erictune/channel_api
Kublet watches Pods.
2015-01-15 14:48:12 -08:00
Brendan Burns 4209bd4888 Add add a utility for merging JSON fragments, and use it in run-container. 2015-01-15 14:44:26 -08:00
bgrant0607 fc24ca7044 Merge pull request #3524 from jlowdermilk/fix-cmd-printing
Fix nil dereference in kubectl run-container
2015-01-15 13:44:26 -08:00
Eric Tune 2e002b1095 Add second pod to test. 2015-01-15 13:36:49 -08:00
Clayton Coleman ce36431954 WatchList should not convey events for the root key
It's possible to watch /foo/bar, get events for /foo/bar/baz,
and then if someone deletes /foo/bar you'll get an event for /foo/bar
without a value.  This results in an error being printed in the logs
because /foo/bar has value "" and we can't decode that.

This commit excludes the parent directory from watch events for now.
2015-01-15 16:00:49 -05:00
Clayton Coleman f312edf24d Merge pull request #3531 from lavalamp/fix2
make conversion do deep copies
2015-01-15 15:29:21 -05:00
bgrant0607 cffa257349 Merge pull request #3529 from smarterclayton/less_chatty_apiserver_init
The API server setup logging is debug specific, bump above V(4)
2015-01-15 12:04:17 -08:00
Daniel Smith 37f5a9df07 make conversion do deep copies 2015-01-15 12:02:22 -08:00
Jeff Lowdermlk e6e6092904 Fix nil dereference in kubectl run-container 2015-01-15 11:39:50 -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
Clayton Coleman 90c835af47 The API server setup logging is debug specific, bump above V(4)
Reduces some chatter in test suites where we are confident this code
already works.  Also removed any logging which is obvious from swagger.

Finally, rolls up InstallREST related errors all the way back to master,
which will glog.Fatalf (coding errors).
2015-01-15 14:25:58 -05:00
Brendan Burns bece5ec8a3 Merge pull request #3516 from enisoc/kubectl-resize-docs
Fix example usage of kubectl resize command.
2015-01-15 09:55:20 -08:00
Dawn Chen 8509618311 Merge pull request #3501 from lavalamp/fix2
log on health checks
2015-01-15 09:16:15 -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 1d0b6ee5f5 Fix up logging flags for kubectl. 2015-01-15 09:12:20 -08:00
Joe Beda f692604bdf Fix name of pflag_import.go 2015-01-15 09:12:19 -08:00
Joe Beda dcd00c936e Move all kubernetes to posix flags 2015-01-15 09:12:19 -08:00
derekwaynecarr e5b550576c Forbidden should not swallow the underlying error 2015-01-15 11:22:15 -05:00
Anthony Yeh 5090dcbc62 Fix example usage of kubectl resize command. 2015-01-14 23:39:23 -08:00
Anthony Yeh 895c23e2d2 Allow Content-Type with charset in apiserver proxy.
Fixes #3456
2015-01-14 23:01:49 -08:00
Jeff Lowdermilk 4cd345b8a6 Merge pull request #3377 from brendandburns/cli
Add a resize command to kubectl.
2015-01-14 22:20:18 -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
Anthony Yeh 6f641744ff Preserve trailing slash in apiserver proxy.
Some servers are sensitive to the presence of a trailing slash.
For example, http://etcd/v2/keys returns 404 while
http://etcd/v2/keys/ returns the key named "/".
2015-01-14 21:42:34 -08:00
Brendan Burns d3a07adb38 Add a resize command to kubectl. 2015-01-14 21:36:08 -08:00
Daniel Smith 48adc8f458 Merge pull request #3497 from saad-ali/fix3495
Increase timeout for TestEtcdSourceExistingBoundPods test
2015-01-14 17:45:46 -08:00
Daniel Smith 09e30a6a63 log on health checks 2015-01-14 17:38:48 -08:00
saadali b57cc6a11c Increase timeout for TestEtcdSourceExistingBoundPods test 2015-01-14 17:06:04 -08:00
Daniel Smith b0d9ad70de Merge pull request #3482 from lavalamp/fix
make quantity flag work with pflag package
2015-01-14 16:43:32 -08:00
Daniel Smith 46827720b3 Merge pull request #3493 from saad-ali/testFor3467
Add test case for EtcdSource ExistingBoundPods
2015-01-14 16:35:26 -08:00
Daniel Smith 1d0c36a494 Merge pull request #3487 from thockin/uid_type
Move util.UID to pkg/types
2015-01-14 16:27:19 -08:00
saadali a1c287ede9 Add test case for EtcdSource ExistingBoundPods 2015-01-14 16:15:08 -08:00
Daniel Smith 4738da0822 fix build 2015-01-14 16:12:22 -08:00
Eric Tune b759f67ee3 Kublet watches Pods.
Added a kubelet config source for watching pods on apiserver.
The pods are converted to boundpods for merging with other
config sources.

The preferred way to create a kubelet is now to pass an apiserver
client but not an etcd client.  Changed cmd/integration to use
apiserver to talk to kubelets.  And cmd/kubernetes.

Unit, integration, and e2e tests pass, except for a failure of the pd
e2e test which was unrelated.
2015-01-14 15:31:26 -08:00
Tim Hockin 1be3de895c Move util.UID to pkg/types 2015-01-14 15:22:21 -08:00
Daniel Smith 2bee4ac572 Merge pull request #3381 from a-robinson/events2
Improve client recording of events such that clients are
2015-01-14 15:21:16 -08:00
Daniel Smith 5767b41b28 make quantity flag work with pflag package 2015-01-14 15:16:53 -08:00
Nikhil Jindal 6a18bbcfbf Merge pull request #3483 from lavalamp/fix2
fix log message
2015-01-14 15:15:23 -08:00
Daniel Smith 2e394d41cd fix log message 2015-01-14 15:08:53 -08:00
Daniel Smith c13ae34b02 Merge pull request #3445 from saad-ali/fix3172
Remove CONDITION from event object completely
2015-01-14 15:03:06 -08:00
Eric Tune 88c68e0349 Merge pull request #3331 from pmorie/services
Service visibility w/in namespaces, master services, set env vars in kubelet
2015-01-14 15:01:05 -08:00
Daniel Smith 8a764c02d5 Merge pull request #3478 from thockin/uid_type
Use a strong type for UID fields
2015-01-14 14:20:22 -08: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
Daniel Smith f07a5d1ead Merge pull request #3479 from dchen1107/cleanup
Using ExtractObj instead of ExtractToList since BoundPods is not a List ...
2015-01-14 14:15:43 -08:00
Paul Morie fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Dawn Chen 009c5e1129 Using ExtractObj instead of ExtractToList since BoundPods is not a List type 2015-01-14 14:05:47 -08:00
Tim Hockin d28b51f89f Document fields, fix presubmit 2015-01-14 14:01:18 -08:00
Tim Hockin e86d4cd3c6 Use a strong type for UID fields 2015-01-14 13:53:43 -08:00
Joe Beda ddcd2e1d2b Merge pull request #3463 from jlowdermilk/gendocs
Autogenerate markdown docs for kubectl
2015-01-14 13:32:38 -08:00
Jeff Lowdermlk 250c948ae7 Autogenerate markdown docs for kubectl
Add test to verify generated docs are up to date.
2015-01-14 13:21:14 -08:00
Daniel Smith 36320f02fb Merge pull request #3471 from brendandburns/shell
Add tests for run command and generate.
2015-01-14 12:39:41 -08:00
bgrant0607 6459b1a1f3 Merge pull request #3468 from smarterclayton/better_log_on_empty_delete
Write to STDERR when Delete contains no resources
2015-01-14 11:46:55 -08:00
Daniel Smith dbe1bd9b15 Merge pull request #3469 from fabianofranz/fixes_proxier
When choosing a host interface proxier must only consider the ones with an address assigned
2015-01-14 11:22:30 -08:00
Daniel Smith 5b7369720d Merge pull request #3462 from dchen1107/cleanup
Fix Event.Source for hostname_override case.
2015-01-14 11:21:24 -08:00
Clayton Coleman da2b03d8d8 Write to STDERR when Delete contains no resources
Also test that this occurs
2015-01-14 14:10:15 -05:00
fabianofranz 0235bca2d3 When choosing a host interface proxier must only consider the ones with an address assigned 2015-01-14 17:09:27 -02:00
Clayton Coleman 6894d4feed Merge pull request #3460 from mnagy/handle-selector-error
Fix panic if selector uses malformed syntax
2015-01-14 13:49:22 -05:00
Zach Loafman e14d5f3416 Merge pull request #3464 from smarterclayton/fix_invalid_json_in_services.sh
Fix e2e invalid JSON, ensure CLI communicates invalid JSON errors effectively
2015-01-14 10:26:34 -08:00
Clayton Coleman ccdc20d90c Ignore empty objects from streams and error when nothing passed to create
Passing zero objects to create should be an error
2015-01-14 13:12:33 -05:00
bgrant0607 312de43ace Merge pull request #3444 from lavalamp/fix
eliminate possibility of double-calling
2015-01-14 10:12:26 -08:00
bgrant0607 78d18aa70c Merge pull request #3424 from brendandburns/run
Basic "Run" command
2015-01-14 10:08:53 -08:00
Dawn Chen 0716df8f2b Fix Event.Source for hostname_override case. 2015-01-14 09:43:13 -08:00
Clayton Coleman 31413c8727 Add more tests around JSON/YAML decoding from the CLI
Switch the ignore stream errors behavior to print a Warningf on
failure to parse, not v(2)
2015-01-14 12:38:36 -05:00
Martin Nagy 9340781d21 Fix panic if selector uses malformed syntax 2015-01-14 17:13:58 +01:00
Brendan Burns de886591b5 Add tests for run command and generate. 2015-01-14 07:12:32 -08:00
saadali 826b61c76d Address nits from PR #3423 2015-01-13 23:34:37 -08:00
Clayton Coleman ec803cb809 Allow resource.Builder to stream YAML from the CLI
Add both JSON and YAML STDIN tests in test-cmd
2015-01-14 00:50:13 -05:00
Clayton Coleman 22cf8b94e6 Add a package for doing YAML-to-JSON streaming, one document at a time
Will be moved upstream soon
2015-01-14 00:50:07 -05:00
Alex Robinson 90e1d58fa6 Add a unit test for watch.Broadcaster DropIfChannelFull and a couple small fixes 2015-01-14 04:36:29 +00:00
Brendan Burns 1ce6c27f3d Add an initial run command 2015-01-13 20:00:29 -08:00
Daniel Smith 30be0eeac7 eliminate possibility of double-calling 2015-01-13 18:09:13 -08:00
Tim Hockin ca89aa6528 Make data dirs for all pods when syncing 2015-01-13 17:18:21 -08:00
Daniel Smith 6f1a3accf7 Merge pull request #3440 from ghodss/upgrade-yaml
Upgrade from gopkg.in/v2/yaml to gopkg.in/yaml.v2 everywhere
2015-01-13 16:11:20 -08:00
Clayton Coleman 30743b8195 The get command should properly handle users providing invalid apiversions
Add more guards against bad behavior.  A follow up commit will ensure that
when the flags for api-version are specified, they default to the correct
values that client.SetKubernetesDefaults would use.
2015-01-13 18:51:55 -05:00
Clayton Coleman b5c33e1c8c Prevent internal conversion in the printer directly (as per implicit contract) 2015-01-13 18:51:33 -05:00
Clayton Coleman 87970bc356 Use the new client.SetKubernetesDefaults methods to properly default config object 2015-01-13 18:50:36 -05:00
Sam Ghods 7845ab90f8 Upgrade from gopkg.in/v2/yaml to gopkg.in/yaml.v2 everywhere 2015-01-13 15:06:25 -08:00
Eric Tune f589ee98e0 Merge pull request #3423 from saad-ali/fix3371
Split up kubelet "source seen" logic
2015-01-13 14:43:59 -08:00
bgrant0607 662a72d476 Merge pull request #3198 from smarterclayton/allow_delete_to_span_resources
Allow delete to work from directories and multiple sources
2015-01-13 14:41:24 -08:00
deads2k b51a717f6e add kubectl config 2015-01-13 16:19:57 -05:00
bgrant0607 de2e298fa9 Merge pull request #3196 from smarterclayton/allow_create_to_span_resources
Allow create to handle multiple resources, remove createall
2015-01-13 12:23:50 -08:00
Alex Robinson 3eaf362f8e Switch the client event recorder from exponential backoff to one random
sleep on the first failed request followed by a constant amount on all
subsequent consecutive failed requests.
2015-01-13 19:48:41 +00:00
Daniel Smith 224a8d634b Merge pull request #3384 from derekwaynecarr/list_watch_by_namespace
Add ability to listwatch a resource in an optional namespace
2015-01-13 11:15:27 -08:00
bgrant0607 bb140d636a Merge pull request #3004 from smarterclayton/allow_get_to_span_resources
Allow kubectl get to fetch multiple resource types by label
2015-01-13 11:07:34 -08:00
Daniel Smith 8ac93fe15c Merge pull request #3421 from nikhiljindal/sort_swagger
Swagger UI: Updating swagger-ui.js to list the resources and operations in sorted order
2015-01-13 10:54:37 -08:00
Abhishek Gupta dbac18a909 Rebasing onto latest code and fixing issues 2015-01-13 10:09:33 -08:00
Abhishek Gupta c20d062d16 Added comments and minor changes based on PR feedback 2015-01-13 09:41:28 -08:00
Abhishek Gupta 40df5f6db8 Added a more formal comment for the service affinity predicate 2015-01-13 09:41:28 -08: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
saadali 110ab6f1bd Split up kubelet "source seen" logic 2015-01-12 21:48:55 -08:00
Alex Robinson be6b1cf0e2 Push the full channel logic into the implementation of the broadcaster
in watch/mux.go rather than being in the client event recording code.
2015-01-13 02:22:30 +00:00
Alex Robinson 702a6f96b4 Improve client recording of events such that clients are
(1) less likely to drop events if the master is unavailable
(2) less likely to have goroutines block while trying to record an
event.

Done as part of #3163 to ensure that minions operate well even while the
master is down.
2015-01-13 02:22:30 +00:00
Joe Beda 16d0a837f2 Merge pull request #3414 from liggitt/cafile
Use CAFile even if client certificate is not specified
2015-01-12 17:44:51 -08:00
nikhiljindal 87c9c374b7 Swagger UI: Updating swagger-ui.js to list the resources and operations
in sorted order.
2015-01-12 17:29:07 -08:00
Dawn Chen 26a6628d8a Merge pull request #3374 from lavalamp/fix
Fix minion listing
2015-01-12 16:36:46 -08:00
Daniel Smith 3e75195ff3 make minion registry not intolerably slow 2015-01-12 16:20:52 -08:00
Daniel Smith f0b5fba988 Improve cache behavior
* don't block while filling cache
* make cache wait for pending calls
2015-01-12 16:20:25 -08:00
Brendan Burns 82afbab334 Merge pull request #3418 from nikhiljindal/swagger-ui
Fixing broken swagger-ui
2015-01-12 16:07:49 -08:00
Daniel Smith 6e70853e83 genericize ip cache 2015-01-12 16:04:43 -08:00
Daniel Smith 55653568ae Merge pull request #3385 from erictune/source_api
Added kubelet config source from apiserver.
2015-01-12 15:47:15 -08:00
Eric Tune 18bcef5235 Added kubelet config source from apiserver. 2015-01-12 15:29:16 -08:00
nikhiljindal f8db96b673 Fixing a bug in
https://github.com/GoogleCloudPlatform/kubernetes/pull/3404 which broke
swagger-ui.
Swagger-ui requires operation to be defined on all Routes.
2015-01-12 15:20:01 -08:00
Daniel Smith 24e59de06e Merge pull request #3392 from erictune/reflector_proxy
Reconcile kubelet and kube-proxy watching code, initial steps.
2015-01-12 14:55:26 -08:00
Eric Tune 295800201e Make pkg/proxy/config more like pkg/kubelet/config
Split SourceAPI into two subobjects.

Parallel structure for endpoints, services will allow
changing to use generic code in pkg/client/cache/reflector.go.

Rename some funcs to be more like pkg/client/cache.
2015-01-12 14:37:04 -08:00
Tim Hockin 2ea27c3df3 Fix wrong field check in validation 2015-01-12 14:27:34 -08:00
Tim Hockin 0d92da6b15 Remove logic to handle if UID is blank
This should only have been triggered by tests, and those should now be fixed.
I tested by calling panic() if UID was blank in BuildDockerName() or if number
of fields was < 5 in ParseDockerName().  All errors were fixed.
2015-01-12 14:27:34 -08:00
Tim Hockin 905514a12b Ensure Namespace and UID are set in kubelet
Make all kubelet config sources ensure that UID and Namespace are defaulted, if
need be.

We can *almost* disable the "if blank" logic for UID, except for tests that
call APIs that do not run through SyncPods.  We really ought to be enforcing
invariants better.
2015-01-12 14:27:34 -08:00
Tim Hockin af0e2fd551 Merge pull request #3403 from thockin/klet-dirs-structure
Apply more structure to pod data dirs
2015-01-12 14:19:22 -08:00
bgrant0607 b3d827e333 Merge pull request #3416 from nikhiljindal/basePath
Setting WebServicesUrl in swagger config
2015-01-12 13:59:21 -08:00
bgrant0607 e965b7ec18 Merge pull request #3368 from ddysher/static-hostip
Post hostip for static machines
2015-01-12 13:51:11 -08:00
nikhiljindal 6ddfb10728 Setting WebServicesUrl in swagger config, so that the api docs contain correct basepath 2015-01-12 13:48:39 -08:00
Jordan Liggitt 1f8a74626f Use CAFile even if client certificate is not specified 2015-01-12 16:38:48 -05:00
Eric Tune ab7106a5c3 Merge pull request #3322 from erictune/cleanup5
Rename ListPods methods to List.
2015-01-12 13:38:13 -08:00
Daniel Smith 6f43074143 Merge pull request #3404 from smarterclayton/method_not_allowed
Allow RESTStorage objects to not implement methods
2015-01-12 13:21:10 -08:00
saadali e1917cf900 Fix "Kubelet doesn't kill old pods when BoundPods is empty" issue 2015-01-12 12:39:47 -08:00
Daniel Smith 969c4b8c49 Merge pull request #3410 from brendandburns/watch
Clear resourceVersion on errors.
2015-01-12 11:51:59 -08:00
Brendan Burns 6ad88bb143 Clear resourceVersion on errors. 2015-01-12 11:45:38 -08:00
Clayton Coleman d17f75f254 Remove user agent logging (doesn't add significant value)
We can reintroduce path/agent logging at a later point, this just clogs
verbose logs.
2015-01-12 13:37:37 -05:00
Clayton Coleman 302629569b Remove unimplemented methods 2015-01-12 12:20:01 -05:00
Clayton Coleman 22c99c98e2 Split RESTStorage into separate interfaces
Omit unimplemented interfaces from Swagger
2015-01-12 12:19:45 -05:00
Clayton Coleman a52b216324 Add MethodNotSupported error 2015-01-12 12:05:04 -05:00
Tim Hockin 523a80bec7 Apply more structure to pod data dirs
This is makes it possible to read back "known" pods from disk without
getting other (non-pod) kubelet dirs in the mix.  Ditto for containers
within a pod.  This is just saner overall.  Pods now nest in a pods/
dir.  Likewise containers.
2015-01-12 06:16:32 -08:00
Eric Tune 00c05053b7 Rename ListPods methods to List.
For greater similarity to pkg/client.
Does not cover registry's ListPods.
Fix an example in a comment.
2015-01-09 23:46:02 -08:00
derekwaynecarr 7c630fd797 Add ability to listwatch in namespace 2015-01-10 01:04:26 -05:00
Deyuan Deng 0e13a24864 Post hostip for static machines 2015-01-09 19:38:10 -05:00
Daniel Smith 6cd37637f5 Merge pull request #3365 from smarterclayton/test_coverage
Reenable coverage and race detection on Travis
2015-01-09 16:35:18 -08:00
Eric Tune f381579a89 Fix flaky test.
Maps are randomly reordered.
But there is only one order for one thing.
2015-01-09 16:23:53 -08:00
Eric Tune e930aa33ac Merge pull request #3370 from dchen1107/clean
Print PodIP along with Pod.Name for kubectl get pod <id>
2015-01-09 15:54:26 -08:00
Dawn Chen a7ad7f8207 Print PodIP along with Pod.Name for kubectl get pod <id> 2015-01-09 14:18:10 -08:00
Dawn Chen a5c117f405 Merge pull request #3367 from lavalamp/fix
improve validation error message printing
2015-01-09 13:26:44 -08:00
Dawn Chen f795d13985 Merge pull request #3366 from erictune/undelta
Added UndeltaStore.
2015-01-09 13:18:22 -08:00
Daniel Smith c81dda5d61 improve validation error message printing 2015-01-09 13:06:24 -08:00
bgrant0607 4231f8757d Merge pull request #3298 from nikhiljindal/swagger-ui
Changes to improve swagger ui
2015-01-09 12:55:01 -08:00
Eric Tune 793bf6a79d Added UndeltaStore.
This will be used to connect Reflector to kubelet update channel.

Added testing.
2015-01-09 12:40:07 -08:00
Tim Hockin 2a2cef84d6 Merge pull request #3351 from lavalamp/fix
Fix error messages; add tests
2015-01-09 12:07:20 -08:00
nikhiljindal 7e909ed743 Changes to improve swagger ui.
- Separating out index, version and api handlers into independent web
  services. Moved the index handler to /welcome, version handler to
  /version and the api handler to /api,
2015-01-09 10:56:24 -08:00
Clayton Coleman a3ff55e478 Allow delete to work from directories, files, multiple resources
Simple refactoring reusing the resource builder changes.
2015-01-09 13:31:24 -05:00
Clayton Coleman d24c5b145e Allow errors to be ignored by the builder 2015-01-09 13:31:24 -05:00
Clayton Coleman bc86b31a8b Remove createall now that create supports directories and sources 2015-01-09 13:30:31 -05:00
Clayton Coleman d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -05:00
Clayton Coleman 2151afe334 Allow kubectl get to fetch multiple resource types
Like Delete, which can now run over multiple types:

    kubectl delete pods,services -l name=foo

Get should be able to span items for label selection

    kubectl get pods,services -l name=foo
2015-01-09 13:30:14 -05:00
Clayton Coleman e67786b2f0 Shorten kubecfg test by adding private variable for duration 2015-01-09 13:16:30 -05:00
Clayton Coleman cacd2ac40b Shorten client/record test by changing default value
Also add opinionated comment about using singletons in code
2015-01-09 13:16:30 -05:00
Clayton Coleman b8333bdeef Merge pull request #3152 from smarterclayton/resource_args_builder
Let Kubectl deal with many objects at the same time
2015-01-09 12:17:17 -05:00
Filipe Brandenburger 0105a48b87 Merge pull request #3356 from dchen1107/image
Fix a crash for kubelet when without EtcdClient.
2015-01-09 09:16:00 -08:00
Clayton Coleman 8a4f225941 Make expandResourceShortcuts part of RESTMapper on client 2015-01-09 11:59:11 -05:00
Clayton Coleman a1ee782df5 Use resource package, delete older code 2015-01-09 11:59:11 -05:00
Clayton Coleman d75a3d5021 Move Resource functionality to its own package
Create a unified Builder object for working with files, selectors,
types, and items that makes it easier to get multi-object functionality.

Supports all of the behaviors previously in resource.go, but with
additional flexibility to allow multi-type retrieval and access, directories,
URLs, nested objects, and lists.
2015-01-09 11:59:06 -05:00
Clayton Coleman 68298f08a4 Merge pull request #3353 from thockin/errors
Cleaner aggregate errors API
2015-01-09 11:50:57 -05:00
Dawn Chen 6e6f465a36 Fix a crash for kubelet when without EtcdClient. 2015-01-09 02:28:20 -08:00
Tim Hockin 4fcd496d59 change everything to use new util/errors 2015-01-08 22:10:03 -08:00
Tim Hockin cd29ba7ebc Add new util/errors pkg 2015-01-08 21:59:23 -08:00
Tim Hockin da8dc5360e Merge pull request #3347 from erictune/kclientarg
Pass client into Kubelet.
2015-01-08 19:53:34 -08:00
Daniel Smith e91a697445 Merge pull request #3346 from erictune/addservicelister
Addded a StoreToServiceLister.
2015-01-08 17:35:13 -08:00
Daniel Smith bd7b457d9c Fix error messages; add tests 2015-01-08 17:34:53 -08:00
Eric Tune 29d084c4d3 Pass client into Kubelet.
Subsequent PR will make use of it.
2015-01-08 15:35:17 -08:00
Eric Tune 83aed75556 Addded a StoreToServiceLister. 2015-01-08 15:29:08 -08:00
Joe Beda 7abd90e9df Generic way to import 'flag' flags into the 'pflag' system.
Start with kubectl but with an eye toward switching everything over to pflag.
2015-01-08 15:25:31 -08:00
Jeff Lowdermilk b26dfacfff Merge pull request #3316 from deads2k/deads-add-kubeconfig-file-properly
add kubeconfig file properly
2015-01-08 13:50:52 -08:00
deads2k 60a46e7d49 fixes e2e failure on gce with new .kubeconfig, kick travis 2015-01-08 16:31:25 -05:00
Deyuan Deng a2651bfcc7 Rename minioncontroller to nodecontroller 2015-01-08 14:52:10 -05:00
bgrant0607 7bff03fb41 Merge pull request #2878 from smarterclayton/enable_v1beta3
Enable v1beta3 API via --runtime_config=api/v1beta3 flag
2015-01-08 11:04:06 -08:00
deads2k 005f2e1bda don't require config.Version for IsConfigTransportTLS 2015-01-08 13:53:57 -05:00
Clayton Coleman 7fd887df61 Enable v1beta3 API via --runtime_config=api/v1beta3 flag
This exposes the proper v1beta3 API endpoint when the user specifies
the --runtime_config=api/v1beta3 argument to the apiserver. v1beta3
is still considered experimental and subject to change.

--runtime_config is a map of string keys and values, that can be
specified by providing

    --runtime_config=a=b,b=c,d,e

Only the key must be specified, the value can be omitted.

Enables v1beta3 in hack/local-up-cluster.sh and hack/test-cmd.sh
2015-01-08 13:01:24 -05:00
Clayton Coleman 8262c30c97 Improve serialization round trip test and add v1beta3 2015-01-08 12:44:28 -05:00
Clayton Coleman 8f65442c2f Client should not include ns/ for non-namespaced calls in v1beta3 2015-01-08 12:44:07 -05:00
Tim Hockin eac982137f Merge pull request #3260 from commonlisp/master
NewMainKubelet validates SyncFrequency, minimum GC age, etc.
2015-01-08 08:20:55 -08:00
Clayton Coleman 2741126cd4 Merge pull request #3239 from smarterclayton/healthy_registry_should_decorate
HealthyRegistry should only decorate minions, not omit them
2015-01-08 10:34:56 -05:00
deads2k 480635bb72 Revert "Revert "add kubeconfig types""
This reverts commit 02dbad7094.
2015-01-08 09:42:30 -05:00
George Kuan 06475fc4b4 NewMainKubelet validates Kubelet config parameters
Fixes issue #3202.
* Validates SyncFrequency and minimum GC age and propagates error to RunKubelet
* Defaults for Kubelet config and minor cleanup
* cmd Kubelet MinimumGCAge to 1m instead of 0
2015-01-07 18:50:53 -08:00
Daniel Smith 95dd2d7ca6 reuse function; never ever unlock without defer 2015-01-07 17:07:12 -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 cc04db13d6 fix overeager find-and-replace 2015-01-07 16:38:27 -08:00
Tim Hockin 5f2dae4dd8 Merge pull request #3195 from lavalamp/numericWire
Add numeric type into api
2015-01-07 16:15:52 -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 0d4d1e28b2 Merge pull request #3270 from smarterclayton/kubelet_fixes
Cleanup to client initialization in Kubelet
2015-01-07 15:55:38 -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
Daniel Smith 3e0b4cfabc Merge pull request #3269 from smarterclayton/fix_legacy_support
Make RESTClient more generic to API version, simplify version handling
2015-01-07 15:24:02 -08:00
Daniel Smith 2050131b9a ParseOrDie -> MustParse; stop returning pointer 2015-01-07 15:21:35 -08:00
Daniel Smith 35f54addca Update more packages, tests, binaries for quantity
make etcd registry pass test
fix kubelet config for quantity
fix openstack for quantity
fix controller for quantity
fix last tests for quantity
wire into binaries
fix controller manager
fix build for 32 bit systems
2015-01-07 15:21:35 -08:00
Daniel Smith 0d628b3bff Make semantic deep equal public feature
* Use semantic deep equal when validating
* More test cases for deep equal
2015-01-07 15:21:34 -08:00
Daniel Smith 7f49ba0dcf Put quantity into packages
kubelet, GCE, validation, client
2015-01-07 15:21:34 -08:00
Daniel Smith 40d29f4f08 Remove obsolete resources package 2015-01-07 15:21:34 -08:00
Daniel Smith 894a3e6d3f Wire resource.Quantity into api 2015-01-07 15:21:34 -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
Brendan Burns 86b26a4289 Merge pull request #3287 from smarterclayton/endpoints_controller_is_chatty
endpoints controller is too verbose
2015-01-07 14:50:42 -08:00
Clayton Coleman 16683b409f endpoints controller is too verbose
Logging at v(3) instead of v(0)
2015-01-07 17:19:49 -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
Tim Hockin 9afede7e61 Merge pull request #3278 from brendandburns/rel8
Create release 0.8.0
2015-01-07 13:14:49 -08:00
Brendan Burns 5963c1735e Merge pull request #3283 from GoogleCloudPlatform/revert-3273-fix_master_conflict
Revert "Fix inflight merge conflict by adapting rollingupdate to #2861"
2015-01-07 12:43:26 -08:00
Brendan Burns cfffe7049c Revert "Fix inflight merge conflict by adapting rollingupdate to #2861" 2015-01-07 12:42:28 -08:00
Brendan Burns 02dbad7094 Revert "add kubeconfig types" 2015-01-07 12:39: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 5ceffe2625 Add tests to ensure resthandler invokes admission control 2015-01-07 14:42:31 -05:00
derekwaynecarr 74d2ee69eb Fix boilerplate and make stub controller 2015-01-07 14:42:31 -05:00
derekwaynecarr 1e2b995a79 Fix admission control in tests 2015-01-07 14:42:31 -05:00
derekwaynecarr 520ae3ef27 Implement basic admission control framework 2015-01-07 14:42:31 -05:00
Clayton Coleman ba53d723d3 Clean up how client is passed to Kubelet in preparation for reading pods
Also fixes how Kubelet server looks up pods by name when there are multiple
sources.
2015-01-07 14:40:37 -05:00
Clayton Coleman 880ecef6fe Move locks on watch to allow testing blocking 2015-01-07 14:38:38 -05:00
Clayton Coleman 31fc19efe9 Watching on invalid label/field selectors should error 2015-01-07 14:38:38 -05:00
Clayton Coleman 3b5c3ec786 Merge pull request #3220 from lavalamp/deepEqual
Add *useful* DeepEqual
2015-01-07 14:24:26 -05:00
Brendan Burns fa140767eb Kubernetes version v0.8.0-dev 2015-01-07 11:22:53 -08:00
Brendan Burns 2b47f5482c Kubernetes version v0.8.0 2015-01-07 11:22:53 -08:00
Clayton Coleman e0f0b9c588 Fix inflight merge conflict by adapting rollingupdate to #2861
ClientConfig changed right as rollingupdate was introduced.
2015-01-07 13:51:43 -05:00
Clayton Coleman 585d2c8cbd Merge pull request #2861 from deads2k/deads-add-clicfg-types
add kubeconfig types
2015-01-07 13:35:50 -05:00
bgrant0607 6e24273937 Merge pull request #3061 from jlowdermilk/rollingupdate
Add a rollingupdate lib and command to kubectl
2015-01-07 10:33:39 -08:00
deads2k 0e688dc271 add kubeconfig file 2015-01-07 13:09:10 -05:00
Tim Hockin 512e262dc8 Merge pull request #3264 from brendandburns/race
Add a lock around the other docker pull.
2015-01-07 09:54:47 -08:00
Clayton Coleman a0d711816d HealthyRegistry should only decorate minions, not omit them
Fixes #3098
2015-01-07 11:09:41 -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
Brendan Burns 7c69570663 Add a lock around the other docker pull.
Fixes e2e (I hope), certainly passes e2e in my client.
2015-01-07 00:17:57 -08:00
Brendan Burns 733e12e19b Revert "Avoid race between image pull and garbage collect"
This reverts commit 6f14e2e210.
2015-01-06 23:23:23 -08:00
Brendan Burns e84b4d03a4 Merge pull request #3183 from anguslees/pull-lock
Avoid race between image pull and garbage collect
2015-01-06 21:23:29 -08:00
Jeff Lowdermlk 0ab39df66b Add a rollingupdate lib and command to kubectl
Also decouple conditions from client for testability.
2015-01-06 17:29:05 -08:00
Tim Hockin ded3ef2827 Merge pull request #1185 from lavalamp/numeric
Numeric type for resources
2015-01-06 17:05:08 -08:00
Daniel Smith cd58e49c78 remove 'i' and nasty rounding; test 2015-01-06 16:13:17 -08:00
Dawn Chen e3c019128e Add EventSource to api to have both Component and Host information. 2015-01-06 16:08:20 -08:00
Dawn Chen 2b91c1417c Create selfLink for pods from config files and indicate hostname as part of event source. 2015-01-06 16:08:20 -08:00
Daniel Smith 2d2df5593c Add examples & clarify comments further 2015-01-06 15:18:22 -08:00
Daniel Smith 4b61dc84cb Merge pull request #3223 from liggitt/default_conversion
Make default conversion behavior available to conversion funcs
2015-01-06 13:22:25 -08:00
Tim Hockin 1ec3457fc9 Beef up validation tests 2015-01-06 13:02:42 -08:00
Tim Hockin 8b42534f77 Fix kubelet config tests 2015-01-06 13:02:41 -08:00
Tim Hockin 6e8f5fea8e Fix validation for BoundPods to allow defaults
Thunking to Manifest makes a copy of the input, which is not useful for
defaulting.
2015-01-06 13:02:41 -08:00
Tim Hockin 33fcef6b42 Convert DNSPolicy wrt ContainerManifest 2015-01-06 13:02:40 -08:00
Daniel Smith 937d88d829 Merge pull request #3240 from brendandburns/tap
Fix the service proxy to re-poll on watch closure no matter what.
2015-01-06 11:59:11 -08:00
Brendan Burns 0f60d7bca3 Reset the resourceVersion so that we poll again for non-timeout errors. 2015-01-06 11:45:03 -08:00
Tim Hockin 88fe5c6f46 Never set pod.Name in kubelet config code
I think it is time to tighten up input requirements.  The validation code will
reject a pod that has an empty name field.
2015-01-06 11:14:19 -08:00
Jordan Liggitt 2da1865fc2 Make default conversion behavior available to conversion funcs 2015-01-06 13:38:57 -05:00
Joe Beda b736b42585 Merge pull request #3224 from liggitt/self_signed
Automatically serve API on https with self-signed cert if no cert is provided
2015-01-06 10:29:05 -08:00
Eric Tune 25a19039fb Merge pull request #3250 from a-robinson/failure
Minor doc/comment fixes that came up while reading through some code.
2015-01-06 10:18:36 -08:00
Alex Robinson d8dab5dfb9 Minor doc/comment fixes that came up while reading through some code. 2015-01-06 18:05:33 +00:00
Jordan Liggitt b36a44f036 Automatically serve API on https with self-signed cert 2015-01-06 09:36:29 -05:00
Brendan Burns cdad54ba48 Merge pull request #3232 from nikhiljindal/third_party
Moving swagger-ui files from www/swagger-ui to third_party/swagger-ui
2015-01-05 21:38:41 -08:00
Daniel Smith b7b2ee34de add flag helper func 2015-01-05 17:35:41 -08:00
Daniel Smith 6c6cdac0e9 Add accessor functions; round-trip test 2015-01-05 17:35:41 -08:00
Daniel Smith 18b896645c Saturation + test, also test negative numbers 2015-01-05 17:20:38 -08:00
Daniel Smith 394c9452e7 Start numeric type for resources 2015-01-05 17:20:38 -08:00
saadali 4bf191a30a Update copyright year for files created today to current year 2015-01-05 17:01:02 -08:00
Tim Hockin cae572290b Merge pull request #3230 from saad-ali/hashingLogging
Improve kubelet logging around container being killed due to hash change
2015-01-05 16:48:29 -08:00
saadali d6d18a32e7 Replace %s with %q to make empty strings more obvious 2015-01-05 16:38:47 -08:00
nikhiljindal 1db30aeb51 Moving swagger-ui files from www/swagger-ui to third-party/swagger-ui
and adding LICENSE and README files
2015-01-05 16:27:33 -08:00
Tim Hockin 03baa7234a Merge pull request #3225 from dchen1107/clean
Move GetHostName and GetDockerEndpoint methods to pkg/util
2015-01-05 16:21:51 -08:00
saadali eb831919d9 Improve kubelet logging around container being killed due to hash change 2015-01-05 16:20:40 -08:00
saadali f92f830e1f Modify hash to be computed using spew library so that nested object values are used instead of pointer 2015-01-05 15:48:06 -08:00
Dawn Chen f718957a79 Move GetHostName and GetDockerEndpoint methods to pkg/util 2015-01-05 11:44:21 -08:00
Dawn Chen 78547d9a87 Merge pull request #3194 from vishh/stats
Update "/stats" endpoint on kubelet.
2015-01-05 11:23:00 -08:00
Daniel Smith f0b7743402 Add useful DeepEqual 2015-01-05 10:37:50 -08:00
Daniel Smith 83f1aa5546 Merge pull request #3178 from thockin/ptr-fields
Util to test if all ptr fields are nil
2015-01-05 10:35:32 -08:00
Tim Hockin e4d239cbb1 Util to test if all ptr fields are nil 2015-01-03 23:57:43 -08:00
Tim Hockin 6fcb646ca5 Set sync frequency during integration
Without this, the sync loop runs continuously.  IMO: This right here is
why open structs are inferior to explicity constructors that take 75
arguments - you can't forget to pass an argument.
2015-01-03 20:39:39 -08:00
Vishnu Kannan 3ef9e404c1 Update "/stats" endpoint on kubelet to take namespace as an argument as part of the API. 2015-01-03 02:17:25 +00:00
Daniel Smith 53a9d106c4 Merge pull request #3167 from thockin/affinity
Don't use pointers for session affinity
2014-12-30 17:43:47 -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
Angus Lees 6f14e2e210 Avoid race between image pull and garbage collect
Hold the pullLock while pulling regular container images, not just the
network container.

Also: previously, the locks were grabbed at too-low a layer in the
callstack, leaving a (narrow) window where images could be pulled and
then garbage collected before being used.

This change takes the existing pullLock a layer higher in the call stack
so the critical regions encompass the entire find+delete and pull+use
operation in both cases.
2014-12-31 11:50:40 +11:00
Clayton Coleman 8005c85e6c Rename HttpClientFunc -> HTTPClientFunc 2014-12-30 19:34:06 -05: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
Dawn Chen dc4e9d66f7 Merge pull request #3180 from thockin/util-mount
Add a util/mount pkg
2014-12-30 15:49:48 -08:00
Daniel Smith 6156526d92 Merge pull request #3133 from smarterclayton/remove_request_path
Introduce Resource/ResourceName/Prefix/Suffix options to RESTClient
2014-12-30 15:33:11 -08:00
Tim Hockin fc69379b8c Add a util/mount pkg 2014-12-30 14:38:49 -08:00
saadali e8d30f019d Modify "kubectl get events" to print FieldPath so BoundPod events for the same Pod but different containers can be differentiated 2014-12-29 21:32:49 -08:00
Daniel Smith 0155ede0c2 Merge pull request #3166 from dchen1107/pd
Propagate syncPod error as event to upper layer.
2014-12-29 16:16:53 -08:00
Dawn Chen d38613777b Propagate syncPod error as event to upper layer. 2014-12-29 15:42:47 -08:00
Tim Hockin ca27fb259c Don't use pointers for session affinity 2014-12-29 14:43:17 -08:00
Joe Beda 8eac7303fa Merge pull request #2989 from lavalamp/fix6
Fix proxy bug where it lies about encoding
2014-12-29 14:05:14 -08:00
Clayton Coleman e355f54eda Update references from Path() to the appropriate segment use 2014-12-29 15:38:52 -05:00
Clayton Coleman afedbba3fc Introduce Resource/ResourceName/Prefix/Suffix options to RESTClient
RESTClient is an abstraction for simplifying access to resources that
follow the Kubernetes API pattern.  Currently, both Namespace and Path
are coupled, which means changes across versions is complex.  In general,
most access to resources should be to a resource collection (e.g.
"services") with a name (e.g. "foo"). Other constructs, like prefix sections
("watch") or proposed suffix sections ("/pods/foo/spec") only modify this
core pattern.

This commit removes the Path() helper from Request and introduces:

* Prefix(segments ...string) - segments that should go to the beginning of the path.
* Suffix(segments ...string) - segments that should go to the end of the path.
* Resource(string) - collection name, should be after prefix
* Namespace(string) - if specified, should be set after resource but before name
* Name(string) - if specified, should be after namespace

Now, only Prefix and Suffix are order dependent (and with variadics, should be
simpler).  Resource, Namespace, and Name may be specified in any order.

Path() has been removed to prevent downstream consumers of RESTClient from experiencing
behavior change.
2014-12-29 15:37:30 -05:00
Daniel Smith 998061677b Merge pull request #2909 from smarterclayton/passversiontorestmapper
Allow --api-version to properly override various default behaviors in CLI
2014-12-29 12:14:32 -08:00
Daniel Smith 9873d8a7d5 Merge pull request #2958 from rajdeepd/master
Added test cases for NewKubeletClient with TLS enabled
2014-12-29 11:47:47 -08:00
saadali 99acb9688c Have Http Probe report "Unhealthy" on connection failure instead of "Unknown". 2014-12-29 11:09:06 -08:00
Tim Hockin e045c6ce2f Split portals into host and container
After this DNS is resolvable from the host, if the DNS server is targetted
explicitly.  This does NOT add the cluster DNS to the host's resolv.conf.  That
is a larger problem, with distro-specific tie-ins and circular deps.
2014-12-29 09:18:12 -08:00
Tim Hockin 652479a3b1 Add kubelet DNS flags & api disable for DNS
This adds --cluster_dns and --cluster_domain flags to kubelet.  If
non-empty, kubelet will set docker --dns and --dns-search flags based on
these.  It uses the cluster DNS and appends the hosts's DNS servers.
Likewise for DNS search domains.

This also adds API support to bypass cluster DNS entirely, needed to
bootstrap DNS.
2014-12-29 09:18:12 -08:00
Tim Hockin 6624b64f44 Merge pull request #3142 from vishh/oom_score
Set oom_score_adj for kubelet and kube-proxy to a low value
2014-12-23 17:24:30 -08:00
Vishnu Kannan 6f53f33fda Set oom_score_adj for kubelet and kube-proxy to a low value to help them survive system memory pressure. 2014-12-24 00:34:28 +00:00
Tim Hockin 1c9ac79e78 Merge pull request #3141 from lavalamp/optimize
Fix e2e; add template function to make this possible
2014-12-23 15:03:33 -08:00
Daniel Smith 7f46d420dd add existence func and unit test 2014-12-23 14:05:26 -08:00
Tim Hockin fb0a7a9693 Add apiserver proxy support for pods.
This is useful for testing mostly.
2014-12-23 12:51:24 -08:00
Daniel Smith 16c624b2e6 improve error reporting for bad templates 2014-12-23 11:21:38 -08:00
Brendan Burns 1d58958db8 Fix the build. 2014-12-23 10:28:26 -08:00
Brendan Burns c7d3b12d43 Merge pull request #2051 from anguslees/openstack-provider
Openstack provider
2014-12-23 09:33:19 -08:00
Daniel Smith 05a0c5ca17 Merge pull request #3097 from brendandburns/img
Add support for garbage collecting images.
2014-12-22 17:08:41 -08:00
Brendan Burns b8781c04bb Add support for garbage collecting images. 2014-12-22 16:56:58 -08:00
Daniel Smith bf67e14e9f Merge pull request #3096 from brendandburns/update
Clear node status before the validation check.
2014-12-22 16:39:02 -08:00
Daniel Smith 65cf5f29b7 Merge pull request #3095 from derekwaynecarr/events_not_namespace
Namespace scope events in storage
2014-12-22 16:01:38 -08:00
Daniel Smith 6916235513 Make locking simpler
add test for node existence cache behavior
2014-12-22 15:11:28 -08:00
Daniel Smith dc5383dcf8 add ttl as param to ip cache 2014-12-22 14:14:03 -08:00
Daniel Smith 545d87d554 Move clock to util 2014-12-22 14:14:03 -08:00
Daniel Smith 5b8e91595a Make pod listing costant-time
* move ip cache out of registry/pod
* combine, rationalize, and move pod status logic
* Fix unit and integration tests
2014-12-22 14:14:03 -08:00
Brendan Burns 9884142061 Clear node status before the validation check. 2014-12-22 11:57:31 -08:00
Clayton Coleman 203246b7e0 Allow the api-version on the command to override the client builder 2014-12-22 14:52:03 -05:00
Clayton Coleman 158f322301 Use preferred resource version 2014-12-22 14:46:31 -05:00
Clayton Coleman 8bef68d475 RESTMapper should take into account multiple versions
When a CLI command `kubectl get rc --api-version=v1beta3` is called,
the API resource name should match v1beta3, not whatever the default
RESTMapper version is.  This allows the correct resource name to be
returned ("replicationcontrollers", instead of "replicationControllers").
2014-12-22 14:46:31 -05:00
Daniel Smith 4ab8f238ce Fix proxy bug where it is confused by gzip encoding 2014-12-22 11:35:47 -08:00
derekwaynecarr b47cde2465 Namespace scope events in storage 2014-12-22 13:01:20 -05:00
derekwaynecarr 652b7aa665 Rename namespaceAsPath 2014-12-22 12:24:21 -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
Dawn Chen bbaff08991 Fixed #2632 2014-12-19 17:23:47 -08:00
Brendan Burns ba25ae49d7 Merge pull request #3070 from nikhiljindal/setApiVersion
Adding skeleton swagger UI
2014-12-19 17:16:04 -08:00
Daniel Smith 9fee1b0503 Merge pull request #3051 from brendandburns/flake
Add a PodUnknown phase and make ListPods return even when there are errors
2014-12-19 16:45:44 -08:00
nikhiljindal bf96e95899 ran gofmt 2014-12-19 16:16:54 -08:00
Brendan Burns 5e8490d5fe Add a PodUnknown phase and make ListPods return even when there are errors
obtaining info for some pods.
2014-12-19 15:08:48 -08:00
nikhiljindal f12f5ed34b 1. Adding swagger-ui/dist files.
2. Updating datafile.go to include it.
3. Updating master,go to use it.
2014-12-19 14:56:20 -08:00
bgrant0607 486e92963b Merge pull request #3043 from brendandburns/api
Add Host to PodSpec and add a predicate to make the scheduler work.
2014-12-19 13:35:05 -08:00
derekwaynecarr abb6632d75 Do not use namespace in url paths pre v1beta3 from client 2014-12-19 16:32:42 -05:00
Daniel Smith be9f3be709 better logging 2014-12-19 12:28:51 -08:00
Brendan Burns 5807b3d6bc Merge pull request #3031 from foleymic/master
Sticky Session Implementation
2014-12-19 10:12:08 -08:00
Brendan Burns 5c14fc610b Merge pull request #3045 from nikhiljindal/setApiVersion
Setting apiVersion in restful.WebService
2014-12-19 10:11:15 -08:00
Brendan Burns 96eede60dc Merge pull request #3047 from lavalamp/optimize
Remove an unneeded trip over the network when getting/listing pods.
2014-12-19 10:10:50 -08:00
Brendan Burns bcf87843df Merge pull request #3048 from saad-ali/3002
Fix Issue #3002: kubectl get pods/log podname don't work well together
2014-12-19 10:03:17 -08: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
saadali 0db4b8e2ad Fix Issue #3002: kubectl get pods/log podname don't work well together 2014-12-18 18:15:47 -08:00
Daniel Smith 5bd560de51 Merge pull request #2969 from liggitt/policy_groups
Initial addition of groups to user info and policy
2014-12-18 18:06:59 -08:00
Daniel Smith a63bd1bdfa Remove an unneeded trip over the network when getting/listing pods. 2014-12-18 17:47:59 -08:00
Dawn Chen f073ecf4cc Understand OOMKilled reason 2014-12-18 15:59:44 -08:00
Mike Foley c4e94efe16 Sticky Session Implementation
- Added process to cleanup stale session affinity records
- Automatically set cloud provided load balancer for sticky session if the service requires it - Note, this only works on GCE right now.
- Changed sessionAffinityMap a map to pointers instead of structs to improve performance
- Commented out cookie and protocol from sessionAffinityDetail to avoid confusion as it is not yet implemented.
2014-12-18 18:46:10 -05:00
nikhiljindal cfee8f1355 done 2014-12-18 15:38:09 -08:00
Vish Kannan c34f2d354c Merge pull request #3035 from dchen1107/master
Update fsouza/go-dockerclient pkg to latest revision and fix some compiling issues.
2014-12-18 14:07:40 -08:00
Dawn Chen 8860851f94 Merge pull request #3039 from brendandburns/e2e
Remove some dead code.
2014-12-18 14:04:27 -08:00
Dawn Chen 608c3d5046 Update kubelet package on latest go-dockerclient package. 2014-12-18 13:49:13 -08:00
Daniel Smith a50f8034c8 Merge pull request #3037 from smarterclayton/hide_spurious_watch_errors
When connections are broken on Watch, write fewer errors to logs
2014-12-18 13:33:03 -08:00
Brendan Burns 845fb5013d Remove some dead code. 2014-12-18 13:32:20 -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
Clayton Coleman b2434de777 When connections are broken on Watch, write fewer errors to logs
Watch depends on long running connections, which intervening proxies
may break without the control of the remote server. Specific errors
handled are io.EOF, io.EOF wrapped by *url.Error, http connection
reset errors (caused by race conditions in golang http code), and
connection reset by peer (simply tolerated).
2014-12-18 16:15:51 -05:00
Jordan Liggitt 9d8d313113 Initial addition of groups to user/policy 2014-12-18 15:33:45 -05:00
derekwaynecarr cbbe61d115 Fix path ordering in client 2014-12-18 15:27:27 -05:00
Daniel Smith af571a239e Merge pull request #3011 from saad-ali/2948
Issue 2948: fix "kubectl get events" result not sorted
2014-12-18 11:18:27 -08:00
saadali ae1db31a0f Issue 2948: fix "kubectl get events" result not sorted 2014-12-18 11:02:12 -08:00
Brendan Burns 82d0d68571 Merge pull request #3027 from jdef/rest_no_network_settings
only log about no network settings for running pods
2014-12-18 10:19:20 -08:00
Brendan Burns 36bc3604b9 Merge pull request #2893 from brendandburns/pd3
Make it easier to update nodes, make it possible to update capacity.
2014-12-18 10:18:54 -08:00
bgrant0607 0892fd3d6d Merge pull request #3029 from ddysher/get-err-code
Fix node Get() error code
2014-12-18 09:52:45 -08:00
bgrant0607 19f0b8b807 Merge pull request #2825 from mikedanese/scheduler-factory-plugins
Scheduler plugin configuration
2014-12-18 07:12:01 -08:00
Deyuan Deng 677f68ec02 Fix node Get() error code 2014-12-18 23:03:52 +08:00
James DeFelice b3c7aa8a53 only log about no network settings for running pods 2014-12-18 08:41:56 -05:00
Rajdeep Dua 05f0a9846b Added test cases for NewKubeletClient with TLS enabled 2014-12-18 00:57:33 -08:00
Brendan Burns b58785b27d Merge pull request #3019 from dchen1107/cleanup
suppress unnecessary stacktrace when http status code is redirect relate...
2014-12-17 22:08:43 -08:00
Brendan Burns 4427672cde Merge pull request #2875 from foleymic/master
add SessionAffinity type to ServiceSpec
2014-12-17 21:53:35 -08:00
Brendan Burns cf0b41535f Make it easier to update nodes, make it possible to update capacity. 2014-12-17 21:50:26 -08:00
Dawn Chen 71fc5940f1 suppress unnecessary stacktrace when http status code is redirect related. 2014-12-17 18:42:11 -08:00
Daniel Smith 8379966ac5 Merge pull request #3015 from brendandburns/fix
Remove HTTP Server support for pushing pods onto the kubelet.
2014-12-17 17:30:14 -08:00
Brendan Burns 928f52056e Remove HTTP Server support for pushing pods onto the kubelet. 2014-12-17 17:15:36 -08:00
Clayton Coleman 7fde4583f2 v1beta1 should return Minion as kind, rather than Node
This changes the internal name logic (for conversion) to prefer the
internal registered preferred name for a resource, and then makes
v1beta1 and v1beta2 prefer Minion.

Fixes #3010
2014-12-17 19:55:56 -05:00
Dawn Chen edfae8660e Merge pull request #2994 from brendandburns/exec
Track the sources that the kubelet has seen
2014-12-17 16:17:48 -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
bgrant0607 3f22854e77 Merge pull request #2999 from dchen1107/podstatus
Determine PodStatus based on ContainerStatus and RestartPolicy
2014-12-17 13:51:41 -08:00
Brendan Burns 7da0378f3c Track the sources that the kubelet has seen, and only delete pods
when every source has been seen at least once.
2014-12-17 13:08:43 -08:00
Mike Foley 569ce87f0e Updated types API to include session affinity. …
- changed CLIENT-IP and NONE to be ClientIP and None respectively
 - updated conversions to support translating between api versions.
 - updated validations to validate session affinity type if specified.
2014-12-17 15:59:20 -05:00
Dawn Chen deafd90280 PodStatus 2014-12-17 11:39:09 -08:00
Salvatore Dario MINONNE 61ac2f7437 kubectl delete command: adding labelSelector
Add a Visitor pattern on top of ResourcesFromArgs

Allows ResourcesFromArgs to return an opaque list of items and have client
commands react to them.

Change request.go to return apiserver errors for arbitrary status codes to
better respond to generic actions that don't make sense (kubectl delete operations foo)
2014-12-17 18:15:03 +00:00
Joe Beda 93ed9173e3 Merge pull request #2781 from commonlisp/master
simplify util.ErrorList by eliminating errorListInternal
2014-12-16 15:43:55 -08:00
Brendan Burns bb28949291 Merge pull request #2831 from jdef/unit_test_for_2815
unit test for #2815, as requested by @brendandburns
2014-12-16 15:08:41 -08:00
Brendan Burns 3a0d16ff35 Add an e2e test for exec liveness probes. Fix the docker exec integration. 2014-12-16 13:53:32 -08:00
derekwaynecarr 6694a45542 Add doc for {namespace} path param, fixup and verify proxy paths 2014-12-16 15:55:48 -05:00
derekwaynecarr 14dd466e83 Added namespace test case for POST to /pods 2014-12-16 15:55:48 -05:00
derekwaynecarr 7cf664439f Move namespace from query param to path part 2014-12-16 15:55:47 -05:00
Clayton Coleman eb0f32bf0f Merge pull request #2911 from smarterclayton/event_field_should_be_condition
Rename Event.Status to Event.Condition to match v1beta3 agreement
2014-12-16 14:28:18 -05:00
Joe Beda 52e165a4fd Merge pull request #2954 from brendandburns/rev7
Release v0.7.0
2014-12-16 09:25:26 -08:00
Clayton Coleman 4760b287f9 Merge pull request #2956 from ddysher/fix-magic-number
Use constant for port number
2014-12-16 09:44:15 -05:00
Clayton Coleman 88715cc6ef Rename Event.Status to Event.Condition to match v1beta3 agreement
Question - should this be a phase?  Seems like no, since phase implies
defined lifecycle and this field is explicitly not defined.
2014-12-16 09:43:10 -05:00
Clayton Coleman 61e8baeef9 Merge pull request #2662 from ddysher/node-watch
Enable watch on node labels.
2014-12-16 09:17:43 -05:00
Deyuan Deng 3f84924095 Use constant for port number 2014-12-16 11:45:27 +08:00
Daniel Smith 6902f6ab21 Merge pull request #2844 from brendandburns/fix
Handle a missing apiserver flag better.
2014-12-15 17:25:09 -08:00
Brendan Burns feb80f0c52 Kubernetes version v0.7.0-dev 2014-12-15 16:57:39 -08:00
Brendan Burns ad44234f71 Kubernetes version v0.7.0 2014-12-15 16:57:39 -08:00
bgrant0607 f621a05d74 Merge pull request #2945 from smarterclayton/support_optional_swagger
Make Swagger API support optional, so that consumers can define their own
2014-12-15 16:13:13 -08:00
Deyuan Deng 45bfcb451b Enable watch on node changes. 2014-12-16 08:12:31 +08:00
bgrant0607 9bc8915eeb Merge pull request #2912 from smarterclayton/small_v1beta3_refactors_2
More small refactors for v1beta3 -> internal
2014-12-15 15:16:36 -08:00
Brendan Burns 1a5a7ebd69 Handle a missing apiserver flag better. 2014-12-15 15:14:41 -08:00
Brendan Burns 2c64db5943 Merge pull request #2938 from vishh/exec
Updated docker version that supports exec to '1.3.0'.
2014-12-15 14:49:12 -08:00
Clayton Coleman d9ad8cfac0 Conversions missing from v1beta1
They were in v1beta2, not sure how they got removed.
2014-12-15 16:50:05 -05:00
Clayton Coleman dadb8431c4 Remove internal PodState in favor of internal PodStatus object 2014-12-15 16:50:05 -05:00
Clayton Coleman 787b5c488a Add PodIP and Image to v1beta3
Fixes #2900
2014-12-15 16:50:05 -05:00
Clayton Coleman 1f442d4429 Remove LivenessProbe.Type in v1beta3 2014-12-15 16:50:05 -05:00
bgrant0607 9b40c52c24 Merge pull request #2910 from smarterclayton/small_v1beta3_refactors
Fix internal -> v1beta3 round trip issues
2014-12-15 13:21:12 -08:00
Daniel Smith f1f20f820a Merge pull request #2942 from brendandburns/kubelet
revert the revert along with fixes to make it pass e2e tests.
2014-12-15 13:17:52 -08:00
Daniel Smith a2638da2a7 Merge pull request #2899 from derekwaynecarr/update_generic_etcd
Update generic etcd to enable namespace scoped resources
2014-12-15 13:10:51 -08:00
Vishnu Kannan f4ef05bc20 Updated docker version that supports exec to '1.3.0'. 2014-12-15 20:44:58 +00:00
Clayton Coleman cd4135666e Make Swagger API support optional, so that consumers can define their own
OpenShift would like to also enable swagger, but we need to register our
services as swagger services prior to the SwaggerAPI being started. I've
added a bool (default false) to master.Config to enable swagger, and split
the method in master out so that a downstream consumer can call it.
2014-12-15 15:29:55 -05:00
Brendan Burns bf1a695be5 Merge pull request #2882 from bgrant0607/bugfix1
Count only non-dead pods in replicationController current state replicas count
2014-12-15 11:50:12 -08:00
Brendan Burns 2d1b279311 Merge pull request #2905 from smarterclayton/misc_cleanup
Small fixes to prepare for v1beta3
2014-12-15 11:49:29 -08:00
Brendan Burns af4fb611cf Merge pull request #2913 from smarterclayton/side_by_side_diff
Add a side-by-side diff option for verbose output
2014-12-15 11:48:08 -08:00
Brendan Burns d345dda1e5 Fix the kubelet uses api encode/decode by actually adding PodContainerInfo to v1beta1 2014-12-15 11:38:55 -08:00
Joe Beda 26e5c1d0eb Merge pull request #2928 from rajdeepd/master
Added test cases for Event Create and Event List
2014-12-15 11:11:37 -08:00
Brendan Burns a6f967b6e7 Revert "Revert "Add an api object for the kubelet, and a versioned endpoint.""
This reverts commit dcfcf315e5.
2014-12-15 09:29:04 -08:00
derekwaynecarr 92e2c2b302 Updated default function names, keyroot to keyrootfunc 2014-12-15 10:42:13 -05:00
derekwaynecarr 6353612f40 Update generic etcd to enable namespace scoped resources 2014-12-15 10:42:13 -05:00
jhadvig 019ca75fc6 Streaming container logs 2014-12-15 12:12:11 +01:00
Rajdeep Dua a6fd5601c2 Added test cases for
* Event Create
* Event List
2014-12-14 21:41:34 -08:00
Brendan Burns dcfcf315e5 Revert "Add an api object for the kubelet, and a versioned endpoint."
This reverts commit d4b9979382.
2014-12-12 21:13:44 -08:00
James DeFelice 3afc9fffba fixed minor formatting 2014-12-12 20:43:07 -05:00
Clayton Coleman 1edff23935 Merge pull request #2916 from lavalamp/fix3
Fix taking addr() of map value/key
2014-12-12 20:12:25 -05:00
Daniel Smith 3868417ec5 Merge pull request #2917 from dchen1107/cleanup
Make httplog more useful by using glog.*Depth.
2014-12-12 16:44:10 -08:00
Dawn Chen 83453baeb3 Make httplog more useful by using glog.*Depth.
Close #2100
2014-12-12 16:08:48 -08:00
Daniel Smith 9c0fbf1f02 Merge pull request #2908 from brendandburns/kubelet
Add an api object for the kubelet, and a versioned endpoint.
2014-12-12 16:01:46 -08:00
Brendan Burns d4b9979382 Add an api object for the kubelet, and a versioned endpoint. 2014-12-12 15:26:28 -08:00
Daniel Smith f3148e9965 Fix taking addr() of map value/key 2014-12-12 15:26:17 -08:00
Clayton Coleman b1b255f90a Prevent infinite loop in apiserver errorJSON 2014-12-12 18:23:17 -05:00
Clayton Coleman a636e44e3d Add a side-by-side diff option for verbose output
Make regular diff better by eliding pointer values
2014-12-12 18:14:46 -05:00
Clayton Coleman d6d87e1e3b Status should be a ListMeta, not ObjectMeta internally 2014-12-12 18:08:41 -05:00
Clayton Coleman eb906f2993 PodStatus Message needs to be round-trippable 2014-12-12 18:08:41 -05:00
Clayton Coleman 904d0d46c3 Rename ServerOp to Operation in v1beta3 and internal
Add the appropriate rename logic internally.
2014-12-12 18:08:41 -05:00
Brian Grant 9b539262a8 Count only non-dead pods in replicationController current state replicas count. 2014-12-12 22:23:14 +00: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
Brendan Burns 771c538932 Merge pull request #2864 from deads2k/deads-tighten-validation-on-bad-gets
tighten validation for client resource gets
2014-12-12 10:34:53 -08:00
Brendan Burns ad4185ef3a Merge pull request #2891 from rajdeepd/master
Added test case for events Create
2014-12-12 10:25:23 -08:00
bgrant0607 21a1bf24fa Merge pull request #2892 from erictune/delete_whoami
Remove whoami handler.
2014-12-12 09:51:27 -08:00
Tim Hockin 129074671c Merge pull request #2886 from brendandburns/pd2
Fix GCE-PD so that it works even if the PD is attached.
2014-12-12 08:54:22 -08:00
bgrant0607 ef76981e78 Merge pull request #2871 from zulily/kubectl-log-default-container
Modifies kubectl log cmd to not require container arg for single-contain...
2014-12-12 08:25:39 -08: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
Rajdeep Dua b5c3e2d619 Added test case for events Create 2014-12-11 20:46:35 -08:00
Dylan Carney ba5c18816e Updates kubectl log cmd per PR feedback 2014-12-11 17:44:44 -08:00
Clayton Coleman c5ba95ee26 Add Type() method on flags for compat with pflag library
Allows our flag objects to be used with both golang flags and pflags
2014-12-11 20:10:54 -05:00
Brendan Burns 3da84e1844 Fix GCE-PD so that it works even if the PD is already attached. 2014-12-11 16:41:01 -08:00
Vojtech Vitek (V-Teq) 87263b4380 Remove duplicated assignment from API conversion 2014-12-12 01:37:15 +01:00
Brendan Burns 1dcb025559 Handle PD already being attached to the machine. 2014-12-11 13:00:26 -08:00
Dylan Carney 3f88f27d7b Modifies kubectl log cmd to not require container arg for single-container pods (for #2847) 2014-12-11 12:32:18 -08:00
bgrant0607 ecbb6c45d0 Merge pull request #2315 from ddysher/node-status
Add node status to API object.
2014-12-11 10:19:17 -08:00
bgrant0607 222c819800 Merge pull request #2855 from brendandburns/validatez
Turn on node level validation, and make the validation set dynamic.
2014-12-11 09:56:47 -08:00
bgrant0607 2232a29af7 Merge pull request #2833 from liggitt/util_time
Use util.Time consistently in types.go
2014-12-11 09:17:50 -08:00
bgrant0607 473376b085 Merge pull request #2820 from ravigadde/master
MountPath in VolumeMount is a required field. Removing the omitempty.
2014-12-11 08:55:40 -08:00
deads2k fa900e5d67 require names for gets 2014-12-11 11:21:40 -05:00
Jordan Liggitt 51bfb50698 Use util.Time consistently in types.go 2014-12-11 11:14:25 -05:00
Deyuan Deng 0332c8d4d1 Add node status to API object (all versions). 2014-12-11 08:12:27 -05:00
Brendan Burns 59b5546b28 Turn on node level validation, and make the validation set dynamic. 2014-12-10 22:02:45 -08:00
Brendan Burns bac915a066 Return an error if a user attempts to create an externalized UDP balancer. 2014-12-10 20:08:03 -08:00
Joe Beda 5523e0344a Merge pull request #2814 from satnam6502/list
Do not consider an empty string to be an error in list.go
2014-12-10 16:31:18 -08:00
Dawn Chen 5865ab750e Merge pull request #2808 from simon3z/master
api: add container's id to ContainerStatus
2014-12-10 16:30:08 -08:00
Daniel Smith f81ec248d0 Merge pull request #2786 from smarterclayton/load_opaque_objects
Allow runtime.Object to be encoded as runtime.RawExtension
2014-12-10 16:24:05 -08:00
Joe Beda b7705d25c8 Merge pull request #2827 from liggitt/tlsv1
Bump minimum TLS version from SSLv3 to TLSv1.0
2014-12-10 13:15:29 -08:00
Ravi Gadde 66f21b0b8b MountPath in VolumeMount is a required field. Removing the omitempty for
json/yaml.

Removed omitempty for mountpath
2014-12-10 12:45:31 -08:00
Federico Simoncelli 4af64b8911 api: add container's id to ContainerStatus
Sometimes for external applications it is useful to correlate the pod
containers to the real docker instances.

This patch adds a new entry in the container status (containerID) which
is used to identify the instance.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-12-10 20:38:41 +00:00
James DeFelice 85b4b4677e unit test for #2815, as requested by @brendandburns 2014-12-10 15:33:38 -05:00
Dawn Chen 17475cdbe7 Merge pull request #2821 from lavalamp/fix
Allow, when testing, SelfLinks to be unset.
2014-12-10 12:10:51 -08:00
Dawn Chen 5c79668854 Merge pull request #2815 from jdef/inspect_tagged_image
inspect the full repo/image:tag name
2014-12-10 11:53:14 -08:00
Satnam Singh 7582884f30 Do not consider an empty string to be an error in list.go 2014-12-10 11:41:13 -08:00
Daniel Smith 272bfc97ed Merge pull request #2788 from smarterclayton/roundtrip_node_nodelist
Rename Minions -> Nodes internally
2014-12-10 11:12:15 -08:00
bgrant0607 2d57ac7e40 Merge pull request #2822 from mikedanese/kubelet-test-simplify
simplified TestNewKubeletClient in kubelet_test
2014-12-10 10:49:14 -08:00
bgrant0607 703cf28b65 Merge pull request #2823 from mikedanese/master
explicitly declare gce_cloud package name
2014-12-10 10:48:11 -08:00
Clayton Coleman 6ab6c90ce5 Merge pull request #2665 from ddysher/fix-watch-filter
Move watch filter into storage level
2014-12-10 12:31:55 -05:00
Clayton Coleman 0d887ae7b3 Change podStatus from Nodes.List() -> Nodes.Get(name)
Retrieves a lot less data
2014-12-10 12:08:19 -05:00
Clayton Coleman d1d7505272 Rename client Minions->Nodes, select the correct path for v1beta3
Replaces the client public interface but leaves old references to "minions"
for a later refactor.  Selects the path "nodes" for v1beta3 and "minions"
for older versions.
2014-12-10 12:08:19 -05:00
Clayton Coleman 9030759df8 Add 'nodes' everywhere 'minions' can be used in api / cli 2014-12-10 12:08:18 -05:00
Clayton Coleman 19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
Clayton Coleman 650aead4c4 Support Node/NodeList as a valid name in all versions
Also refactor v1beta1/conversion_test.go `v1beta` -> `current` to allow
easier cut and paste of tests.
2014-12-10 11:53:38 -05:00
Clayton Coleman 5447e74129 Node/Nodelist 2014-12-10 11:48:41 -05:00