Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e49f0de9
Commit
e49f0de9
authored
Nov 09, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14256 from linzichang/fixup-guestbook
Auto commit by PR queue bot
parents
3e5589c1
2afda9f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
374 additions
and
23 deletions
+374
-23
README.md
examples/guestbook/README.md
+0
-0
frontend.yaml
examples/guestbook/all-in-one/frontend.yaml
+59
-0
guestbook-all-in-one.yaml
examples/guestbook/all-in-one/guestbook-all-in-one.yaml
+176
-0
redis-slave.yaml
examples/guestbook/all-in-one/redis-slave.yaml
+61
-0
frontend-controller.yaml
examples/guestbook/frontend-controller.yaml
+17
-4
frontend-service.yaml
examples/guestbook/frontend-service.yaml
+5
-3
redis-master-controller.yaml
examples/guestbook/redis-master-controller.yaml
+20
-4
redis-master-service.yaml
examples/guestbook/redis-master-service.yaml
+6
-2
redis-slave-controller.yaml
examples/guestbook/redis-slave-controller.yaml
+21
-5
redis-slave-service.yaml
examples/guestbook/redis-slave-service.yaml
+6
-2
kubectl.go
test/e2e/kubectl.go
+3
-3
No files found.
examples/guestbook/README.md
View file @
e49f0de9
This diff is collapsed.
Click to expand it.
examples/guestbook/all-in-one/frontend.yaml
0 → 100644
View file @
e49f0de9
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
frontend
labels
:
app
:
guestbook
tier
:
frontend
spec
:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
# type: LoadBalancer
ports
:
# the port that this service should serve on
-
port
:
80
selector
:
app
:
guestbook
tier
:
frontend
---
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
frontend
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
app
:
guestbook
tier
:
frontend
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
3
# selector can be applied automatically
# from the labels in the pod template if not set
# selector:
# app: guestbook
# tier: frontend
template
:
metadata
:
labels
:
app
:
guestbook
tier
:
frontend
spec
:
containers
:
-
name
:
php-redis
image
:
gcr.io/google_samples/gb-frontend:v3
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
env
:
-
name
:
GET_HOSTS_FROM
value
:
dns
# If your cluster config does not include a dns service, then to
# instead access environment variables to find service host
# info, comment out the 'value: dns' line above, and uncomment the
# line below.
# value: env
ports
:
-
containerPort
:
80
examples/guestbook/all-in-one/guestbook-all-in-one.yaml
0 → 100644
View file @
e49f0de9
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
redis-master
labels
:
app
:
redis
tier
:
backend
role
:
master
spec
:
ports
:
# the port that this service should serve on
-
port
:
6379
targetPort
:
6379
selector
:
app
:
redis
tier
:
backend
role
:
master
---
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
redis-master
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
app
:
redis
role
:
master
tier
:
backend
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
1
# selector can be applied automatically
# from the labels in the pod template if not set
# selector:
# app: guestbook
# role: master
# tier: backend
template
:
metadata
:
labels
:
app
:
redis
role
:
master
tier
:
backend
spec
:
containers
:
-
name
:
master
image
:
redis
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
ports
:
-
containerPort
:
6379
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
redis-slave
labels
:
app
:
redis
tier
:
backend
role
:
slave
spec
:
ports
:
# the port that this service should serve on
-
port
:
6379
selector
:
app
:
redis
tier
:
backend
role
:
slave
---
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
redis-slave
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
app
:
redis
role
:
slave
tier
:
backend
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
2
# selector can be applied automatically
# from the labels in the pod template if not set
# selector:
# app: guestbook
# role: slave
# tier: backend
template
:
metadata
:
labels
:
app
:
redis
role
:
slave
tier
:
backend
spec
:
containers
:
-
name
:
slave
image
:
gcr.io/google_samples/gb-redisslave:v1
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
env
:
-
name
:
GET_HOSTS_FROM
value
:
dns
# If your cluster config does not include a dns service, then to
# instead access an environment variable to find the master
# service's host, comment out the 'value: dns' line above, and
# uncomment the line below.
# value: env
ports
:
-
containerPort
:
6379
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
frontend
labels
:
app
:
guestbook
tier
:
frontend
spec
:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
# type: LoadBalancer
ports
:
# the port that this service should serve on
-
port
:
80
selector
:
app
:
guestbook
tier
:
frontend
---
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
frontend
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
app
:
guestbook
tier
:
frontend
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
3
# selector can be applied automatically
# from the labels in the pod template if not set
# selector:
# app: guestbook
# tier: frontend
template
:
metadata
:
labels
:
app
:
guestbook
tier
:
frontend
spec
:
containers
:
-
name
:
php-redis
image
:
gcr.io/google_samples/gb-frontend:v3
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
env
:
-
name
:
GET_HOSTS_FROM
value
:
dns
# If your cluster config does not include a dns service, then to
# instead access environment variables to find service host
# info, comment out the 'value: dns' line above, and uncomment the
# line below.
# value: env
ports
:
-
containerPort
:
80
examples/guestbook/all-in-one/redis-slave.yaml
0 → 100644
View file @
e49f0de9
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
redis-slave
labels
:
app
:
redis
role
:
slave
tier
:
backend
spec
:
ports
:
# the port that this service should serve on
-
port
:
6379
selector
:
app
:
redis
role
:
slave
tier
:
backend
---
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
redis-slave
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
app
:
redis
role
:
slave
tier
:
backend
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
2
# selector can be applied automatically
# from the labels in the pod template if not set
# selector:
# app: guestbook
# role: slave
# tier: backend
template
:
metadata
:
labels
:
app
:
redis
role
:
slave
tier
:
backend
spec
:
containers
:
-
name
:
slave
image
:
gcr.io/google_samples/gb-redisslave:v1
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
env
:
-
name
:
GET_HOSTS_FROM
value
:
dns
# If your cluster config does not include a dns service, then to
# instead access an environment variable to find the master
# service's host, comment out the 'value: dns' line above, and
# uncomment the line below.
# value: env
ports
:
-
containerPort
:
6379
examples/guestbook/frontend-controller.yaml
View file @
e49f0de9
...
@@ -2,20 +2,33 @@ apiVersion: v1
...
@@ -2,20 +2,33 @@ apiVersion: v1
kind
:
ReplicationController
kind
:
ReplicationController
metadata
:
metadata
:
name
:
frontend
name
:
frontend
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
labels
:
name
:
frontend
app
:
guestbook
tier
:
frontend
spec
:
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
3
replicas
:
3
selector
:
# selector can be applied automatically
name
:
frontend
# from the labels in the pod template if not set
# selector:
# app: guestbook
# tier: frontend
template
:
template
:
metadata
:
metadata
:
labels
:
labels
:
name
:
frontend
app
:
guestbook
tier
:
frontend
spec
:
spec
:
containers
:
containers
:
-
name
:
php-redis
-
name
:
php-redis
image
:
gcr.io/google_samples/gb-frontend:v3
image
:
gcr.io/google_samples/gb-frontend:v3
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
env
:
env
:
-
name
:
GET_HOSTS_FROM
-
name
:
GET_HOSTS_FROM
value
:
dns
value
:
dns
...
...
examples/guestbook/frontend-service.yaml
View file @
e49f0de9
...
@@ -3,13 +3,15 @@ kind: Service
...
@@ -3,13 +3,15 @@ kind: Service
metadata
:
metadata
:
name
:
frontend
name
:
frontend
labels
:
labels
:
name
:
frontend
app
:
guestbook
tier
:
frontend
spec
:
spec
:
# if your cluster supports it, uncomment the following to automatically create
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
# an external load-balanced IP for the frontend service.
# type: LoadBalancer
# type: LoadBalancer
ports
:
ports
:
# the port that this service should serve on
# the port that this service should serve on
-
port
:
80
-
port
:
80
selector
:
selector
:
name
:
frontend
app
:
guestbook
tier
:
frontend
examples/guestbook/redis-master-controller.yaml
View file @
e49f0de9
...
@@ -2,19 +2,35 @@ apiVersion: v1
...
@@ -2,19 +2,35 @@ apiVersion: v1
kind
:
ReplicationController
kind
:
ReplicationController
metadata
:
metadata
:
name
:
redis-master
name
:
redis-master
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
labels
:
name
:
redis-master
app
:
redis
role
:
master
tier
:
backend
spec
:
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
1
replicas
:
1
selector
:
# selector can be applied automatically
name
:
redis-master
# from the labels in the pod template if not set
# selector:
# app: guestbook
# role: master
# tier: backend
template
:
template
:
metadata
:
metadata
:
labels
:
labels
:
name
:
redis-master
app
:
redis
role
:
master
tier
:
backend
spec
:
spec
:
containers
:
containers
:
-
name
:
master
-
name
:
master
image
:
redis
image
:
redis
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
ports
:
ports
:
-
containerPort
:
6379
-
containerPort
:
6379
examples/guestbook/redis-master-service.yaml
View file @
e49f0de9
...
@@ -3,11 +3,15 @@ kind: Service
...
@@ -3,11 +3,15 @@ kind: Service
metadata
:
metadata
:
name
:
redis-master
name
:
redis-master
labels
:
labels
:
name
:
redis-master
app
:
redis
role
:
master
tier
:
backend
spec
:
spec
:
ports
:
ports
:
# the port that this service should serve on
# the port that this service should serve on
-
port
:
6379
-
port
:
6379
targetPort
:
6379
targetPort
:
6379
selector
:
selector
:
name
:
redis-master
app
:
redis
role
:
master
tier
:
backend
examples/guestbook/redis-slave-controller.yaml
View file @
e49f0de9
...
@@ -2,20 +2,36 @@ apiVersion: v1
...
@@ -2,20 +2,36 @@ apiVersion: v1
kind
:
ReplicationController
kind
:
ReplicationController
metadata
:
metadata
:
name
:
redis-slave
name
:
redis-slave
# these labels can be applied automatically
# from the labels in the pod template if not set
labels
:
labels
:
name
:
redis-slave
app
:
redis
role
:
slave
tier
:
backend
spec
:
spec
:
# this replicas value is default
# modify it according to your case
replicas
:
2
replicas
:
2
selector
:
# selector can be applied automatically
name
:
redis-slave
# from the labels in the pod template if not set
# selector:
# app: guestbook
# role: slave
# tier: backend
template
:
template
:
metadata
:
metadata
:
labels
:
labels
:
name
:
redis-slave
app
:
redis
role
:
slave
tier
:
backend
spec
:
spec
:
containers
:
containers
:
-
name
:
worker
-
name
:
slave
image
:
gcr.io/google_samples/gb-redisslave:v1
image
:
gcr.io/google_samples/gb-redisslave:v1
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
env
:
env
:
-
name
:
GET_HOSTS_FROM
-
name
:
GET_HOSTS_FROM
value
:
dns
value
:
dns
...
...
examples/guestbook/redis-slave-service.yaml
View file @
e49f0de9
...
@@ -3,10 +3,14 @@ kind: Service
...
@@ -3,10 +3,14 @@ kind: Service
metadata
:
metadata
:
name
:
redis-slave
name
:
redis-slave
labels
:
labels
:
name
:
redis-slave
app
:
redis
role
:
slave
tier
:
backend
spec
:
spec
:
ports
:
ports
:
# the port that this service should serve on
# the port that this service should serve on
-
port
:
6379
-
port
:
6379
selector
:
selector
:
name
:
redis-slave
app
:
redis
role
:
slave
tier
:
backend
test/e2e/kubectl.go
View file @
e49f0de9
...
@@ -56,9 +56,9 @@ const (
...
@@ -56,9 +56,9 @@ const (
kittenImage
=
"gcr.io/google_containers/update-demo:kitten"
kittenImage
=
"gcr.io/google_containers/update-demo:kitten"
updateDemoSelector
=
"name=update-demo"
updateDemoSelector
=
"name=update-demo"
updateDemoContainer
=
"update-demo"
updateDemoContainer
=
"update-demo"
frontendSelector
=
"
name
=frontend"
frontendSelector
=
"
app=guestbook,tier
=frontend"
redisMasterSelector
=
"
name=redis-
master"
redisMasterSelector
=
"
app=redis,role=
master"
redisSlaveSelector
=
"
name=redis-
slave"
redisSlaveSelector
=
"
app=redis,role=
slave"
goproxyContainer
=
"goproxy"
goproxyContainer
=
"goproxy"
goproxyPodSelector
=
"name=goproxy"
goproxyPodSelector
=
"name=goproxy"
netexecContainer
=
"netexec"
netexecContainer
=
"netexec"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment