-
Notifications
You must be signed in to change notification settings - Fork 0
/
odoo15-deplyment.yaml
63 lines (63 loc) · 1.36 KB
/
odoo15-deplyment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo-deployment
labels:
app: odoo
spec:
replicas: 3
selector:
matchLabels:
app: odoo
template:
metadata:
labels:
app: odoo
spec:
initContainers:
- name: get-extra-addons
image: ubuntu:xenial
command: ["/bin/sh", "-c"]
args:
[
"apt update; apt install -y git; git clone https://github.com/fshahy/hostname /data",
]
volumeMounts:
- name: extra-addons
mountPath: /data
containers:
- name: odoo
image: odoo:15
ports:
- containerPort: 8069
env:
- name: "HOST"
value: "postgres-service"
envFrom:
- configMapRef:
name: postgres-configmap
volumeMounts:
- name: odoo-filestore
mountPath: /var/lib/odoo
- name: extra-addons
mountPath: /mnt/extra-addons
volumes:
- name: odoo-filestore
persistentVolumeClaim:
claimName: odoo-pvc
- name: extra-addons
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: odoo-service
labels:
app: odoo
spec:
type: LoadBalancer
ports:
- port: 8069
targetPort: 8069
selector:
app: odoo