diff --git a/api/examples/controller-list.json b/api/examples/controller-list.json deleted file mode 100644 index e883abac57fe0..0000000000000 --- a/api/examples/controller-list.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "kind": "ReplicationControllerList", - "apiVersion": "v1beta1", - "items": [ - { - "id": "test-run", - "desiredState": { - "replicas": 2, - "replicaSelector": { - "name": "test-run" - }, - "podTemplate": { - "desiredState": { - "manifest": { - "version": "v1beta1", - "image": "dockerfile/nginx", - "networkPorts": [ - { - "hostPort": 8080, - "containerPort": 80 - } - ] - } - }, - "labels": { - "name": "test-run" - } - } - }, - "labels": { - "name": "test-run" - } - } - ] -} diff --git a/api/examples/external-service.json b/api/examples/external-service.json deleted file mode 100644 index 95d796e5049dc..0000000000000 --- a/api/examples/external-service.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "example", - "kind": "Service", - "apiVersion": "v1beta1", - "port": 8000, - "labels": { - "name": "nginx" - }, - "selector": { - "name": "nginx" - }, - "createExternalLoadBalancer": true -} diff --git a/api/examples/pod-list.json b/api/examples/pod-list.json deleted file mode 100644 index 5d867de44e490..0000000000000 --- a/api/examples/pod-list.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "kind": "PodList", - "apiVersion": "v1beta1", - "items": [ - { - "id": "my-pod-1", - "labels": { - "name": "test-run", - "replicationcontroller": "test-run" - }, - "desiredState": { - "manifest": { - "version": "v1beta1", - "id": "my-pod-1", - "containers": [{ - "name": "nginx", - "image": "dockerfile/nginx", - "ports": [{ - "hostPort": 8080, - "containerPort": 80 - }] - }] - } - }, - "currentState": { - "host": "host-1" - } - }, - { - "id": "my-pod-2", - "labels": { - "name": "test-run", - "replicationcontroller": "test-run" - }, - "desiredState": { - "manifest": { - "version": "v1beta1", - "id": "my-pod-2", - "containers": [{ - "name": "nginx", - "image": "dockerfile/nginx", - "ports": [{ - "hostPort": 8080, - "containerPort": 80 - }] - }] - } - }, - "currentState": { - "host": "host-2" - } - } - ] -} diff --git a/api/examples/service-list.json b/api/examples/service-list.json deleted file mode 100644 index 1ac2963b1643c..0000000000000 --- a/api/examples/service-list.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "kind": "ServiceList", - "apiVersion": "v1beta1", - "items": [ - { - "id": "example1", - "port": 8000, - "labels": { - "name": "nginx" - }, - "selector": { - "name": "nginx" - } - }, - { - "id": "example2", - "port": 8080, - "labels": { - "env": "prod", - "name": "jetty" - }, - "selector": { - "env": "prod", - "name": "jetty" - } - } - ] -} diff --git a/api/examples/service.json b/api/examples/service.json deleted file mode 100644 index f4ae8993db3a0..0000000000000 --- a/api/examples/service.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "kind": "Service", - "apiVersion": "v1beta1", - "id": "example", - "port": 8000, - "labels": { - "name": "nginx" - }, - "selector": { - "name": "nginx" - } -} diff --git a/api/examples/controller.json b/cmd/integration/controller.json similarity index 100% rename from api/examples/controller.json rename to cmd/integration/controller.json diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index ea6e23180ed59..619e3ecf4b6d7 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -273,7 +273,7 @@ func podExists(c *client.Client, podNamespace string, podID string) wait.Conditi } func runReplicationControllerTest(c *client.Client) { - data, err := ioutil.ReadFile("api/examples/controller.json") + data, err := ioutil.ReadFile("cmd/integration/controller.json") if err != nil { glog.Fatalf("Unexpected error: %v", err) } diff --git a/docs/getting-started-guides/azure.md b/docs/getting-started-guides/azure.md index 5e267616df308..a93d8e27c8241 100644 --- a/docs/getting-started-guides/azure.md +++ b/docs/getting-started-guides/azure.md @@ -64,7 +64,7 @@ You can create a pod like this: ``` cd kubernetes -cluster/kubectl.sh create -f api/examples/pod.json +cluster/kubectl.sh create -f docs/getting-started-guides/pod.json ``` Where pod.json contains something like: diff --git a/docs/getting-started-guides/gce.md b/docs/getting-started-guides/gce.md index b4b1cb8f74059..3d4b2f7733112 100644 --- a/docs/getting-started-guides/gce.md +++ b/docs/getting-started-guides/gce.md @@ -77,7 +77,7 @@ can create a pod like this: ```bash cd kubernetes -cluster/kubectl.sh create -f api/examples/pod.json +cluster/kubectl.sh create -f docs/getting-started-guides/pod.json ``` Where pod.json contains something like: diff --git a/docs/getting-started-guides/locally.md b/docs/getting-started-guides/locally.md index 031f119584827..2cb93e1603159 100644 --- a/docs/getting-started-guides/locally.md +++ b/docs/getting-started-guides/locally.md @@ -74,7 +74,7 @@ However you can't view the nginx start page on localhost. To verify that nginx i You can control the specifications of a pod via a user defined manifest, and reach nginx through your browser on the port specified therein: ``` -cluster/kubectl.sh create -f api/examples/pod.json +cluster/kubectl.sh create -f docs/getting-started-guides/pod.json ``` Congratulations! diff --git a/api/examples/pod.json b/docs/getting-started-guides/pod.json similarity index 100% rename from api/examples/pod.json rename to docs/getting-started-guides/pod.json diff --git a/examples/examples_test.go b/examples/examples_test.go index 26fde45d18b3c..d680cd2b683f3 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -98,14 +98,11 @@ func walkJSONFiles(inDir string, fn func(name, path string, data []byte)) error func TestExampleObjectSchemas(t *testing.T) { cases := map[string]map[string]runtime.Object{ - "../api/examples": { - "controller": &api.ReplicationController{}, - "controller-list": &api.ReplicationControllerList{}, - "pod": &api.Pod{}, - "pod-list": &api.PodList{}, - "service": &api.Service{}, - "external-service": &api.Service{}, - "service-list": &api.ServiceList{}, + "../docs/getting-started-guides": { + "pod": &api.Pod{}, + }, + "../cmd/integration": { + "controller": &api.ReplicationController{}, }, "../examples/guestbook": { "frontend-controller": &api.ReplicationController{},