initial kubernetes deployment yamls
This commit is contained in:
parent
3edf3aef2a
commit
326684292d
4
deployment/00-ns.yaml
Normal file
4
deployment/00-ns.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: pos
|
14
deployment/db-service.yaml
Normal file
14
deployment/db-service.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: db
|
||||||
|
name: db
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: postgres
|
||||||
|
port: 5432
|
||||||
|
targetPort: 5432
|
||||||
|
selector:
|
||||||
|
app: db
|
47
deployment/db-statefulset.yaml
Normal file
47
deployment/db-statefulset.yaml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: db
|
||||||
|
name: db
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: db
|
||||||
|
serviceName: db
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: db
|
||||||
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 10
|
||||||
|
containers:
|
||||||
|
- name: db
|
||||||
|
image: postgres:10
|
||||||
|
env:
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: postgres
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
value: odoo
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
value: odoo
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
name: postgres
|
||||||
|
volumeMounts:
|
||||||
|
- name: db-data
|
||||||
|
mountPath: /var/lib/postgresql/data/pgdata
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: db-data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: local-path
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
37
deployment/iotbox-deployment.yaml
Normal file
37
deployment/iotbox-deployment.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: iotbox
|
||||||
|
name: iotbox
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: iotbox
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: iotbox
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- --
|
||||||
|
- --load=web,hw_proxy,hw_posbox_homepage,hw_posbox_upgrade,hw_scale,hw_scanner,hw_escpos,hw_blackbox_be,hw_screen,hw_drivers,hw_printer_network
|
||||||
|
env:
|
||||||
|
- name: HOST
|
||||||
|
value: db
|
||||||
|
- name: PASSWORD
|
||||||
|
value: odoo
|
||||||
|
- name: USER
|
||||||
|
value: odoo
|
||||||
|
image: docker.io/tobru/odoo-pos:latest-iotbox
|
||||||
|
name: iotbox
|
||||||
|
ports:
|
||||||
|
- containerPort: 8069
|
||||||
|
- containerPort: 8072
|
||||||
|
hostname: iotbox
|
||||||
|
restartPolicy: Always
|
17
deployment/iotbox-service.yaml
Normal file
17
deployment/iotbox-service.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: iotbox
|
||||||
|
name: iotbox
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: "8070"
|
||||||
|
port: 8070
|
||||||
|
targetPort: 8069
|
||||||
|
- name: "8072"
|
||||||
|
port: 8072
|
||||||
|
targetPort: 8072
|
||||||
|
selector:
|
||||||
|
app: iotbox
|
40
deployment/odoo-deployment.yaml
Normal file
40
deployment/odoo-deployment.yaml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: odoo
|
||||||
|
name: odoo
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: odoo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: odoo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: HOST
|
||||||
|
value: db
|
||||||
|
- name: PASSWORD
|
||||||
|
value: odoo
|
||||||
|
- name: USER
|
||||||
|
value: odoo
|
||||||
|
image: docker.io/tobru/odoo-pos:latest-pos
|
||||||
|
name: web
|
||||||
|
ports:
|
||||||
|
- containerPort: 8069
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/lib/odoo
|
||||||
|
name: odoo-data
|
||||||
|
hostname: web
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: odoo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: odoo-data
|
14
deployment/odoo-pvc.yaml
Normal file
14
deployment/odoo-pvc.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: odoo
|
||||||
|
name: odoo-data
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 500Mi
|
||||||
|
storageClassName: local-path
|
14
deployment/odoo-service.yaml
Normal file
14
deployment/odoo-service.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: odoo
|
||||||
|
name: odoo
|
||||||
|
namespace: pos
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 8069
|
||||||
|
selector:
|
||||||
|
app: odoo
|
Reference in a new issue