-
Notifications
You must be signed in to change notification settings - Fork 12
/
app.yaml
43 lines (43 loc) · 852 Bytes
/
app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
kind: Service
apiVersion: v1
metadata:
name: rainbow-deploys
spec:
type: NodePort
selector:
app: rainbow-deploys
# this is the key here - it allows us to match only pods of the currently active color
color: __COLOR__
ports:
- protocol: TCP
port: 8080
nodePort: 31080
name: http
- protocol: TCP
port: 8081
nodePort: 31081
name: tcp
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rainbow-deploys-__COLOR__
labels:
app: rainbow-deploys
spec:
replicas: 2
selector:
matchLabels:
app: rainbow-deploys
template:
metadata:
labels:
app: rainbow-deploys
color: __COLOR__
spec:
containers:
- name: rainbow-deploy
image: bdimcheff/rainbow-deploys:__COLOR__
ports:
- containerPort: 8080
- containerPort: 8081