Skip to content

Commit

Permalink
new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sub-mod committed Feb 19, 2015
1 parent 2cc5dd5 commit a749efa
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 63 deletions.
23 changes: 7 additions & 16 deletions examples/guestbook/guestbook_ns/frontend-controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"metadata": {
"name": "frontend-controller",
"name": "frontend",
"labels": {
"name": "frontend",
"template": "frontend"
"name": "frontend"
}
},
"spec": {
Expand All @@ -15,31 +14,23 @@
},
"template": {
"metadata": {
"name": "frontend-controller",
"name": "frontend",
"labels": {
"name": "frontend",
"uses": "redisslave,redis-master",
"template": "frontend"
"name": "frontend"
}
},
"spec": {
"volumes": null,
"containers": [
{
"name": "php-redis",
"image": "kubernetes/example-guestbook-php-redis",
"ports": [
{
"containerPort": 80,
"hostPort": 8000
}
"containerPort": 80
}
]
}
],
"restartPolicy": {
"always": {}
},
"dnsPolicy": "ClusterFirst"
]
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions examples/guestbook/guestbook_ns/frontend_service.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
"apiVersion": "v1beta3",
"metadata": {
"name": "frontend",
"labels": {},
"labels": {"name": "frontend"},
},
"spec": {
"port": 80,
"port": 0,
"containerPort": 80,
"protocol": "TCP",
"selector": {
"name": "frontend"
},
"containerPort": 80,
"sessionAffinity": "None"
}
}
}
5 changes: 2 additions & 3 deletions examples/guestbook/guestbook_ns/redis-master-service.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
}
},
"spec": {
"port": 6379,
"port": 10000,
"containerPort": 6379,
"protocol": "TCP",
"selector": {
"name": "redis-master"
},
"sessionAffinity": "None"
}
}
}
41 changes: 24 additions & 17 deletions examples/guestbook/guestbook_ns/redis-master.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
{
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"kind": "Pod",
"id": "redis-master",
"metadata": {
"name": "redis-master",
"labels": {
"name": "redis-master"
"name": "redis-master",
"template": "redis-master"
}
},
"spec": {
"volumes": null,
"resources": {},
"containers": [
{
"name": "master",
"image": "dockerfile/redis",
"ports": [
"replicas": 1,
"selector": {
"name": "redis-master"
},
"template": {
"metadata": {
"name": "redis-master",
"labels": {
"name": "redis-master"
}
},
"spec": {
"containers": [
{
"containerPort": 6379,
"hostPort": 6379,
"protocol": "TCP"
"name": "master",
"image": "dockerfile/redis",
"ports": [
{
"containerPort": 6379,
"protocol": "TCP"
}
]
}
]
}
],
"restartPolicy": {
"always": {}
}
}
}

23 changes: 7 additions & 16 deletions examples/guestbook/guestbook_ns/redis-slave-controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,35 @@
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"metadata": {
"name": "redis-slave-controller",
"name": "redis-slave",
"labels": {
"name": "redisslave",
"template": "redisslave"
"name": "redis-slave"
}
},
"spec": {
"replicas": 2,
"selector": {
"name": "redisslave"
"name": "redis-slave"
},
"template": {
"metadata": {
"name": "redis-slave-controller",
"name": "redis-slave",
"labels": {
"name": "redisslave",
"template": "redisslave",
"uses": "redis-master"
"name": "redis-slave"
}
},
"spec": {
"volumes": null,
"containers": [
{
"name": "slave",
"image": "brendanburns/redis-slave",
"ports": [
{
"containerPort": 6379,
"hostPort": 6380
"containerPort": 6379
}
]
}
],
"restartPolicy": {
"always": {}
},
"dnsPolicy": "ClusterFirst"
]
}
}
}
Expand Down
11 changes: 5 additions & 6 deletions examples/guestbook/guestbook_ns/redis-slave-service.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "redisslave",
"name": "redis-slave",
"labels": {
"name": "redisslave"
"name": "redis-slave"
}
},
"spec": {
"port": 6379,
"port": 10001,
"containerPort": 6379,
"protocol": "TCP",
"selector": {
"name": "redisslave"
},
"sessionAffinity": "None"
"name": "redis-slave"
}
}
}

0 comments on commit a749efa

Please sign in to comment.