forked from nigle-dev/odoo-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
247 lines (247 loc) · 5.36 KB
/
deployment.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
apiVersion: v1
data:
migration.yml: |
migration:
options:
install_command: odoo --without-demo=${WITHOUT_DEMO:-True}
versions:
- version: setup
operations:
pre:
- "sh -c 'psql -c \"CREATE EXTENSION pg_trgm;\"'"
addons:
upgrade:
- community_org_base
- version: 0.0.1
addons:
upgrade:
- community_org_install
- version: 0.0.2
addons:
upgrade:
- all
- version: 0.0.3
addons:
upgrade:
- all
- version: 0.0.4
addons:
upgrade:
- community_org_install
kind: ConfigMap
metadata:
name: migration-config
---
apiVersion: v1
kind: Service
metadata:
name: db
spec:
ports:
- name: tcp-postgresql
port: 5432
protocol: TCP
targetPort: tcp-postgresql
selector:
app.kubernetes.io/name: db
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: odoo
name: odoo
spec:
ports:
- name: http
port: 8069
targetPort: 8069
- name: http-lp
port: 8072
targetPort: 8072
selector:
app.kubernetes.io/name: odoo
status:
loadBalancer: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-db
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-odoo
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: odoo
name: odoo
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: odoo
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: odoo
spec:
containers:
- env:
- name: ADDONS_PATH
value: /odoo/local-src,/odoo/external-src,/odoo/src/addons
- name: ADMIN_PASSWD
value: admin
- name: DB_NAME
value: odoodb
- name: DB_PASS
value: odoo
- name: DB_USER
value: odoo
- name: DB_HOST
value: db
- name: DB_PORT
value: "5432"
- name: LOG_HANDLER
value: :WARN
- name: MARABUNTA_ALLOW_SERIE
value: "false"
- name: MARABUNTA_MODE
value: demo
- name: MARABUNTA_FORCE_VERSION
value: 0.0.4
- name: PATH
value: /usr/local/bin:/odoo/odoo-bin:/odoo/.local/bin:/home/nils/.local/bin:/home/nils/.krew/bin:/home/nils/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
- name: RUNNING_ENV
value: dev
- name: WITHOUT_DEMO
value: "false"
image: smoosedev/odoo_community:ada4c273
imagePullPolicy: IfNotPresent
name: odoo
ports:
- containerPort: 8069
resources:
requests:
cpu: 300m
memory: 512Mi
volumeMounts:
- mountPath: /odoo/data
name: data-odoo
- mountPath: /odoo/migration.yml
name: odoo-migration-vars
subPath: migration.yml
restartPolicy: Always
securityContext:
fsGroup: 999
runAsGroup: 999
runAsUser: 999
volumes:
- name: data-odoo
persistentVolumeClaim:
claimName: data-odoo
- configMap:
name: migration-config
name: odoo-migration-vars
status: {}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app.kubernetes.io/name: db
name: db
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: db
serviceName: db
template:
metadata:
labels:
app.kubernetes.io/name: db
spec:
containers:
- env:
- name: POSTGRES_PASSWORD
value: odoo
- name: POSTGRES_USER
value: odoo
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: LC_COLLATE
value: en_US.UTF-8
image: postgres:9.6
name: db
ports:
- containerPort: 5432
name: tcp-postgresql
protocol: TCP
resources:
requests:
cpu: 250m
memory: 256Mi
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data-db
restartPolicy: Always
volumes:
- name: data-db
persistentVolumeClaim:
claimName: data-db
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/issuer: letsencrypt-production
cert-manager.io/issuer-kind: ClusterIssuer
labels:
app.kubernetes.io/instance: odoo
app.kubernetes.io/name: odoo
name: odoo
spec:
ingressClassName: nginx
rules:
- host: odoo-community.k8s.onestein.eu
http:
paths:
- backend:
service:
name: odoo
port:
name: http
path: /
pathType: ImplementationSpecific
- backend:
service:
name: odoo
port:
name: http-lp
path: /longpolling
pathType: ImplementationSpecific
tls:
- hosts:
- odoo-community.k8s.onestein.eu
secretName: odoo-community.k8s.onestein.eu-tls