commit cf241d77711f60344877c1de8f0c8a9d63d1426a Author: Marcin-Ramotowski Date: Sun May 18 19:55:38 2025 +0000 Created configuration to deploy Odoo app diff --git a/ingress.yaml b/ingress.yaml new file mode 100644 index 0000000..ca4ad9c --- /dev/null +++ b/ingress.yaml @@ -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 diff --git a/namespace.yaml b/namespace.yaml new file mode 100644 index 0000000..9f88222 --- /dev/null +++ b/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: odoo \ No newline at end of file diff --git a/odoo-deploy.yaml b/odoo-deploy.yaml new file mode 100644 index 0000000..df6c879 --- /dev/null +++ b/odoo-deploy.yaml @@ -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 \ No newline at end of file diff --git a/postgres-deploy.yaml b/postgres-deploy.yaml new file mode 100644 index 0000000..3ba12c5 --- /dev/null +++ b/postgres-deploy.yaml @@ -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 \ No newline at end of file