Skip to content

Commit 084a36f

Browse files
Sebastian FlorekSebastian Florek
authored andcommitted
Merge pull request #553 from cheld/examples
Add yaml files for testing purposes
2 parents 40ffe25 + a193688 commit 084a36f

File tree

2 files changed

+201
-0
lines changed

2 files changed

+201
-0
lines changed
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: redis-master
5+
labels:
6+
app: redis
7+
tier: backend
8+
role: master
9+
spec:
10+
ports:
11+
# the port that this service should serve on
12+
- port: 6379
13+
targetPort: 6379
14+
selector:
15+
app: redis
16+
tier: backend
17+
role: master
18+
---
19+
apiVersion: v1
20+
kind: ReplicationController
21+
metadata:
22+
name: redis-master
23+
# these labels can be applied automatically
24+
# from the labels in the pod template if not set
25+
labels:
26+
app: redis
27+
role: master
28+
tier: backend
29+
spec:
30+
# this replicas value is default
31+
# modify it according to your case
32+
replicas: 1
33+
# selector can be applied automatically
34+
# from the labels in the pod template if not set
35+
# selector:
36+
# app: guestbook
37+
# role: master
38+
# tier: backend
39+
template:
40+
metadata:
41+
labels:
42+
app: redis
43+
role: master
44+
tier: backend
45+
spec:
46+
containers:
47+
- name: master
48+
image: redis
49+
resources:
50+
requests:
51+
cpu: 100m
52+
memory: 100Mi
53+
ports:
54+
- containerPort: 6379
55+
---
56+
apiVersion: v1
57+
kind: Service
58+
metadata:
59+
name: redis-slave
60+
labels:
61+
app: redis
62+
tier: backend
63+
role: slave
64+
spec:
65+
ports:
66+
# the port that this service should serve on
67+
- port: 6379
68+
selector:
69+
app: redis
70+
tier: backend
71+
role: slave
72+
---
73+
apiVersion: v1
74+
kind: ReplicationController
75+
metadata:
76+
name: redis-slave
77+
# these labels can be applied automatically
78+
# from the labels in the pod template if not set
79+
labels:
80+
app: redis
81+
role: slave
82+
tier: backend
83+
spec:
84+
# this replicas value is default
85+
# modify it according to your case
86+
replicas: 2
87+
# selector can be applied automatically
88+
# from the labels in the pod template if not set
89+
# selector:
90+
# app: guestbook
91+
# role: slave
92+
# tier: backend
93+
template:
94+
metadata:
95+
labels:
96+
app: redis
97+
role: slave
98+
tier: backend
99+
spec:
100+
containers:
101+
- name: slave
102+
image: gcr.io/google_samples/gb-redisslave:v1
103+
resources:
104+
requests:
105+
cpu: 100m
106+
memory: 100Mi
107+
env:
108+
- name: GET_HOSTS_FROM
109+
value: env
110+
# If your cluster config does not include a dns service, then to
111+
# instead access an environment variable to find the master
112+
# service's host, comment out the 'value: dns' line above, and
113+
# uncomment the line below.
114+
# value: env
115+
ports:
116+
- containerPort: 6379
117+
---
118+
apiVersion: v1
119+
kind: Service
120+
metadata:
121+
name: frontend
122+
labels:
123+
app: guestbook
124+
tier: frontend
125+
spec:
126+
# if your cluster supports it, uncomment the following to automatically create
127+
# an external load-balanced IP for the frontend service.
128+
type: LoadBalancer
129+
ports:
130+
# the port that this service should serve on
131+
- port: 80
132+
selector:
133+
app: guestbook
134+
tier: frontend
135+
---
136+
apiVersion: v1
137+
kind: ReplicationController
138+
metadata:
139+
name: frontend
140+
# these labels can be applied automatically
141+
# from the labels in the pod template if not set
142+
labels:
143+
app: guestbook
144+
tier: frontend
145+
spec:
146+
# this replicas value is default
147+
# modify it according to your case
148+
replicas: 1
149+
# selector can be applied automatically
150+
# from the labels in the pod template if not set
151+
# selector:
152+
# app: guestbook
153+
# tier: frontend
154+
template:
155+
metadata:
156+
labels:
157+
app: guestbook
158+
tier: frontend
159+
spec:
160+
containers:
161+
- name: php-redis
162+
image: gcr.io/google_samples/gb-frontend:v3
163+
resources:
164+
requests:
165+
cpu: 500m
166+
memory: 100Mi
167+
env:
168+
- name: GET_HOSTS_FROM
169+
value: env
170+
# If your cluster config does not include a dns service, then to
171+
# instead access environment variables to find service host
172+
# info, comment out the 'value: dns' line above, and uncomment the
173+
# line below.
174+
# value: env
175+
ports:
176+
- containerPort: 80
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v1
2+
kind: ReplicationController
3+
metadata:
4+
name: a-replication-controller-name-with-max-length-a123456789b123456789c123456789d123456789e123456789f123456789g123456789h123456789i123456789j123456789k123456789l123456789m123456789n123456789o123456789p123456789q123456789r123456789s123456789t123456789-1-end
5+
labels:
6+
app: hello-world
7+
test: some-value
8+
rc.label.prefix.segment.with.253.chars.a123456789b123456789c123456789d123456789e123456789f123456789g123456789h123456789i123456789j123456789k123456789j123456789l123456789m123456789n123456789o123456789p123456789q123456789r123456789s123456789t.fujitsu.com/label-name-segment-with-63-chars-a123456789b123456789c1234-end: label-max-value-with-63-chars-a123456789b123456789c1234567-end
9+
spec:
10+
replicas: 1
11+
template:
12+
metadata:
13+
labels:
14+
rc.label.prefix.segment.with.253.chars.a123456789b123456789c123456789d123456789e123456789f123456789g123456789h123456789i123456789j123456789k123456789j123456789l123456789m123456789n123456789o123456789p123456789q123456789r123456789s123456789t.fujitsu.com/label-name-segment-with-63-chars-a123456789b123456789c1234-end: label-max-value-with-63-chars-a123456789b123456789c1234567-end
15+
kind: testing
16+
spec:
17+
containers:
18+
- name: tutum-hello-world-container-with-63-chars-a123456789b12345-end
19+
image: tutum/hello-world
20+
resources:
21+
requests:
22+
cpu: 100m
23+
memory: 100Mi
24+
ports:
25+
- containerPort: 80

0 commit comments

Comments
 (0)