Revert "Deleting old sample JSON; moving those in use; updating references"

This commit is contained in:
Alex Mohr
2015-03-09 14:18:40 -07:00
parent 54a0672e0b
commit 44b9b7aea5
12 changed files with 154 additions and 9 deletions

View File

@@ -0,0 +1,35 @@
{
"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"
}
}
]
}

View File

@@ -0,0 +1,23 @@
{
"id": "nginx-controller",
"apiVersion": "v1beta1",
"kind": "ReplicationController",
"desiredState": {
"replicas": 2,
"replicaSelector": {"name": "nginx"},
"podTemplate": {
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "nginx-controller",
"containers": [{
"name": "nginx",
"image": "dockerfile/nginx",
"ports": [{"containerPort": 80, "hostPort": 8080}]
}]
}
},
"labels": {"name": "nginx"}
}},
"labels": {"name": "nginx"}
}

View File

@@ -0,0 +1,13 @@
{
"id": "example",
"kind": "Service",
"apiVersion": "v1beta1",
"port": 8000,
"labels": {
"name": "nginx"
},
"selector": {
"name": "nginx"
},
"createExternalLoadBalancer": true
}

View File

@@ -0,0 +1,54 @@
{
"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"
}
}
]
}

32
api/examples/pod.json Normal file
View File

@@ -0,0 +1,32 @@
{
"kind": "Pod",
"apiVersion": "v1beta1",
"id": "php",
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "php",
"containers": [{
"name": "nginx",
"image": "dockerfile/nginx",
"ports": [{
"containerPort": 80,
"hostPort": 8081
}],
"livenessProbe": {
"enabled": true,
"type": "http",
"initialDelaySeconds": 30,
"httpGet": {
"path": "/index.html",
"port": "8081"
}
}
}]
}
},
"labels": {
"name": "foo"
}
}

View File

@@ -0,0 +1,28 @@
{
"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"
}
}
]
}

12
api/examples/service.json Normal file
View File

@@ -0,0 +1,12 @@
{
"kind": "Service",
"apiVersion": "v1beta1",
"id": "example",
"port": 8000,
"labels": {
"name": "nginx"
},
"selector": {
"name": "nginx"
}
}