k3s/pkg/registry
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
..
cachesize PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
componentstatus Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
configmap In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
controller Fix the rest of the code 2016-04-29 17:12:10 -04:00
daemonset In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
deployment Fix the rest of the code 2016-04-29 17:12:10 -04:00
endpoint In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
event In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
experimental/controller/etcd Fix the rest of the code 2016-04-29 17:12:10 -04:00
generic Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
horizontalpodautoscaler fix PrepareForUpdate bug for HPA 2016-05-05 09:39:03 +08:00
ingress In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
job Fix the rest of the code 2016-04-29 17:12:10 -04:00
limitrange In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
namespace Validate deletion timestamp doesn't change on update 2016-04-28 11:50:48 -04:00
node Fix the rest of the code 2016-04-29 17:12:10 -04:00
persistentvolume fix PrepareForUpdate bug for PV and PVC 2016-04-28 19:13:02 +08:00
persistentvolumeclaim fix PrepareForUpdate bug for PV and PVC 2016-04-28 19:13:02 +08:00
petset PetSet alpha controller 2016-05-04 18:39:17 -07:00
pod Merge pull request #24532 from rsc/master 2016-04-27 08:32:18 -07:00
podsecuritypolicy In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
podtemplate In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
registrytest Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
replicaset Fix the rest of the code 2016-04-29 17:12:10 -04:00
resourcequota In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
secret In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
service Fix the rest of the code 2016-04-29 17:12:10 -04:00
serviceaccount In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
thirdpartyresource Move ThirdPartyResource to root scoped object 2016-04-30 01:06:07 -04:00
thirdpartyresourcedata Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
OWNERS Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
doc.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00