k3s/pkg/kubectl/resource
k8s-merge-robot 07929972a3 Merge pull request #18835 from brendandburns/3rdparty
Automatic merge from submit-queue

Add support for 3rd party objects to kubectl

@deads2k @jlowdermilk

Instructions for playing around with this:

Run an apiserver with third party resources turned on (`--runtime-config=extensions/v1beta1=true,extensions/v1beta1/thirdpartyresources=true`)

Then you should be able to:

```
kubectl create -f rsrc.json
```

```json
{
  "metadata": {
    "name": "foo.company.com"
  },
  "apiVersion": "extensions/v1beta1",
  "kind": "ThirdPartyResource",
  "versions": [
    {
      "apiGroup": "group",
      "name": "v1"
    },
    {
      "apiGroup": "group",
      "name": "v2"
    }
  ]
}
```

Once that is done, you should be able to:

```
curl http://<server>/apis/company.com/v1/foos
```

```
curl -X POST -d @${HOME}/foo.json http://localhost:8080/apis/company.com/v1/namespaces/default/foos
```

```json
{
  "kind": "Foo",
  "apiVersion": "company.com/v1",
  "metadata": {
    "name": "baz"
  },
  "someField": "hello world",
  "otherField": 1
}
```

After this PR, you can do:

```
kubectl create -f foo.json
```

```
kubectl get foos
```

etc.
2016-03-31 18:09:56 -07:00
..
builder.go allow kubectl cmd to process dirs recursively 2016-03-28 12:44:21 -07:00
builder_test.go Update guestbook examples; replace RC concepts with Deployment 2016-03-30 14:16:52 -07:00
doc.go
helper.go Can't replace a generic resource that is cluster scoped 2016-02-12 16:20:37 -05:00
helper_test.go Can't replace a generic resource that is cluster scoped 2016-02-12 16:20:37 -05:00
interfaces.go Move restclient to its own package 2016-02-29 12:05:13 -08:00
mapper.go Add third party support to kubectl 2016-03-31 10:53:32 -07:00
result.go Add third party support to kubectl 2016-03-31 10:53:32 -07:00
selector.go Add the client side bits of kubectl export 2015-12-22 10:41:59 -08:00
visitor.go Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding. 2016-03-18 12:35:27 +01:00