mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #5124 from MikeJeffrey/ex3
Deleting old sample JSON; moving those in use; updating references
This commit is contained in:
		@@ -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"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
@@ -1,13 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "id": "example",
 | 
			
		||||
  "kind": "Service",
 | 
			
		||||
  "apiVersion": "v1beta1",
 | 
			
		||||
  "port": 8000,
 | 
			
		||||
  "labels": {
 | 
			
		||||
     "name": "nginx"
 | 
			
		||||
  },
 | 
			
		||||
  "selector": {
 | 
			
		||||
     "name": "nginx"
 | 
			
		||||
  },
 | 
			
		||||
  "createExternalLoadBalancer": true
 | 
			
		||||
}
 | 
			
		||||
@@ -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"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
@@ -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"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "kind": "Service",
 | 
			
		||||
  "apiVersion": "v1beta1",
 | 
			
		||||
  "id": "example",
 | 
			
		||||
  "port": 8000,
 | 
			
		||||
  "labels": {
 | 
			
		||||
     "name": "nginx"
 | 
			
		||||
  },
 | 
			
		||||
  "selector": {
 | 
			
		||||
     "name": "nginx"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -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)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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:
 | 
			
		||||
 
 | 
			
		||||
@@ -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!
 | 
			
		||||
 
 | 
			
		||||
@@ -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{},
 | 
			
		||||
		"../docs/getting-started-guides": {
 | 
			
		||||
			"pod": &api.Pod{},
 | 
			
		||||
			"pod-list":         &api.PodList{},
 | 
			
		||||
			"service":          &api.Service{},
 | 
			
		||||
			"external-service": &api.Service{},
 | 
			
		||||
			"service-list":     &api.ServiceList{},
 | 
			
		||||
		},
 | 
			
		||||
		"../cmd/integration": {
 | 
			
		||||
			"controller": &api.ReplicationController{},
 | 
			
		||||
		},
 | 
			
		||||
		"../examples/guestbook": {
 | 
			
		||||
			"frontend-controller":     &api.ReplicationController{},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user