-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathosseus.yaml
164 lines (153 loc) · 3.05 KB
/
osseus.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
##########################################
# Osseus Frontend Setup
##########################################
# Frontend Service
apiVersion: v1
kind: Service
metadata:
name: ui
spec:
type: NodePort
selector:
app: frontend
ports:
- port: 3000
targetPort: 3000
nodePort: 31100
---
# Server Service
apiVersion: v1
kind: Service
metadata:
name: node-server
spec:
selector:
app: frontend
ports:
- port: 8000
targetPort: 8000
---
# Frontend Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: osseus-frontend
labels:
app: frontend
spec:
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
hostNetwork: true
containers:
- name: client
image: anthonydevelops/front_end:dev
ports:
- containerPort: 3000
- containerPort: 8000
---
##########################################
# Osseus Agent Setup
##########################################
# Agent Service
apiVersion: v1
kind: Service
metadata:
name: agent-svc
spec:
selector:
app: backend
ports:
- port: 9191
targetPort: 9191
---
# Agent Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: osseus-backend
labels:
app: backend
spec:
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
hostNetwork: true
initContainers:
- name: init-service
image: busybox
command: ['sh', '-c', 'until nslookup etcd-svc; do echo waiting for etcd-svc; sleep 2; done;']
containers:
- name: agent
image: anthonydevelops/agent:dev
ports:
- containerPort: 9191
---
##########################################
# Osseus ETCD Setup
##########################################
# ETCD Service
apiVersion: v1
kind: Service
metadata:
name: etcd-svc
namespace: kube-system
labels:
app: osseus-etcd
spec:
selector:
app: osseus-etcd
ports:
- port: 12379
---
# ETCD Deployment
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: osseus-etcd
namespace: kube-system
spec:
serviceName: osseus-etcd
selector:
matchLabels:
app: osseus-etcd
template:
metadata:
labels:
app: osseus-etcd
spec:
hostNetwork: true
containers:
- name: etcd
image: quay.io/coreos/etcd:v3.3.8
env:
- name: ETCDCTL_API
value: "3"
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
command:
- /bin/sh
args:
- -c
- /usr/local/bin/etcd --name=osseus-etcd --data-dir=/var/etcd/osseus-data
--advertise-client-urls=http://0.0.0.0:12379 --listen-client-urls=http://0.0.0.0:12379 --listen-peer-urls=http://0.0.0.0:12380
volumeMounts:
- name: var-etcd
mountPath: /var/etcd
volumes:
- name: var-etcd
hostPath:
path: /var/etcd