Commit Graph

2533 Commits (250b9ccd74f948f01c067d5adac964f974468826)

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