Commit Graph

17 Commits (ab7d039c81a2dcf35b83ce7e4a35151ae2e176fc)

Author SHA1 Message Date
Chao Xu dc2e12d2f8 manual changes to patch subresource 2016-07-12 11:09:27 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Oleg Shaldybin 1f48cd27e7 Expect namespace deletion in NamespaceController
Using new fake clientset registry exposes the actual flow on pending
namespace finalization: get namespace, create finalizer, list pods and
delete namespace if there are no pods.
2016-06-28 11:54:13 -07:00
Oleg Shaldybin 10e75946a2 Track object modifications in fake clientset
Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-28 10:59:54 -07:00
k8s-merge-robot 93037844c1 Merge pull request #27293 from caesarxuchao/add-patch-to-clientset
Automatic merge from submit-queue

[client-gen]Add Patch to clientset

* add the Patch() method to the clientset. 
* I have to rename the existing Patch() method of `Event` to PatchWithEventNamespace() to avoid overriding.
* some minor changes to the fake Patch action.

cc @Random-Liu since he asked for the method
@kubernetes/sig-api-machinery 

ref #26580 

```release-note
Add the Patch method to the generated clientset.
```
2016-06-25 19:15:11 -07:00
saadali 926bb4cca0 Add patch status to Node internalclientset 2016-06-19 23:54:02 -07:00
Chao Xu a29f6aa8ae add Patch to clientsets 2016-06-17 10:30:58 -07:00
Clayton Coleman c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
zhangke 3eb9aff216 Update fake.go 2016-05-17 19:00:34 +08:00
Chao Xu 8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07:00
Wojciech Tyczynski 2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Chao Xu c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
Chao Xu e2d02abb83 fix fixture for #17922 2016-01-31 11:36:36 -08:00
Clayton Coleman efe88e0818 Update client library to react to changes in Decoding 2016-01-22 13:27:24 -05:00
Chao Xu fb81b2278e client-gen now generates the fake client. 2016-01-19 17:27:17 -08:00