-
Notifications
You must be signed in to change notification settings - Fork 195
/
Copy pathdeployments.yml
119 lines (119 loc) · 2.38 KB
/
deployments.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "shynet-webserver"
namespace: "default"
labels:
app: "shynet-webserver"
spec:
replicas: 3
selector:
matchLabels:
app: "shynet-webserver"
template:
metadata:
labels:
app: "shynet-webserver"
spec:
containers:
- name: "shynet-webserver"
image: "milesmcc/shynet:edge" # Change to the version appropriate for you (e.g., :latest)
imagePullPolicy: Always
envFrom:
- secretRef:
name: shynet-settings
---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: "shynet-celeryworker"
namespace: "default"
labels:
app: "shynet-celeryworker"
spec:
replicas: 3
selector:
matchLabels:
app: "shynet-celeryworker"
template:
metadata:
labels:
app: "shynet-celeryworker"
spec:
containers:
- name: "shynet-celeryworker"
image: "milesmcc/shynet:edge" # Change to the version appropriate for you (e.g., :latest)
command: ["./celeryworker.sh"]
imagePullPolicy: Always
envFrom:
- secretRef:
name: shynet-settings
---
apiVersion: v1
kind: Service
metadata:
name: shynet-redis
spec:
ports:
- port: 6379
name: redis
clusterIP: None
selector:
app: shynet-redis
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: shynet-redis
spec:
selector:
matchLabels:
app: shynet-redis
serviceName: shynet-redis
replicas: 1
template:
metadata:
labels:
app: shynet-redis
spec:
containers:
- name: shynet-redis
image: redis:latest
imagePullPolicy: Always
ports:
- containerPort: 6379
name: redis
---
apiVersion: v1
kind: Service
metadata:
name: shynet-webserver-service
spec:
type: ClusterIP
ports:
- port: 8080
selector:
app: shynet-webserver
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: shynet-webserver-ingress
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
spec:
rules:
- host: shynet.rmrm.io
http:
paths:
- backend:
serviceName: shynet-webserver-service
servicePort: 8080
path: /
- host: shynet-beta.rmrm.io
http:
paths:
- backend:
serviceName: shynet-webserver-service
servicePort: 8080
path: /