Created configuration to deploy Odoo app

This commit is contained in:
Marcin-Ramotowski 2025-05-18 19:55:38 +00:00
commit cf241d7771
4 changed files with 114 additions and 0 deletions

20
ingress.yaml Normal file
View File

@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: odoo-ingress
namespace: odoo
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- host: odoo.marcin00.pl
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: odoo
port:
number: 8069

4
namespace.yaml Normal file
View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: odoo

46
odoo-deploy.yaml Normal file
View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo
namespace: odoo
spec:
replicas: 1
selector:
matchLabels:
app: odoo
template:
metadata:
labels:
app: odoo
spec:
containers:
- name: odoo
image: docker.io/bitnami/odoo:16
ports:
- containerPort: 8069
env:
- name: ALLOW_EMPTY_PASSWORD
value: "yes"
- name: ODOO_DATABASE_USER
value: odoo
- name: ODOO_DATABASE_PASSWORD
value: k8smaestro
- name: ODOO_DATABASE_NAME
value: k8smaestro
volumeMounts:
- name: odoo-data
mountPath: /bitnami/odoo
volumes:
- name: odoo-data
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: odoo
namespace: odoo
spec:
ports:
- port: 8069
selector:
app: odoo

44
postgres-deploy.yaml Normal file
View File

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgresql
namespace: odoo
spec:
replicas: 1
selector:
matchLabels:
app: postgresql
template:
metadata:
labels:
app: postgresql
spec:
containers:
- name: postgres
image: docker.io/bitnami/postgresql:15
ports:
- containerPort: 5432
env:
- name: POSTGRESQL_DATABASE
value: k8smaestro
- name: POSTGRESQL_PASSWORD
value: k8smaestro
- name: POSTGRESQL_USERNAME
value: odoo
volumeMounts:
- name: postgres-storage
mountPath: /bitnami/postgresql
volumes:
- name: postgres-storage
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: postgresql
namespace: odoo
spec:
ports:
- port: 5432
selector:
app: postgresql