Skip to content

Commit

Permalink
add v3 json files for guesybook-go
Browse files Browse the repository at this point in the history
  • Loading branch information
sub-mod committed Feb 19, 2015
1 parent 46c5862 commit 027c1ac
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 0 deletions.
39 changes: 39 additions & 0 deletions examples/guestbook-go/guestbook-go_v3/guestbook-controller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"metadata": {
"name": "guestbook",
"labels": {
"name": "guestbook"
}
},
"spec": {
"replicas": 3,
"selector": {
"name": "guestbook"
},
"template": {
"metadata": {
"name": "guestbook",
"labels": {
"name": "guestbook"
}
},
"spec": {
"containers": [
{
"image": "kubernetes/guestbook",
"name": "guestbook",
"ports": [
{
"name": "http-server",
"containerPort": 3000,
"protocol": "TCP"
}
]
}
]
}
}
}
}
19 changes: 19 additions & 0 deletions examples/guestbook-go/guestbook-go_v3/guestbook-service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "guestbook",
"labels": {
"name": "guestbook"
}
},
"spec": {
"port": 3000,
"containerPort": "http-server",
"protocol": "TCP",
"createExternalLoadBalancer": true,
"selector": {
"name": "guestbook"
}
}
}
43 changes: 43 additions & 0 deletions examples/guestbook-go/guestbook-go_v3/redis-master-controller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"id": "redis-master",
"metadata": {
"name": "redis-master",
"labels": {
"name": "redis",
"role": "master"
}
},
"spec": {
"replicas": 1,
"selector": {
"name": "redis",
"role": "master"
},
"template": {
"metadata": {
"name": "redis-master",
"labels": {
"name": "redis",
"role": "master"
}
},
"spec": {
"containers": [
{
"name": "redis-master",
"image": "gurpartap/redis",
"ports": [
{
"name": "redis-server",
"containerPort": 6379,
"protocol": "TCP"
}
]
}
]
}
}
}
}
20 changes: 20 additions & 0 deletions examples/guestbook-go/guestbook-go_v3/redis-master-service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "redis-master",
"labels": {
"name": "redis",
"role": "master"
}
},
"spec": {
"port": 6379,
"containerPort": "redis-server",
"protocol": "TCP",
"selector": {
"name": "redis",
"role": "master"
}
}
}
48 changes: 48 additions & 0 deletions examples/guestbook-go/guestbook-go_v3/redis-slave-controller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"kind": "ReplicationController",
"apiVersion": "v1beta3",
"id": "redis-slave",
"metadata": {
"name": "redis-slave",
"labels": {
"name": "redis",
"role": "slave"
}
},
"spec": {
"replicas": 1,
"selector": {
"name": "redis",
"role": "slave"
},
"template": {
"metadata": {
"name": "redis-slave",
"labels": {
"name": "redis",
"role": "slave"
}
},
"spec": {
"containers": [
{
"name": "redis-slave",
"image": "gurpartap/redis",
"command": [
"sh",
"-c",
"redis-server /etc/redis/redis.conf --slaveof $REDIS_MASTER_SERVICE_HOST $REDIS_MASTER_SERVICE_PORT"
],
"ports": [
{
"name": "redis-server",
"containerPort": 6379,
"protocol": "TCP"
}
]
}
]
}
}
}
}
20 changes: 20 additions & 0 deletions examples/guestbook-go/guestbook-go_v3/redis-slave-service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"kind": "Service",
"apiVersion": "v1beta3",
"metadata": {
"name": "redis-slave",
"labels": {
"name": "redis",
"role": "slave"
}
},
"spec": {
"port": 6379,
"containerPort": "redis-server",
"protocol": "TCP",
"selector": {
"name": "redis",
"role": "slave"
}
}
}

0 comments on commit 027c1ac

Please sign in to comment.