Commit Graph

22 Commits (9dab67d106ce8751619fb5c711982a9b666e2b5a)

Author SHA1 Message Date
k8s-merge-robot 3ee833ca3b Merge pull request #25006 from liggitt/third-party-root-scope
Automatic merge from submit-queue

Make ThirdPartyResource a root scoped object

ThirdPartyResource (the registration of a third party type) belongs at the cluster scope. It results in resource handlers installed in every namespace, and the same name in two namespaces collides (namespace is ignored when determining group/kind).

ThirdPartyResourceData (an actual instance of that type) is still namespace-scoped.

This PR moves ThirdPartyResource to be a root scope object. Someone previously using ThirdPartyResource definitions in alpha should be able to move them from namespace to root scope like this:

setup (run on 1.2):
```
kubectl create ns ns1

echo '{"kind":"ThirdPartyResource","apiVersion":"extensions/v1beta1","metadata":{"name":"foo.example.com"},"versions":[{"name":"v8"}]}' | kubectl create -f - --namespace=ns1

echo '{"kind":"Foo","apiVersion":"example.com/v8","metadata":{"name":"MyFoo"},"testkey":"testvalue"}' | kubectl create -f - --namespace=ns1
```

export:
```
kubectl get thirdpartyresource --all-namespaces -o yaml > tprs.yaml
```

remove namespaced kind registrations (this shouldn't remove the data of that type, which is another possible issue):
```
kubectl delete -f tprs.yaml
```

... upgrade ...

re-register the custom types at the root scope:
```
kubectl create -f tprs.yaml
```

Additionally, pre-1.3 clients that expect to read/write ThirdPartyResource at a namespace scope will not be compatible with 1.3+ servers, and 1.3+ clients that expect to read/write ThirdPartyResource at a root scope will not be compatible with pre-1.3 servers.
2016-05-06 20:50:35 -07:00
Wojciech Tyczynski b4c83022e3 Add NegotiatedSerializer to config 2016-05-04 10:02:58 +02:00
Jordan Liggitt e41d504739 Move ThirdPartyResource to root scoped object 2016-04-30 01:06:07 -04:00
Chao Xu 8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
Chao Xu db518cf4ff Generated code 2016-04-06 10:17:48 -07:00
Chao Xu 49559a3332 Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
Chao Xu 3aa26565fc move fake discovery client to pkg/client/typed/discovery/fake 2016-03-25 16:02:08 -07:00
Kris 4d404ded1a Moving adapters to their own packages 2016-03-14 14:22:34 -07:00
Jordan Liggitt d008283942 Tolerate multiple registered versions in a single group 2016-03-12 12:49:41 -05:00
Kris dbde4fd798 Move the discovery client to its own package 2016-03-04 13:44:52 -08:00
Abhi Shah b25a48d605 Revert "Move discovery client to its own package" 2016-03-04 09:24:54 -08:00
Kris f22664159e Move the discovery client to its own package 2016-02-29 15:37:21 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
k8s-merge-robot 9b9b4fee11 Merge pull request #21278 from pweil-/include-discovery
Auto commit by PR queue bot
2016-02-22 09:31:53 -08:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
Paul Weil 6cf26a41c0 include discovery client in adaptor 2016-02-16 15:21:19 -05:00
Chao Xu 97aecd002a remove underscore in imported pkg names 2016-02-16 10:54:51 -08:00
Chao Xu 1c84552757 generate the versioned clientset 2016-02-10 17:22:46 -08:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00